Exemplo n.º 1
0
        public void tri2()
        {
            Editor   ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
            PointSet ps = PreProcess.getPointFromText(mydb.tcSetting.Scale);

            ObjectId[] ids = PreProcess.getAllLines();

            List <Constraint> boundary = new List <Constraint>();

            //int plCount = 0;
            ObjectId[] objectIDs3 = CommandLineQuerries.GetObjectIDs(CommandLineQuerries.EntityType.PLINES, "Select boundaries (polylines)", false);
            if (objectIDs3 != null)
            {
                string text3 = " boundary";
                if (objectIDs3.Length > 1)
                {
                    text3 += "s";
                }
                //editor.WriteMessage(objectIDs3.Length + text3 + " selected.");
                //plCount = this.getPolylineCount(objectIDs3);
                List <Edge> list4 = Conversions.ToCeometricEdgeList(objectIDs3);
                for (int j = 0; j < list4.Count; j++)
                {
                    boundary.Add(new Constraint(list4[j], Constraint.ConstraintType.Boundary));
                }
            }
            else
            {
                //editor.WriteMessage("No boundaries selected.\n");
            }


            Triangulate tri = new Triangulate();

            //tri.TriangulateInternal(ps, new List<Constraint>(), new List<Constraint>());
            tri.TriangulateInternal(ps, new List <Constraint>(), boundary, null);
        }
Exemplo n.º 2
0
 public void resetLine()
 {
     mydb.LineIds = PreProcess.getAllLines();
 }