一个entmakex用于多个点
大家好。如何使用一个Entmakex为多个点绘制线。。。
实例
(if (and (setq p1 (getpoint "\n Specify first Point :"))
(setq p2 (getpoint "\n Specify second point :"))
(setq p3 (getpoint "\n Specify third point :"))
(setq p4 (getpoint "\n Specify forth point :"))
)
(entmakex (list (cons 0 "LINE")
(cons 10 p1)
(cons 11 p2)
;(cons 10 p2)
;(cons 11 p3)
;(cons 10 p3)
;(cons 11 p4)
)
)
)
或者我应该重复同一个entmakex三次来画这些线吗?
感谢您提前提供的帮助。
(setq i 0
lst nil
) ;_ end of setq
(while (setq
pt (getpoint
(strcat "\n Specify point № " (itoa (setq i (1+ i))) " : ")
) ;_ end of getpoint
) ;_ end of setq
(setq lst (cons pt lst))
) ;_ end of while
(mapcar '(lambda (p1 p2)
(entmakex (list (cons 0 "LINE")
(cons 10 p1)
(cons 11 p2)
) ;_ end of list
) ;_ end of entmakex
) ;_ end of lambda
lst
(cdr lst)
) ;_ end of mapcar
你好
不幸的是,Entmake dosen不支持一次创建多个对象。在上述示例中,您必须使用entmake 3times int
拾取的点数是固定的还是会变化? http://www.cadtutor.net/forum/showthread.php?51628-entmake CONTINUSE line example&p=350070&viewfull=1#POST35070 这是一个很好的例子。
谢谢大家。感谢
页:
[1]