只需一步,快速开始
5
(defun c:5test3 () (setq a1 (getpoint "\n输入插入点:")) (setq w1 (getreal "\n输入w1长:")) (setq w2 (getreal "\n输入w2长:")) (setq a (getreal "\n输入a长角度:")) (setq b (getreal "\n输入b长:")) (setq d (getreal "\n输入d长:")) (setq pt1 (polar a1 (* 1.5 pi)(* 0.5 b ))) (setq pt2 (polar pt1 0 w2)) (setq pt3 (polar pt2 0 b)) (setq pt4 (polar pt3 pi w2)) (setq n (/ (w1 (cos a))) (setq n1 (sqrt(-(*n n)(*w1 w1)))) (setq pt5 (polar pt4 (* 0.5 pi)n1)) (setq pt6 (polar pt5 (*(- 90 a)(/180 pi)n))) (setq pt7 (polar pt6 (*1.5 pi) d)) (setq pt8 (polar pt1 (*1.5 pi) n1)) (command "line" pt1 pt2 pt3 pt4 pt5 pt6 pt7 pt8"c")(prin1))
您需要 登录 才可以下载或查看,没有账号?注册
使用道具 举报
粗略地看了一下,问题还是比较多的.
1.(/ (w1 (cos a)))应该为(/ w1 (cos a));
2.诸如此类*(- 90 a)(/180 pi)n)))都不符合语法格式:
应改为* (- 90 a) (/ 180 pi) n),该有的空格绝对不能省;
3. 这一句polar pt5 (*(- 90 a)(/180 pi)n))
少了参数,应改为polar pt5 (* (- 90 a) (/ 180 pi)) n);
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 ) ©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途
GMT+8, 2024-5-12 04:56 , Processed in 0.134104 second(s), 25 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.