首页 > 代码库 > Mirror用法

Mirror用法

技术分享
 1  switch (quadrantType) 2             { 3                 case QuadrantType.one: 4                     db.setlayerCenter(); 5                     ids.Add(db.AddToModelSpace(arc)); 6                     db.setlayerDraw(); 7                     ids.Add(db.AddToModelSpace(line1, line2, arc111, arc222)); 8                     break; 9                 case QuadrantType.two:10                     line1.Mirror(pt,pt.dPolar(90, 100), true);11                     line2.Mirror(pt, pt.dPolar(90, 100), true);12                     arc.Mirror(pt, pt.dPolar(90, 100), true);13                     arc111.Mirror(pt, pt.dPolar(90, 100), true);14                     arc222.Mirror(pt, pt.dPolar(90, 100), true);15                     db.setlayerCenter();16                     ids.Add(db.AddToModelSpace(arc));17                     db.setlayerDraw();18                     ids.Add(db.AddToModelSpace(line1, line2,arc111, arc222));19                     break;20                 case QuadrantType.three:21                     line1.Mirror(pt,pt.dPolar(90, 100), true);22                     line2.Mirror(pt, pt.dPolar(90, 100), true);23                     arc.Mirror(pt, pt.dPolar(90, 100), true);24                     arc111.Mirror(pt, pt.dPolar(90, 100), true);25                     arc222.Mirror(pt, pt.dPolar(90, 100), true);26                     line1.Mirror(pt,pt.dPolar(0, 100), true);27                     line2.Mirror(pt, pt.dPolar(0, 100), true);28                     arc.Mirror(pt, pt.dPolar(0, 100), true);29                     arc111.Mirror(pt, pt.dPolar(0, 100), true);30                     arc222.Mirror(pt, pt.dPolar(0, 100), true);31                     db.setlayerCenter();32                     ids.Add(db.AddToModelSpace(arc));33                     db.setlayerDraw();34                     ids.Add(db.AddToModelSpace(line1, line2,arc111, arc222));35                     break;36                 case QuadrantType.four:37                     line1.Mirror(pt,pt.dPolar(0, 100), true);38                     line2.Mirror(pt, pt.dPolar(0, 100), true);39                     arc.Mirror(pt, pt.dPolar(0, 100), true);40                     arc111.Mirror(pt, pt.dPolar(0, 100), true);41                     arc222.Mirror(pt, pt.dPolar(0, 100), true);42                     db.setlayerCenter();43                     ids.Add(db.AddToModelSpace(arc));44                     db.setlayerDraw();45                     ids.Add(db.AddToModelSpace(line1, line2,arc111, arc222));46                     break;47                 default:48                     break;49             }
View Code

mirror后删除原有 否则会出现冲突 然后将MIRROR后的实体加入DB中

Mirror用法