复制代码
-
-
- ///
- /// 旋转的函数.
- ///
- ///
- ///
- ///
- public static void Rotate(ObjectId id, Point3d basePt, Double angle)
- {
- Matrix3d mt = Matrix3d.Rotation(angle, Vector3d.ZAxis, basePt);
- Database db = HostApplicationServices.WorkingDatabase;
- using (Transaction trans = db.TransactionManager.StartTransaction())
- {
- Entity ent = (Entity)trans.GetObject(id, OpenMode.ForWrite);
- ent.TransformBy(mt);
- trans.Commit();
- }
- }
|