马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
- (defun c:xdtb_arc2cir (/ ss x i g)
- (xdrx-begin)
- (if (setq ss (xdrx-ssget
- "\n选择圆弧(支持多段线弧)<退出>:"
- '((0 . "arc,*polyline"))
- )
- )
- (progn
- (setq i 0)
- (mapcar
- '(lambda (x)
- (if (xdrx-object-iskindof x "arc")
- (progn (setq ss (apply 'xdrx-circle-make
- (xdrx-getpropertyvalue
- x
- "center"
- "normal"
- "radius"
- )
- )
- )
- (xdrx-entity-setpropertiesfrom ss x)
- (setq i (1+ i))
- (xdrx-entity-delete x)
- )
- (progn
- (xdrx-polyline-compress x 7)
- (if (and (= (xdrx-getpropertyvalue x "numverts") 2)
- (/= 0 (xdrx-getpropertyvalue x "bulgeat" 0))
- )
- (progn (setq g (xdrx-getpropertyvalue x "arcsegat" 0))
- (setq ss (apply 'xdrx-circle-make
- (xdrx-getpropertyvalue
- g
- "center"
- "normal"
- "radius"
- )
- )
- )
- (xdrx-entity-setpropertiesfrom ss x)
- (xdrx-entity-delete x)
- (setq i (1+ i))
- )
- )
- )
- )
- )
- (xdrx-pickset->ents ss)
- )
- (xdrx-prompt "\n生成了 " i " 个圆.")
- )
- )
- (xdrx-end)
- (princ)
- )
|