Jump to content

How To Find Intersection Point Between Two Crossing LWPOLYLINES


Recommended Posts

Posted

 
(vlax-invoke obj1 'IntersectWith  obj2 acExtendNone)

 

 
(inters pt1 pt2 pt3 pt4)

Posted

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)
     )

Posted

yes!!! its working very good

 

Thank u pBe

 

:D :D :D

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...