为什么我的代码只运行一次,然后使用不同的坐标。有时,它甚至不画任何东西,除了一个小圆圈。
如何使中心线成为线型?(我确实使用了带负值的dimcen使其成为“Line”)
本来会贴照片的,但保护措施起了作用。
- (DEFUN C:U13_Bukauskas()
- (setq p (getpoint "\nIveskite apskritimo centro koordinates: "))
- (setq x (getint "\nIveskite apskritimo skersmeni: "))
- (command "color" "t" "0,0,0")
- (setq p1 (polar p PI (* x 1.5)))
- (setq p1 (polar p1 (/ (* 90 PI) 180) (* 0.5 x)))
- (setq p2 (polar p1 (* 0.5 PI) (* x 1.5)))
- (setq p3 (polar p2 (* 0 PI) (* x 2)))
- (setq p4 (polar p3 (* 0 PI) x))
- (setq p5 (polar p4 (/ (* 270 PI) 180) (* x 2.5)))
- (setq p6 (polar p5 (/ (* 270 PI) 180) (* x 1.5)))
- (setq p7 (polar p6 PI (* x 2)))
- (setq p8 (polar p7 PI x))
- (setq p9 (polar p1 (* 0 PI) (* 2 x)))
- (setq p10 (polar p5 PI (* x 2)))
- (setq p11 (polar p PI (* x 0.6)))
- (setq p12 (polar p 0 (* x 0.6)))
- (setq p13 (polar p (/ (* 270 PI) 180) (* x 0.6)))
- (setq p14 (polar p (/ (* 90 PI) 180) (* x 0.6)))
- (command "Line" p1 p2 "")
- (setq L (entlast))
- (command "Line" p2 p3 p4 p5 p6 p7 p8 p1 "")
- (command "color" "white" "-hatch" "p" "s" "s" L p2 p3 p4 p5 p6 p7 p8 p1 "" "")
- (command "color" "t" "0,0,0")
- (command "circle" p "d" x "")
- (setq aps (entlast))
- (command "color" "blue")
- (command "dimcen" "-2.5" "")
- (command "dimcenter" (list (entlast) (polar p 0 x)) "")
- (command "color" "t" "0,0,0")
- (command "hatch" "s" aps "")
- (command "color" "t" "0,0,0")
- (command "Line" p9 p1 "")
- (setq E1 (entlast))
- (command "Line" p9 p3 "")
- (setq E2 (entlast))
- (command "Line" p10 p5 "")
- (setq E3 (entlast))
- (command "Line" p10 p7 "")
- (setq E4 (entlast))
- (command "fillet" "radius" (* 0.5 x))
- (command "fillet" "trim" "T" E1 E2)
- (command "fillet" "trim" "T" E3 E4)
- )
|