- ;; 需要e派工具箱(XCAD)的支持
- (defun c:tt ()
- (if (setq p1 (getpoint "\n基点<退出>: "))
- (progn
- (bpoly p1)
- (setq s1(entlast)
- p8 (xyp-9pt s1 8)
- ptn (xyp-get-Vertexs s1 0)
- pt (xyp-Get-PtNearPtn p8 ptn)
- ptn (vl-remove-if '(lambda (x) (equal x pt)) ptn)
- p1 (car ptn)
- p2 (cadr ptn)
- rad (angle p1 p2)
- p3 (inters p1 p2 pt (polar pt (+ rad (* pi 0.5)) 10) nil)
- s2 (xyp-line pt p3)
- d1 (distance p1 p2)
- dh (distance pt p3)
- s3 (xyp-Text 5 (xyp-Mid2Pt pt p3) (rtos dh 2 2))
- s4 (xyp-Text 5 (xyp-Mid2Pt p1 p2) (rtos d1 2 2))
- )
- (entdel s1)
- )
- )
- (princ)
- )
|