Exemplo n.º 1
0
        private void LineToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Point3d point3D = new Point3d(0, 0, 0);
            double  pi      = 3.14159265359;
            lib     lib     = new lib();

            _ = lib.AddArc(point3D, 5, 0, pi, "0");
            for (double i = 1; i < 100; i++)
            {
                lib.AddCircle(point3D, 2 * i, "0");
            }
        }
Exemplo n.º 2
0
        // vẽ biểu đồ trên autocad
        private void Button2_Click(object sender, EventArgs e)
        {
            int t   = dataGridView.Rows.Count;
            int k   = Convert.ToInt32(txt_column.Text);
            lib lib = new lib();

            for (int j = 0; j <= k - 2; j++)
            {
                for (int i = 0; i <= t - 2; i++)
                {
                    int     x1       = Convert.ToInt32(dataGridView.Rows[i].Cells[j].Value);
                    int     y1       = Convert.ToInt32(dataGridView.Rows[i].Cells[j + 1].Value);
                    int     x2       = Convert.ToInt32(dataGridView.Rows[i + 1].Cells[j].Value);
                    int     y2       = Convert.ToInt32(dataGridView.Rows[i + 1].Cells[j + 1].Value);
                    Point3d point3D1 = new Point3d(x1, y1, 0);
                    Point3d point3D2 = new Point3d(x2, y2, 0);
                    lib.AddLine(point3D1, point3D2, "0", 1, 1);
                }
            }
        }