两曲线的交点,可由intersectwith方法得到,但不只何故有交点漏掉。 (defun lf_entinters (e1 e2 k / lst lst2) (setq lst (vlax-invoke (vlax-ename->vla-object e1) 'intersectwith (vlax-ename->vla-object e2) k ) ) (IF lst (repeat (/ (length lst) 3) (setq lst2 (cons (list (car lst) (cadr lst) (caddr lst)) lst2) lst (cdddr lst) ) ) ) (reverse lst2) ) ;;k的取值 ;;acExtendNone : 0, Does not extend either object. ;;acExtendThisEntity : 1, Extends the base object. ;;acExtendOtherEntity : 2, Extends the object passed as an argument. ;;acExtendBoth : 3,Extends both objects
(defun c:ttt () (lf_entinters (car (entsel))(car (entsel)) 0) )
|