;; 山寨一个- ;; 选择相同曲线 需要e派工具箱(XCAD)的支持:http://yunpan.cn/QXQKsW9gAPmpF
- (defun c:tt ()
- (if (and (setq s1 (car (entsel "\n选择: ")))
- (xyp-etype s1 "*LINE,ARC,CIRCLE,ELLIPSE")
- )
- (progn
- (redraw s1 3)
- (setq i -1
- ss1 (ssadd)
- l0 (xyp-CurveLength s1)
- a0 (xyp-get "area" s1)
- )
- (princ "\n选择范围: ")
- (if (setq ss (ssget (list (cons 0 (xyp-DXF 0 s1)))))
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (if (and (= (xyp-CurveLength s1) l0)
- (= (xyp-get "area" s1) a0)
- )
- (setq ss1 (ssadd s1 ss1))
- )
- )
- )
- )
- )
- (if ss1
- (sssetfirst ss1 ss1)
- )
- (princ)
- )
|