发布于:2011-03-07 00:12:07
来自:建筑设计/CAD下载及教程
[复制转发]
(defun c:pbox()
;以下数字需要输入
(setq pa (getpoint "输入左下角点:"))
(setq ww (getreal "宽度:"))
(setq hh (getreal "高度:"))
;以下又程序计算得出
(setq pb (polar pa 0 ww))
(setq pc (polar pb (/ pi 2) hh))
(setq pd (polar pc pi ww))
;以下依据PA等画矩形
(command "pline" pa pb pc pd "c")
;以下MP1等有程序依据 pa,ww,hh
(setq mp1 (polar pa 0 (/ ww 2)))
(setq mp2 (polar pb (/ p1 2) (/ hh 2)))
(setq mp3 (polar pd 0 (/ ww 2)))
(setq mp4 (polar pa (/pi 2) (/ hh 2)))
(command "line" mp1 mp3 "")
(command "line" mp2 mp4 "")
)
全部回复(2 )
只看楼主 我来说两句抢地板回复 举报
(setq ww (getreal "宽度:"))
)采用了半角和全角
回复 举报