Costinbos,
interwith方法有3种不同的模式。
acExtendBoth会给你一个明显的交点。
请看以下由AlanJT修改的例程:
- ;;****************************************************************************;
- ;; Modified from a routine by AlanJT ;
- ;; Return list of intersection(s) between two objects ;
- ;; obj1 - first VLA-Object ;
- ;; obj2 - second VLA-Object ;
- ;; mode - intersection mode (acExtendNone acExtendThisEntity ;
- ;; acExtendOtherEntity acExtendBoth) ;
- ;;****************************************************************************;
-
- (defun Intersections (obj1 obj2 mode)
- (defun tupl3 (l) (if l (cons (list (car l) (cadr l) (caddr l))(tupl3 (cdddr l)))))
- (tupl3 (vlax-invoke obj1 'intersectwith obj2 mode))
- )
|