;;说明:获取两个对象交点;;参数:ent1:图元1;;参数:ent2:图元2;;返回:有交点则返回交点列表,没有交点则返回nil(defun InterWithPt(ent1 ent2 / bf-list-split-3d var) ;;;name:BF-list-split-3d ;;;desc:列表按顺序切分为3元素表组成的表,不足部分用nil表示 ;;;arg:lst:列表 ;;;return:((x x x )(x x x)...) ;;;example:(BF-list-split-3d '(1 2 3 4)) (defun BF-list-split-3d (lst) (if lst (cons (list (car lst) (cadr lst) (caddr lst) ) (BF-list-split-3d (cdddr lst)) ) ) ) (if (> (vlax-safearray-get-u-bound (setq var (vlax-variant-value (vla-IntersectWith (vlax-ename->vla-object ent1) (vlax-ename->vla-object ent2) acExtendNone) ) ) 1 ) 1 ) (BF-list-split-3d (vlax-safearray->list var)) nil ))