本帖最后由 xyp1964 于 2023-3-8 21:34 编辑
- (defun c:tt ()
- "原地镜像"
- (xyp-Start)
- (setq kw (Ukword 1 "1 2" "镜像轴: [X轴(1)/Y轴(2)]" kw))
- (setq i -1)
- (if (setq ss (ssget '((0 . "lw*") (8 . "Y2") (90 . 4) (70 . 1))))
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq p5 (xyp-9pt s1 5)
- ss1 (ssget "c" (xyp-9pt s1 1) (xyp-9pt s1 9))
- p5a (if (= kw "1")
- (polar p5 0 10)
- (polar p5 (* pi 0.5) 10)
- )
- aa(xyp-Mirror ss1 p5 p5a t)
- )
- )
- )
- (xyp-End)
- )
|