 - (defun c:tt (/ d ss pl enl)
- (setq d (getreal "\n输入弦高容差<0.5>"))
- (if (null d)
- (setq d 0.5)
- )
- (while (setq ss (ssget '((0 . "*line,arc,circle,ellipse"))))
- (repeat (setq n (sslength ss))
- (setq e (ssname ss (setq n (1- n))))
- (setq pl (GXL-GETSAMPLET e d))
- (setq enl
- (list
- '(0 . "LWPOLYLINE")
- '(100 . "AcDbEntity")
- '(100 . "AcDbPolyline")
- (cons 90 (length pl))
- )
- )
- (setq enl (append enl (mapcar '(lambda (x) (cons 10 x)) pl)))
- (entmake enl)
- (entdel e)
- )
- )
- (princ)
- )
GXL-GETSAMPLET函数见 按弦高限差值回返曲线拟合样本点 |