本帖最后由 夏生生 于 2025-10-29 16:43 编辑
瞎写的,试试 - (defun c:tt (/ en1 en2 h pt1 pt2 pt3 pt4 x y)
- (command "undo""be")
- (setq pt1 (getpoint "\n拱起点:")
- pt2 (getpoint pt1 "\n拱终点:")
- pt3 (mapcar '(lambda (x y) (* 0.5 (+ x y))) pt1 pt2)
- pt4 (polar pt3 (* 0.5 pi) (* 0.5 (distance pt1 pt2))))
- (command "line" "none" pt1 "none" pt2 "")
- (setq en1 (entlast))
- (command "line" "none" pt3 "none" pt4 "")
- (setq en2 (entlast))
- (setq h (getreal "\n矢高:")
- pt3 (polar pt3
- (* 0.5 pi)
- h))
- (command "arc" "none" pt1 "none" pt3 "none" pt2)
- (entdel en1)
- (entdel en2)
- (command "undo" "e")
- (princ))
|