- (defun C:yj_wt ()
- (setvar "osmode" 0)
- (setq p0 (getpoint "\n set basepoint:"))
- (setq p1 (getpoint p0 "\n input zhijing:"))
- (setq tt (getdist p1 "\n input bihou:"))
- (setq ang (angle p0 p1))
- (setq l (distance p0 p1))
- (yj_wtsj l)
- (setq p00 (polar p0 ang (+ A (/ l 2))))
- (setq p2 (polar p0 ang (* 0.5 l)))
- (setq p3 (polar p2 (- ang (/ pi 4)) (* (sqrt 2) A)))
- (setq p6 (polar p0 ang tt))
- (setq p7 (polar p1 ang (* tt -1)))
- (setq p4 (polar p00 (- ang (/ pi 2)) (- A (/ l 2))))
- (setq p5 (polar p00 (- ang (/ pi 2)) (+ A (/ l 2))))
- (setq p8 (polar p4 (- ang (/ pi 2)) tt))
- (setq p9 (polar p5 (+ ang (/ pi 2)) tt))
- (command "_.line" p0 p1 "")
- (command "_.line" p4 p5 "")
- (command "_.arc" "c" p00 p1 p4)
- (command "_.arc" "c" p00 p0 p5)
- (command "_.arc" "c" p00 p6 p9)
- (command "_.arc" "c" p00 p7 p8)
- (command "_.arc" "c" p00 p2 p3)
-
- (print)
- )
- (defun yj_wtsj (x)
- (setq data21 '(
- ( l DN A )
- (
- ( 32 25 25 )
- ( 33.7 25 25 )
- ( 38 32 32 )
- ( 42.4 32 32 )
- ( 45 40 38 )
- ( 48.3 40 38 )
- ( 57 50 51 )
- ( 60.3 50 51 )
- ( 73 65 64 )
- ( 76 65 64 )
- ( 88.9 80 76 )
- ( 89 80 76 )
- ( 101.6 90 89 )
- ( 108 100 102 )
- ( 114.3 100 102 )
- ( 133 125 127 )
- ( 141.3 125 127 )
- ( 159 150 152 )
- ( 168.3 150 152 )
- ( 219 200 203 )
- ( 219.1 200 203 )
- ( 273 250 254 )
- ( 273 250 254 )
- ( 323.9 300 305 )
- ( 325 300 305 )
- ( 355.6 350 356 )
- ( 377 350 356 )
- ( 406.4 400 406 )
- ( 426 400 406 )
- ( 457 450 457 )
- ( 480 450 457 )
- ( 508 500 508 )
- ( 530 500 508 )
- ( 559 550 559 )
- ( 610 600 610 )
- ( 630 600 610 )
- )
- )
- )
- (setq blm (car data21)
- sjz (cadr data21)
- )
- (mapcar 'set blm (assoc x sjz));从数据表中取出数据对l、DN、A进行赋值
- (princ)
- )
|