马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
[sell=2]- (defun c:XDTB_CIR2JX ( / num pts ss x)
- (if (not (xd::symbol:get '#XD-GLOBAL-VAR-ZX))
- (xd::symbol:put '#XD-GLOBAL-VAR-ZX 1)
- )
- (if (setq num (getint (xdrx_prompt "\n折线等分度数<"
- (xd::symbol:get '#XD-GLOBAL-VAR-ZX)
- ">:" t
- )
- )
- )
- (xd::symbol:put '#XD-GLOBAL-VAR-ZX num)
- )
- (if (and
- (xdrx_prompt "\n选取要变折线的圆或圆弧<退出>:" t)
- (setq ss (ssget '((0 . "circle,arc"))))
- )
- (progn
- (setq num (/ 360 (xd::symbol:get '#XD-GLOBAL-VAR-ZX)))
- (mapcar
- '(lambda (x)
- (setq pts (xdrx_curve_getsamplepoints x num))
- (if (= (car (xdrx_object_classname x)) "CIRCLE")
- (xdrx_polyline_make pts T)
- (xdrx_polyline_make pts)
- )
- (xdrx_object_swapid (entlast) x)
- (xdrx_entity_delete (entlast))
- )
- (xdrx_pickset->ents ss)
- )
- (xdrx_prompt "\n成功转换了" (sslength ss) "个圆(弧).")
- )
- )
- (princ)
- )
[/sell]
|