- (defun c:tt ()
- (or ww (setq ww 1.00))
- (setq ww (Udist 7 "" "宽度<输入或鼠标直接量取>" ww nil))
- (command "CENTERLINE" pause pause)
- (command "explode" (entlast))
- (setq e (entlast)
- sp (vlax-curve-getStartPoint e)
- ep (vlax-curve-getendPoint e)
- ang (angle sp ep)
- pts (mapcar '(lambda (x)
- (list (setq p1 (polar x (+ ang (/ pi 2.0)) (* 0.5 ww)))
- (polar p1 (+ ang (* pi 1.5)) ww)
- )
- )
- (list sp ep)
- )
- )
- pts (apply 'append (list (car pts) (reverse (cadr pts))))
- )
- (entdel e)
- (entmakex
- (append '((0 . "LWPOLYLINE")
- (100 . "AcDbEntity")
- (100 . "AcDbPolyline")
- (90 . 4)
- (70 . 1)
- )
- (mapcar '(lambda (p) (cons 10 p)) pts)
- )
- )
- (princ)
- )
|