明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1063|回复: 1

[基础] 这个程序出图的时候为什么没有我要的P11和P12的连线

[复制链接]
发表于 2011-4-29 13:11:23 | 显示全部楼层 |阅读模式
这个程序出图的时候为什么没有我要的P11和P12的连线,请高手给检查一下
(defun c:sl(/ l1 l2 l3 l4 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 )
(setq l2(getdist"\n输入内侧宽度"))
(setq l1(getdist"\n输入外侧宽度"))
(setq l3(getdist"\n输入长度"))
(setq p0(getpoint"\n输入起始点"))
(setq p1(polar p0 0 l3))
(setq p6(polar p1 (/ pi 2) l1))
(setq p7(polar p1 (/ pi 2) (/ l1 2)))
(setq p8(polar p1 (/ (- pi) 2) (/ l1 2)))
(setq p9(polar p1 (/ (- pi) 2) l1))
(setq p2(polar p6 (/ (* 7 pi) 6) (* (/ (*(sqrt 3) 2) 3) l3)))
(setq p3(polar p0 (/ pi 2) (/ (- l1 (/ (* (sqrt 3) l3) 3)) 2)))
(setq p5(polar p9 (/ (* 5 pi) 6) (* (/ (*(sqrt 3) 2) 3) l3)))
(setq p4(polar p0 (/ (- pi) 2) (/ (- l1 (/ (* (sqrt 3) l3) 3)) 2)))
(setq p10(polar p0 (- pi) (*(sqrt 3)(- l1(*(/(sqrt 3)3)l3)))))
(setq p11(polar p2 (/ (* 7 pi) 6) ( * 2 (- l1 l2 (/(*(sqrt 3)l3)3)))))
(setq p12(polar p5 (/ (* 5 pi) 6) ( * 2 (- l1 l2 (/(*(sqrt 3)l3)3)))))
(command "pline" p2 p3 p7 p6 "c");
(command "pline" p4 p5 p9 p8 "c");
(command "line" p4 p0 p3 "");
(command "line" p0 p1 "");
(command "line" p7 p1 p8  "");
(command "line" p3 p10 p4 "");
(command "line" p2 p11 p12 p5 "")
(princ);
)
发表于 2011-4-29 13:32:39 | 显示全部楼层
Check your OsMode
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2025-6-10 13:23 , Processed in 0.157822 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表