几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(AutoLISP) (http://www.dimcax.com/hust/forumdisplay.php?f=178)
-   -   一个画节点板的程序,谁能帮我优化一下 (http://www.dimcax.com/hust/showthread.php?t=11481)

yang686526 2009-04-26 04:09 PM

一个画节点板的程序,谁能帮我优化一下
 
一个画节点板的程序,谁能帮我优化一下
www.dimcax.com
一个画节点板的程序,谁能帮我优化一下
这是一个画节点板的程序,谁能帮我优化一下,
它的精度不够,还有各个参数没有初始值或者是上一次输入的默认值
(
defun c:123() (/ jd jd1 zuo you gao xian r a b c d);画节点板
(setvar "cmdecho" 0)
(setq jd (getpoint "\n 请点取基点"))
(setq zuo (getdist jd "\n左点距离:"))
(setq you (getdist jd "\n右点距离:"))
(setq gao (getdist jd "\n节点板高:"))
(setq r (getangle jd "\n板件角度:"))
(setq xian (getdist jd "\n弦杆高:"))
(setq jd1 (polar jd (+ (* pi 1.5) r) (/ xian 2)))
(setq a (polar jd1 (+ pi r) zuo))
(setq d (polar jd1 r you))
(setq b (polar a (+ (* pi 1.5) r) gao))
(setq c (polar d (+ (* pi 1.5) r) gao))
(command "line" a b c d "")
(princ)
)
d


所有的时间均为北京时间。 现在的时间是 03:31 AM.