事实上,它确实显示了一个奇数形状的多边形,我试图根据第一篇文章中的描述编写代码(假设存在等圆)
- (defun c:sample (/ objell sides seg seg2 pts)
- (vl-load-com)
- (setq objell (car (entsel)))
- (setq sides (getint "\nEnter number of sides"))
- (setq seg (/ (vlax-curve-getdistatparam
- objell
- (vlax-curve-getendparam objell)
- )
- sides
- ) seg2 0.0
- )
- (repeat sides
- (setq
- pts
- (cons (vlax-curve-getpointatdist objell (+ seg seg2)) pts)
- )
- (setq seg2 (+ seg seg2))
- )
- (command "_Pline" "_non")
- (foreach pt (cons (last pts) pts) (command pt))
- (command)
- (entdel objell)
- (princ)
- )
我猜这个帖子和OP在另一个论坛上的帖子有关。创建面向上/左/右的等圆
http://www.theswamp.org/index.php?topic=42737.0 |