jigLine(Point3d pnt3d, Polyline3d poly3d, int vertex) { ObjectId idPoly3d = ObjectId.Null; Editor ed = BaseObjs._editor; Point3dCollection pnts3d = new Point3dCollection { pnt3d, pnt3d }; Polyline3d ent = new Polyline3d(Poly3dType.SimplePoly, pnts3d, false); ent.TransformBy(ed.CurrentUserCoordinateSystem); Grading_JigPoly3d jig = new Grading_JigPoly3d(ent, poly3d, vertex); PromptResult res = ed.Drag(jig); if (res.Status == PromptStatus.OK) { Transaction tr = BaseObjs.startTransactionDb(); using (tr) { BlockTableRecord ms = Blocks.getBlockTableRecordMS(); idPoly3d = ms.AppendEntity(jig.Entity); tr.AddNewlyCreatedDBObject(jig.Entity, true); tr.Commit(); } } return(idPoly3d); }
public override void OnTransform(Matrix3d tfm) { if (!TryModify()) { return; } poly.TransformBy(tfm); }
//实体缩放 public static void Scale(Polyline3d poly, Point3d basicPoint, double scaleFactor) { Matrix3d mt = Matrix3d.Scaling(scaleFactor, basicPoint); poly.TransformBy(mt); }