
- ;; 伪源码,需要e派工具箱(XCAD)的支持:http://xyp1964.ys168.com
- (defun c:t2 ()
- (if (setq ss (ssget '((0 . "*POLYLINE"))))
- (progn
- (setq i -1)
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq ptn (xyp-get-Vertexs s1 0)
- ptn (mapcar 'xyp-3d2d ptn)
- )
- (if (xyp-Curve-Close s1)
- (xyp-Entmake-lwPolyline ptn t)
- (xyp-Entmake-lwPolyline ptn nil)
- )
- )
- (xyp-erase ss)
- )
- )
- (princ)
- )
|