liuhongjun80 发表于 2006-12-30 14:03:00

[推荐]搜集的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/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 38_data h new_38_data 12_data pt5 new_12_data 15_data&nbsp; pt6 new_15_data 16_data<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pt7 new_16_data 13_data pt3 new_13_data 14_data pt4 new_14_data n no key )<br/>&nbsp; (initget "y n")<br/>&nbsp; (setq word (getkword "\n是否将物体放在0平面上&lt;n&gt; &lt;y&gt;:"))<br/>&nbsp; (if (null word)<br/>&nbsp;&nbsp;&nbsp; (setq word "y")<br/>&nbsp; )<br/>&nbsp; (cond&nbsp;((= word "y") (foun))<br/>&nbsp;((= word "Y") (foun))<br/>&nbsp;((= word "N") (nil))<br/>&nbsp;((= word "n") (nil))<br/>&nbsp; )<br/>)</p><p>(defun foun ()<br/>&nbsp; (setq ss (ssget "x" ))<br/>&nbsp; (setq n (sslength ss))<br/>&nbsp; (setq k 0)<br/>&nbsp; (repeat n<br/>&nbsp;&nbsp;&nbsp; (setq en (ssname ss k))<br/>&nbsp;&nbsp;&nbsp; (setq en_data (entget en))<br/>&nbsp;&nbsp;&nbsp; (setq en_type (cdr (assoc 0 en_data)))<br/>&nbsp;&nbsp;&nbsp; (cond ((= en_type "LINE") (line))<br/>&nbsp;&nbsp; ((= en_type "LWPOLYLINE") (lwpolyline))<br/>&nbsp;&nbsp; ((= en_type "CIRCLE") (circle))<br/>&nbsp;&nbsp; ((= en_type "ARC") (circle))<br/>&nbsp;&nbsp; ((= en_type "DIMENSION") (dimension))<br/>&nbsp;&nbsp; ((= en_type "MTEXT") (line))<br/>&nbsp;&nbsp; ((= en_type "TEXT") (line))<br/>&nbsp;&nbsp; ((= en_type "ATTDEF") (line))<br/>&nbsp;&nbsp; ((= en_type "ELLIPSE") (line))<br/>&nbsp;&nbsp; ((= en_type "HATCH") (circle))<br/>&nbsp;&nbsp; ((= en_type "SOLID") (solid))<br/>&nbsp;&nbsp; ((= en_type "INSERT") (circle))<br/>&nbsp;&nbsp; ((= en_type "POINT") (circle))<br/>&nbsp;&nbsp; ((= en_type "XLINE") (line))<br/>&nbsp;&nbsp; ((= en_type "LEADER") (leader))<br/>&nbsp;&nbsp;&nbsp; )<br/>&nbsp;&nbsp;&nbsp; (entmod en_data)<br/>&nbsp;&nbsp;&nbsp; (setq k (1+ k))</p>

byghbcx 发表于 2006-12-30 16:57:00

没发全吧

linheyuanpcb 发表于 2022-11-28 17:16:09

(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]
查看完整版本: [推荐]搜集的z轴清零~解决不共面造成的无法倒角、无法测量等问题~很好用