getangle:输入角度制数值,返回弧度制数值。- (defun c:rj ()
- (while (not (setq p1 (getpoint "\n 请输入锐角顶点 : "))))
- (while (not (setq A (getangle p1 "\n 请输入锐角角度 : "))))
- (setq p2 (polar p1 0 1500)
- p3 (polar p1 A 1500)
- p4 (polar p1 (/ A 2) (/ 100 (sin (/ A 2))))
- p41 (polar p4 0 1200)
- p11 (polar p41 (* 0.5 pi) 50)
- p12 (polar p11 pi 100)
- p42 (polar p4 (/ A 3) 1200)
- p21 (polar p42 (+ (/ A 3) (* 0.5 pi)) 50)
- p22 (polar p21 (+ (/ A 3) pi) 100)
- p43 (polar p4 (* 2 (/ A 3)) 1200)
- p31 (polar p42 (+ (* 2 (/ A 3)) (* 1.5 pi)) 50)
- p32 (polar p31 (+ (* 2 (/ A 3)) pi) 100)
- p44 (polar p4 A 1200)
- p51 (polar p44 (+ A (* 1.5 pi)) 50)
- p52 (polar p51 (+ A pi) 100)
- )
- (command "_pline" p2 p1 p3 "")
- (command "_pline" p12 p11 p41 p4 p44 p51 p52 "")
- (command "_pline" p22 p21 p42 p4 p43 p31 p32 "")
- (princ)
- )
|