明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1599|回复: 2

[求助]高手帮我找错,谢谢

[复制链接]
发表于 2004-12-19 20:07:00 | 显示全部楼层 |阅读模式
(defun C:lz ()
(setq a (getpoint "\n折断线起始点:"))
(setq b (getpoint a "\n折断线终点:"))
(setq x1 (car a))
(setq y1 (cadr a))
(setq x2 (car b))
(setq y2 (cadr b))
(setq mx (/ (+ x1 x2) 2))
(setq my (/ (+ y1 y2) 2))
(setq p0 '(mx my)) ;;;此处要设定p0点,其坐标为,(mx my)应该怎么写函数呀? (setq o1 (atan (- y2 y1) (- x2 x1)))
(setq p2 (polar p0 (+ (/ (* pi 7) 12) o1) 180))
(setq p1 (polar p2 (+ (/ (* pi 5) 12) o1) 180))
(setq p3 (polar p0 (+ (/ (* pi 19) 12) o1) 180))
(setq p4 (polar p3 (+ (/ (* pi 17) 12) o1) 180))
(command "pline" a p1 p2 p3 p4 b "")
(princ)
)
发表于 2004-12-19 21:06:00 | 显示全部楼层
(list mx my)
 楼主| 发表于 2004-12-19 21:33:00 | 显示全部楼层
衷心谢谢楼上的,让我学了一招,一朵鲜花,礼轻情重。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-30 00:28 , Processed in 0.157053 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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