一个答案是,在多段线中,可以创建一条具有多条弧的多段线。我从另一个未经测试的程序中剪切了这个,但它被设置为绘制90mm的圆弧。
- (setq insul_ht (getint "\nEnter Insulation ht mm :<90> "))
- (if (= insul_ht nil)
- (setq insul_ht 90)
- )
- (setq p1 (getpoint "\n1st point: "))
- (setq p9 (getpoint P1 "\nend point : "))
- (setq ang1 (angle p1 p9))
- (setq p1 (polar p1 ang1 45))
- ; routine to set N as number of pline segments as a factor of 90 mm.
- ; 90 mm 25 arc's with straights
- (setq N (fix (/ (distance p1 p9) 90.0)))
- (setq d1 (- insul_ht 25.0))
- (setq d2 25.0)
- (setq d3 (- d1 25))
- (setq d4 40.0)
- (setq p2 (polar p1 (+ 1.5708 ang1) d1))
- (command "pLINE" p2 "w" 0.0 0.0)
- (setq m 0)
- (while (< m N)
- (setq p3 (polar p2 ang1 d2))
- (setq p4 (polar p3 ang1 d2))
- (setq p5 (polar (polar p3 ang1 20)(+ ang1 4.71239) d3))
- (setq p6 (polar p5 ang1 d2 ))
- (setq p7 (polar p6 ang1 d2))
- (setq p8 (polar p4 ang1 d4))
- ; now put pts 3,4,5,6
- (command "a" "ce" p3 "a" "-180" "l" p5 "a" "ce" p6 p7 "l" p8)
- ; parallel lines now drawn
- (setq m (+ 1 m))
- (setq p2 p8)
- )
- (command "")
- ; ends pline
-
|