cad中圆或弧线如何转多段线?
cad中圆或弧线如何转多段线? 好象不可以吧 !目前我还没发现这功能呢 未剪切过的圆不可转,剪切过的圆及圆弧(椭圆弧除外)都可用PEDIT来转。 同意楼上在转换的过程中会问你是否同意转换为多线段 修改菜单~对象~多段线,选中你要改变的对象,问是否转多段线,选是,然后执行合并,就可以将不是多段线的内容作成多段线了 如果就是想做多段线,椭圆弧和样条曲线是变不成多段线的;如果想做一个封闭空间作三维立体图,可以把它们做成面域。 圆可以先剪切到一部分后用PE,再输入C闭合成圆椭圆或椭圆弧的话,在画之前先修改下参数,输入pellipse值设置为1,则画的椭圆或椭圆弧为多线段了 来自明经(defun c:tt(/ modelspace)
(setq oldosmode (getvar "osmode")
oldcmdecho (getvar "cmdecho")
)
(setq modelspace (vla-get-ModelSpace (vla-get-activedocument(vlax-get-acad-object))))
(setvar "osmode" 0)
(setvar "cmdecho" 0)
(setq ss (ssget '((0 . "circle"))))
(setq k 0)
(if ss
(repeat (sslength ss)
(setq en (ssname ss k))
(setq cp (cdr (assoc 10 (setq enl (entget en))))
r (cdr (assoc 40 enl))
)
(setq p1 (polar cp pi r)
p2 (polar cp 0 r)
)
(setq pts (list p1 p2)
pts (mapcar '(lambda (x) (list (car x) (cadr x))) pts)
n (* 2 (length pts))
)
(setq arypts (vlax-make-variant
(vlax-safearray-fill
(vlax-make-safearray vlax-vbdouble (cons 1 n))
(apply 'append pts)
) ;_ vlax-safearray-fill
) ;_ vlax-make-variant
) ;_ setq
(setq obj (vla-AddLightWeightPolyline modelspace arypts))
(vla-put-Closed obj :vlax-true)
(vla-SetBulge obj 0 1)
(vla-SetBulge obj 1 1)
(setq k (1+ k))
(command "_matchprop" en (entlast) "")
(entdel en)
)
)
(setvar "osmode" oldosmode)
(setvar "cmdecho" oldcmdecho)
) 哦,学到了,谢谢
页:
[1]