另一种建议vla setbulge方法
仅LWpoly
- ;another [url=";http://www.cadtutor.net/forum/showthread.php?87920-Is-there-any-routine-convert-Revcloud-to-Polyline"]old thread[/url]
- (defun c:test ( / foo s i _bulge )
- ;hanhphuc 02.04.2018
- (defun _bulge ( en n / l i ) (setq i -1 l (entget en))
- (repeat (if (zerop (cdr (assoc 70 l)))
- (1- (cdr (assoc 90 l)))
- (cdr (assoc 90 l))
- )
- (vla-setBulge (vlax-ename->vla-object en) (setq i (1+ i)) n )
- )
- )
- (if
- (setq ss (ssget ":L" '((0 . "LWPOLYLINE"))))
- (repeat (setq i (sslength ss))
- (_bulge (ssname ss (setq i (1- i))) [color="red"][b]-0.5[/b][/color] ) [color="green"]; 0.5 or -0.5 default bulge [/color]
- )
- (princ "\nLWPolyline only!")
- )
- (princ)
- )
- (vl-load-com)
我们不知道你们的LW多段线都是顺时针方向还是其他方向?
也许您需要过滤方向、反转和清除零长度测试。。 |