不确定你的图是否有极端情况
试试下面方法
多边形往内偏0.01,生成新图元名,然后曲线转 90度后与新图元交点,即为bo的两点- 两对象交点
- ;; mode:acExtendNone,acExtendThisEntity,acExtendOtherEntity,acExtendBoth
- (defun All-intersectwith (obj1 obj2 mode / INT IPLIST)
- (defun list->3pair (old / new)
- (while (setq new (cons (list (car old) (cadr old) (caddr old)) new)
- old (cdddr old)
- )
- )
- (reverse new)
- )
- (setq int (vla-IntersectWith (vlax-ename->vla-object obj1) (vlax-ename->vla-object obj2) mode))
- (setq iplist (vl-catch-all-apply
- 'vlax-safearray->list
- (list (vlax-variant-value int))
- )
- )
- (if (vl-catch-all-error-p iplist)
- nil
- (list->3pair iplist)
- )
- )
|