Esempio n. 1
0
        private void BT_1pico1Lam_Click(object sender, EventArgs e)
        {
            int    longSegmento     = Convert.ToInt32(distancia / (3 * picketFence.resX)); //el ancho de medio pico
            int    distEntreLaminas = Convert.ToInt32(5 / (3 * picketFence.resX));
            string picosArray       = PicketFence.buscarPicosEnLaminaCentral(picketFence.matriz, 5, longSegmento, picketFence.resX, picketFence.tamCampoY, distEntreLaminas);

            File.WriteAllText(archivo, picosArray);
            MessageBox.Show("Listo");
        }
Esempio n. 2
0
        private void BT_1PicoLargo_Click(object sender, EventArgs e)
        {
            int longSegmento     = Convert.ToInt32(distancia / (3 * picketFence.resX)); //el ancho de medio pico
            int distEntreLaminas = Convert.ToInt32(5 / (3 * picketFence.resX));

            string[] picosArray = PicketFence.buscarPicosEnTodasLasLaminasMenosDos(picketFence.matriz, 5, longSegmento, picketFence.resX, picketFence.tamCampoY, distEntreLaminas);
            File.WriteAllLines(archivo, picosArray);
            MessageBox.Show("Listo");
        }
Esempio n. 3
0
        private void BT_CargarArchivo_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.Filter = "Archivos dxf(.dxf)|*.dxf|All Files (*.*)|*.*";
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                picketFence = PicketFence.crear(openFileDialog1.FileName);
            }
        }
Esempio n. 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            int    longSegmento     = Convert.ToInt32(distancia / (2.5 * picketFence.resX)); //el ancho de medio pico
            int    distEntreLaminas = Convert.ToInt32(5 / (2.5 * picketFence.resX));
            double rotacion         = PicketFence.analizarRotacion(picketFence.matriz, picketFence.resX, picketFence.tamCampoY, distEntreLaminas);
            double rotacionEnmm     = Math.Round(rotacion * picketFence.resX, 3);

            MessageBox.Show("Se observó una rotación de" + rotacion.ToString() + " pixeles" + "\n que corresponde a" + rotacionEnmm.ToString() + " mm");
            string[] picosArray = PicketFence.buscarPicosEnTodasLasLaminas(picketFence.matriz, 5, longSegmento, picketFence.resX, picketFence.tamCampoY, distEntreLaminas);
            File.WriteAllLines(archivo, picosArray);
            MessageBox.Show("Listo");
        }
Esempio n. 5
0
        public static PicketFence crear(string archivo)
        {
            string[]    aux         = cargar(archivo);
            PicketFence picketFence = new PicketFence
            {
                fecha      = extraerFecha(aux, 46),
                gantry     = extraerDouble(aux, 38),
                tamMatrizX = Convert.ToInt32(extraerDouble(aux, 8)),
                resX       = extraerDouble(aux, 9),
                tamMatrizY = Convert.ToInt32(extraerDouble(aux, 14)),
                resY       = extraerDouble(aux, 15),
                tamCampoX  = -extraerDouble(aux, 40) + extraerDouble(aux, 41),
                tamCampoY  = -extraerDouble(aux, 42) + extraerDouble(aux, 43),
            };

            picketFence.matriz = extraerMatriz(aux, 48, 48 + picketFence.tamMatrizY - 1, picketFence.tamMatrizX, picketFence.tamMatrizY);
            return(picketFence);
        }