pfd8667发表于2004-9-26 21:40:00版主说的看法我不认为是这回事.因为在CAD二个设置我都设置了度/分/秒,但用角度标注未能反映秒,2楼的就行,是我见的测量夹角最满意的,但在命令行提示角度重复了,我... 角度标注的精度应当修改当前标注样式才能体现。 在命令行提示重复只需在最后加上一句(princ),变为- (defun c:ljj(/ p1 p2 p3 jd0 jd)
- (setq p1 (getpoint "\n取左边一点:"))
- (setq p2 (getpoint "\n取顶点:"))
- (setq p3 (getpoint "\n取右边一点:"))
- (setq jd0 (- (angle p2 p1) (angle p2 p3))) (if (< jd0 0.0)(setq jd0 (+ (* 2 pi) jd0)))
- (setq jd (/ (* jd0 180.0) pi))
- (dtr0 jd)
- (princ "两直线夹角= ")(prin1 fwj1)(princ) ;加上的
- )
- (defun dtr0(a0 / aa0 aa1 aa2 bb1 bb2)
- (setq bb1 "" bb2 "")
- (setq aa0 (fix a0))
- (setq aa1 (* (- a0 (fix a0)) 60.0))
- (setq aa2 (* (- aa1 (fix aa1)) 60.0))
- (setq a1 (fix aa1))
- (if (>= aa2 59.95)(progn
- (setq a1 (+ a1 1) aa2 0.00)
- ))
- (setq a2 (fix aa2))
- (if (>= aa1 60.0) (progn
- (setq aa0 (+ aa0 1) a1 0)
- ) )
- (setq bb1 (itoa a1))
- (if (= a1 0)(setq bb1 "00"))
- (setq bb2 (rtos aa2 2 1))
- (if (= a2 0)(setq bb2 "00"))
- (setq fwj1 (strcat (itoa aa0) "度" bb1 "分" bb2 "秒")))
|