<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Unable to get Intersection point between two 3d polyline in Autocad visual lisp in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6407593#M35557</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unable to get intersection point of 3dpolylines in Autocad visual lisp/ .NET.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jun 2016 07:18:31 GMT</pubDate>
    <dc:creator>nagamalliv</dc:creator>
    <dc:date>2016-06-28T07:18:31Z</dc:date>
    <item>
      <title>Unable to get Intersection point between two 3d polyline in Autocad visual lisp</title>
      <link>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6407593#M35557</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unable to get intersection point of 3dpolylines in Autocad visual lisp/ .NET.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 07:18:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6407593#M35557</guid>
      <dc:creator>nagamalliv</dc:creator>
      <dc:date>2016-06-28T07:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get Intersection point between two 3d polyline in Autocad visual l</title>
      <link>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6409224#M35558</link>
      <description>&lt;P&gt;Maybe you show your code?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 20:24:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6409224#M35558</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2016-06-28T20:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get Intersection point between two 3d polyline in Autocad visual l</title>
      <link>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6409913#M35559</link>
      <description>&lt;P&gt;(defun GetIntersectPoints&lt;BR /&gt;(sourName destName&lt;BR /&gt;/ sourObj destObj intPnts)&lt;BR /&gt;(setq sourObj (vlax-ename-&amp;gt;vla-object sourName)&lt;BR /&gt;destObj (vlax-ename-&amp;gt;vla-object destName)&lt;BR /&gt;intPnts (vlax-invoke-method sourObj 'intersectwith destObj acExtendThisentity)&lt;BR /&gt;);setq&lt;/P&gt;&lt;P&gt;(mapcar 'vlax-release-object (list sourObj destObj))&lt;BR /&gt;(setq intPnts (vlax-variant-value intPnts))&lt;BR /&gt;(if (/= (vlax-safearray-get-u-bound intPnts 1) -1)&lt;BR /&gt;(progn&lt;BR /&gt;(setq rawPoints (vlax-safearray-&amp;gt;list intPnts)&lt;BR /&gt;coordInc 0&lt;BR /&gt;coordLen (length rawPoints)&lt;BR /&gt;intPnts '()&lt;BR /&gt;);setq&lt;/P&gt;&lt;P&gt;(while (&amp;lt; coordInc (- coordLen 2))&lt;BR /&gt;(setq intPnts (append intPnts (list (list (nth coordInc rawPoints) (nth (1+ coordInc) rawPoints))))&lt;BR /&gt;coordInc (+ coordInc 3)&lt;BR /&gt;);setq&lt;BR /&gt;);while&lt;/P&gt;&lt;P&gt;intPnts&lt;BR /&gt;);progn&lt;BR /&gt;nil&lt;BR /&gt;);if&lt;BR /&gt;);defun&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 06:43:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6409913#M35559</guid>
      <dc:creator>nagamalliv</dc:creator>
      <dc:date>2016-06-29T06:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get Intersection point between two 3d polyline in Autocad visual l</title>
      <link>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6409981#M35560</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The LISP code you posted works if the polylines 3d (or whatever kind of curves) do intersect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you sure the polyline 3d you use for testing are truely intersecting?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 07:33:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6409981#M35560</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2016-06-29T07:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get Intersection point between two 3d polyline in Autocad visual l</title>
      <link>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6409988#M35561</link>
      <description>&lt;P&gt;In top view 3d polylines intersecting.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 07:36:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6409988#M35561</guid>
      <dc:creator>nagamalliv</dc:creator>
      <dc:date>2016-06-29T07:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get Intersection point between two 3d polyline in Autocad visual l</title>
      <link>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6410051#M35562</link>
      <description>&lt;P&gt;IntersectWith method do not return projected intersections.&lt;/P&gt;
&lt;P&gt;If you want to get projected intersections, you have to "project" the polyline 3d segment onto the XY plane (i.e. convert 3d points into 2d points) before looking for intersections.&lt;/P&gt;
&lt;P&gt;Here's an AutoLISP example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun GetProjectIntersection (sourceName destName /
                               ;; sub functions
                               getProjectVertices getProjectedSegments
                               ;; local variables
                               sourceSegments destSegments intersPoint intersPoints)

  (defun getVertices (poly3d / elst points)
    (setq elst (entget (entnext poly3d)))
    (while (= "VERTEX" (cdr (assoc 0 elst)))
      (setq points  (cons (cdr (assoc 10 elst)) points)
            elst (entget (entnext (cdr (assoc -1 elst))))
      )
    )
    (reverse points)
  )

  (defun getProjectedSegments (vertices)
    (mapcar
      '(lambda (p1 p2)
         (list (list (car p1) (cadr p1)) (list (car p2) (cadr p2)))
       )
      vertices
      (cdr vertices)
    )
  )

  (setq sourceSegments (getProjectedSegments (getVertices sourceName))
        destSegments   (getProjectedSegments (getVertices destName))
  )
  (foreach sourceSegment sourceSegments
    (foreach destSegment destSegments
      (if (setq intersPoint
                 (inters (car sourceSegment)
                         (cadr sourceSegment)
                         (car destSegment)
                         (cadr destSegment)
                 )
          )
        (setq intersPoints (cons intersPoint intersPoints))
      )
    )
  )
  (reverse intersPoints)
)&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Jun 2016 08:28:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6410051#M35562</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2016-06-29T08:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get Intersection point between two 3d polyline in Autocad visual l</title>
      <link>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6410092#M35563</link>
      <description>&lt;P&gt;Working,Thank you so much&amp;nbsp;&lt;SPAN&gt;Gilles Chanteau.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 08:52:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6410092#M35563</guid>
      <dc:creator>nagamalliv</dc:creator>
      <dc:date>2016-06-29T08:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get Intersection point between two 3d polyline in Autocad visual l</title>
      <link>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6410096#M35564</link>
      <description>&lt;P&gt;Now i have another problem with &lt;STRONG&gt;vlax-curve-getclosestpointto&lt;/STRONG&gt; function not working for 3d polyline&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 08:54:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6410096#M35564</guid>
      <dc:creator>nagamalliv</dc:creator>
      <dc:date>2016-06-29T08:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get Intersection point between two 3d polyline in Autocad visual l</title>
      <link>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6410241#M35565</link>
      <description>&lt;P&gt;If vlax-curve-getclosestpointto function doen't work as you expect (IMO, it works as described in the documentation), you can have a look to &lt;A href="http://help.autodesk.com/view/ACD/2017/FRA/?guid=GUID-23A1B8CE-9FF5-482C-AF32-3EE48784B905" target="_blank"&gt;&lt;STRONG&gt;vlax-curveGetClosestPointToProjection&lt;/STRONG&gt;&lt;/A&gt; as it seems to me you need 2d behavior with a 3d entity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS: you should have posted in the &lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bd-p/130" target="_blank"&gt;LISP forum&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 10:53:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/unable-to-get-intersection-point-between-two-3d-polyline-in/m-p/6410241#M35565</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2016-06-29T10:53:34Z</dc:date>
    </item>
  </channel>
</rss>

