各位老师好,新手遇到问题,请老师指导
我的思路是:绘制一个多点闭合多段线,向外偏移该多段线求得第二条多段线,拉伸绘制的第一条多段线一定高度h1,把偏移得到的第二条多段线的标高改成h1高度。(defun c:tt ()
(setq h1(getdist "\n 输入高度:")
d(getdist "\n 输入偏移距离:")
)
(command "pline")
(while (= (logand (getvar "CmdActive") 1) 1) (command pause))
(setq xx (entlast))
(command pause)
(vl-cmdf "offset" xx d "" "")
(setq yy (entlast))
(command "_.MOVE" yy "L" "" '(0 0 0) (list 0 0 h1))
(vl-cmdf "extrude" xx "" h "")
)
请老师给看看该段代码中的遗漏处,给予指导,学生谢谢老师了。。。。。
(defun c:tt ()
(setq h1 (Udist 7 "" "拉伸高度<输入或鼠标直接量取>" h1 nil)
dd (Udist 7 "" "偏移距离<输入或鼠标直接量取>" dd nil)
)
(command "pline")
(while (/= (getvar "CmdActive") 0)
(command pause)
)
(setq xx (entlast))
(xyp-Offset xx dd t nil nil)
(setq yy (entlast))
(command "_.MOVE" yy "L" "" '(0 0 0) (list 0 0 h1))
(vl-cmdf "extrude" xx "" h1 "")
) (defun c:tt ()
(setq h1 (getdist "\n输入高度: ")
d (getdist "\n输入偏移距离: "))
(command "_.3DPOLY")
(while (> (getvar "CMDACTIVE") 0) (command pause))
(setq xx (entlast))
(vl-cmdf "_.OFFSET" d xx pause "")
(setq yy (entlast))
(command "_.MOVE" yy "" '(0 0 0) (list 0 0 h1))
(vl-cmdf "_.EXTRUDE" xx "" h)
(princ)
)
ZZXXQQ 发表于 2014-7-23 20:10 static/image/common/back.gif
你好老师你的代码测试不成功 就能画线其他的命令都没有实现 谢谢老师了 xyp1964 发表于 2014-7-23 19:13 static/image/common/back.gif
你好院长老师 你这个代码 和我上面的得到的结果是一样的偏移没有实现谢谢老师 杜阳 发表于 2014-7-23 21:15 static/image/common/back.gif
你好院长老师 你这个代码 和我上面的得到的结果是一样的偏移没有实现谢谢老师
偏移有方向,你要向哪个方向偏呢? ZZXXQQ 发表于 2014-7-24 08:00 static/image/common/back.gif
偏移有方向,你要向哪个方向偏呢?
谢谢老师 我自己解决了谢谢老师 ZZXXQQ 发表于 2014-7-23 20:10 static/image/common/back.gif
师傅我不懂得放弃是什么 谢谢你那么高的智商 一直让我来放弃 xyp1964 发表于 2014-7-23 19:13 static/image/common/back.gif
师傅我不懂得放弃是什么 谢谢你那么高的智商 一直让我来放弃
页:
[1]