- 积分
- 683
- 明经币
- 个
- 注册时间
- 2004-8-30
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
我的程序哪出错了,灰色(;后串)为问题所在点,帮忙一下,小弟功力尚浅,不知道为何出错?
;已知:圆心o,同心圆直径d1 d2 d3 , ;求做:同心圆及中心线,标注, (defun c:txy (/ o d1 d2 d3 f r1) (graphscr) (setvar "cmdecho" 0) (setq o (getpoint "\nenter center of circle:")) (initget 7) (setq d1 (getdist "\nenter the first circle diameter:")) (setq d2 (getdist "\nenter the second circle diameter:")) (setq d3 (getdist "\nenter the third circle diameter:")) (command "layer" "make" "xx" "color" "2" "xx" "") ;(command "layer" "ltype" "continuous" "") (command "circle" o "d" d1) (command "circle" o "d" d2) (command "circle" o "d" d3) (if (>= d1 d2) (setq f d1) (setq f d2) ) (if (< f d3) (setq f d3) ) (command "layer" "make" "center" "color" "1" "center" "") ; (command "layer" "ltype" "center" "") (setq x (car o)) (setq y (cadr o)) (setq y1 (- y f)) (setq y2 (+ y f)) (setq x1 (- x f)) (setq x2 (+ x f)) (setq p1 (list x y1 )) (setq p2 (list x y2 )) (setq p3 (list x1 y )) (setq p4 (list x2 y )) (command "line" p1 p2 "") (command "line" p3 p4 "") ;(command "dimdiameter" d1 "") (setvar "cmdecho" 1) (princ) )
|
|