[推荐]搜集的z轴清零~解决不共面造成的无法倒角、无法测量等问题~很好用
<p>(defun c:sw (/ word ss n k en en_data en_type k z xy x y 10_data pt1 new_10_data 11_data pt2<br/> 38_data h new_38_data 12_data pt5 new_12_data 15_data pt6 new_15_data 16_data<br/> pt7 new_16_data 13_data pt3 new_13_data 14_data pt4 new_14_data n no key )<br/> (initget "y n")<br/> (setq word (getkword "\n是否将物体放在0平面上<n> <y>:"))<br/> (if (null word)<br/> (setq word "y")<br/> )<br/> (cond ((= word "y") (foun))<br/> ((= word "Y") (foun))<br/> ((= word "N") (nil))<br/> ((= word "n") (nil))<br/> )<br/>)</p><p>(defun foun ()<br/> (setq ss (ssget "x" ))<br/> (setq n (sslength ss))<br/> (setq k 0)<br/> (repeat n<br/> (setq en (ssname ss k))<br/> (setq en_data (entget en))<br/> (setq en_type (cdr (assoc 0 en_data)))<br/> (cond ((= en_type "LINE") (line))<br/> ((= en_type "LWPOLYLINE") (lwpolyline))<br/> ((= en_type "CIRCLE") (circle))<br/> ((= en_type "ARC") (circle))<br/> ((= en_type "DIMENSION") (dimension))<br/> ((= en_type "MTEXT") (line))<br/> ((= en_type "TEXT") (line))<br/> ((= en_type "ATTDEF") (line))<br/> ((= en_type "ELLIPSE") (line))<br/> ((= en_type "HATCH") (circle))<br/> ((= en_type "SOLID") (solid))<br/> ((= en_type "INSERT") (circle))<br/> ((= en_type "POINT") (circle))<br/> ((= en_type "XLINE") (line))<br/> ((= en_type "LEADER") (leader))<br/> )<br/> (entmod en_data)<br/> (setq k (1+ k))</p> 没发全吧 (defun c:gom();针对master cam转换出的档案,不能圆角,修改共面(command "move" "all" "" "0,0,0" "")
(command "move" "all" "" "0,0,1e99" "")
(command "move" "all" "" "0,0,0" "")
(command "move" "all" "" "0,0,-1e99" "")
(princ)
)
这样也挺好用
页:
[1]