码迷,mamicode.com
首页 > 其他好文 > 详细

Mirror用法

时间:2014-12-21 11:32:14      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:

技术分享
 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用法

标签:

原文地址:http://www.cnblogs.com/xzh1993/p/4176276.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!