godofcad Posted April 11, 2012 Share Posted April 11, 2012 How To Find Intersection Point Between Two Crossing LWPOLYLINES :( Find_intersections.dwg Quote Link to comment Share on other sites More sharing options...
pBe Posted April 11, 2012 Share Posted April 11, 2012 (vlax-invoke obj1 'IntersectWith obj2 acExtendNone) (inters pt1 pt2 pt3 pt4) Quote Link to comment Share on other sites More sharing options...
MSasu Posted April 11, 2012 Share Posted April 11, 2012 For more examples regarding intersection between entities you may also check Lee Mac's site. Quote Link to comment Share on other sites More sharing options...
pBe Posted April 11, 2012 Share Posted April 11, 2012 a simple example (defun c:sample ( / _inters i f ss ss2 lst) (defun _inters (ob1 sset ls / lst) (repeat (setq i (sslength sset)) (if (setq f (vlax-invoke ob1 'IntersectWith (vlax-ename->vla-object (ssname sset (setq i (1- i)))) acExtendNone) ) (setq ls (cons f ls)))) ls) (setq ss (ssget '((0 . "LWPOLYLINE"))) ss2 ss) (repeat (sslength ss) (setq lst (_inters (vlax-ename->vla-object (ssname ss 0)) ss2 lst)) (ssdel (ssname ss 0) ss) ) (foreach p lst (print p)) (princ) ) Quote Link to comment Share on other sites More sharing options...
godofcad Posted April 11, 2012 Author Share Posted April 11, 2012 yes!!! its working very good Thank u pBe :D Quote Link to comment Share on other sites More sharing options...
VVA Posted April 11, 2012 Share Posted April 11, 2012 VxGetInters - Returns all intersection points between two objects Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.