乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 54|回复: 3

CAD 多段线的生成

[复制链接]

13

主题

39

帖子

2

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
91
发表于 2011-8-26 16:08:00 | 显示全部楼层 |阅读模式
请大家帮帮忙、、、、、
如下代码:
     Point2dCollection pc = new Point2dCollection();
     Polyline pl = new Polyline();
        for(int i=0;i<pc.Count;i++)
           {
               double bug = 0;
            pl.AddVertexAt(i, pc[i], bug, 0, 0);
           }
这段代码是添加一个多段线,我想问下,  AddVertexAt()方法中,bug参数的用途和作用,或它的值的大小意味着什么 ? (我知道的是:当bug=0时,代表那段多段线是条实现)   如何我要在多段线的某段不是直线,而是要画段弧,该怎么控制bug这个参数呢?  
回复

使用道具 举报

17

主题

69

帖子

2

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
137
发表于 2011-8-27 11:11:00 | 显示全部楼层
Bulge的意思是:圆心角正切值的四分之一。
回复

使用道具 举报

32

主题

651

帖子

8

银币

中流砥柱

Rank: 25

铜币
779
发表于 2011-8-27 13:32:00 | 显示全部楼层

去看AutoCAD 里面 Lisp 的帮助 ,搜 Bulge
Codes 00C and 00D: Bulge-Specified Arcs
Special codes 00C and 00D (12 and 13) provide another mechanism for including arc segments in shape descriptions. They are similar to codes 8 and 9 in that you can use them to specify XY displacements. However, codes 00C and 00D draw arcs by applying a bulge factor to the displacement vector. Code 00C draws one arc segment, while code 00D draws multiple arc segments (polyarcs) until it is terminated by a (0,0) displacement.
Code 00C must be followed by three bytes describing the arc:
0C,X-displacement,Y-displacement,Bulge
Both the X and Y displacement and the bulge, which specifies the curvature of the arc, can range from –127 to +127. If the line segment specified by the displacement has length D, and the perpendicular distance from the midpoint of that segment has height H, the magnitude of the bulge is ((2 * H / D) * 127). The sign is negative if the arc from the current location to the new location is clockwise. A semicircle has bulge 127 (or –127) and is the greatest arc that can be represented as a single-arc segment using these codes (use two consecutive arc segments for larger arcs). A bulge specification of 0 is valid and represents a straight-line segment. Note, however, that using code 8 for a straight-line segment saves a byte in the shape description.
The polyarc code (00D, or 13) is followed by 0 or by more arc segment triples, and is terminated by a (0,0) displacement. Note that no bulge is specified after the final displacement. For example, the letter S might be defined by the following sequence:
13,(0,5,127),(0,5,-127),(0,0)
Zero bulge segments are useful within polyarcs to represent straight segments; they are more efficient than terminating the polyarc, inserting one straight segment, and then starting another polyarc.
The number –128 cannot be used in arc segment and polyarc definitions.
帮助里是有个图片的,没有显示出来
回复

使用道具 举报

13

主题

113

帖子

8

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
166
发表于 2011-8-27 17:23:00 | 显示全部楼层
凸度的意思
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-6-29 19:14 , Processed in 0.730515 second(s), 61 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表