马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
一个死不瞑目的问题??help
===》》》
- ;mline
- (defun chengs_mline (p1 p2 w / angr r1 r2 w2 p21 p22 p31 p32 ln2 ln3)
- (setq
- angr (angle p1 p2)
- r1 (+ angr (/ pi 2))
- r2 (- angr (/ pi 2))
- w2 (/ w 2)
- p21 (polar p1 r1 w2)
- p22 (polar p2 r1 w2)
- p31 (polar p1 r2 w2)
- p32 (polar p2 r2 w2)
- )
- (command "line" p21 p22 "")
- (setq ln2 (entlast))
- (command "line" p31 p32 "")
- (setq ln3 (entlast))
- (list ln2 ln3)
- );end chengs_mline
- (defun c:test ( / p1 p2)
- (setq p1 (getpoint "\nselect point1:"))
- (while (setq p2 (getpoint p1 "\nselect point2"))
- (if p2 (chengs_mline p1 p2 200))
- (setq p1 p2)
- )
- (princ)
- )
《《《===
为什么在CAD里执行test很难得到正确的结果
而chengs_mline函数并没有错。
如果修改test====>>>
- (defun c:test2 ( / p1 p2)
- (setq p1 (getpoint "\nselect point1:"))
- (while (setq p2 (getpoint p1 "\nselect point2"))
- (if p2
- (progn
- (command "zoom" p1 p2)
- (chengs_mline p1 p2 200)
- (command "zoom" "p")
- (setq p1 p2)
- )
- )endif
- );endwhile
- (princ)
- )
<<<<====
修改后的test2却是正确的!!!!!!!!1
help!!!!!!!!!!!!!!!!!
拜托各位大侠帮我分析分析!
thank all |