<?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 Re: Intersectwith without z-coordinate in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/intersectwith-without-z-coordinate/m-p/12434322#M6327</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You should use the IntersectWith overload which takes a projection plane as argument:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/OARX/2023/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_DatabaseServices_Entity_IntersectWith_Entity_Autodesk_AutoCAD_DatabaseServices_Intersect_Plane_Point3dCollection_IntPtr_IntPtr" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/OARX/2023/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_DatabaseServices_Entity_IntersectWith_Entity_Autodesk_AutoCAD_DatabaseServices_Intersect_Plane_Point3dCollection_IntPtr_IntPtr&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;using (var line1 = new Line(new Point3d(1, 1, 2), new Point3d(3, 3, 2)))
using (var line2 = new Line(new Point3d(1, 3, 4), new Point3d(3, 1, 4)))
{
    var points = new Point3dCollection();
    var plane = new Plane(Point3d.Origin, Vector3d.ZAxis);
    line1.IntersectWith(line2, Intersect.OnBothOperands, plane, points, IntPtr.Zero, IntPtr.Zero);
    var ed = Application.DocumentManager.MdiActiveDocument.Editor;
    foreach (Point3d point in points)
    {
        ed.WriteMessage($"\n{point}");
    }
}&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 11 Dec 2023 21:07:28 GMT</pubDate>
    <dc:creator>_gile</dc:creator>
    <dc:date>2023-12-11T21:07:28Z</dc:date>
    <item>
      <title>Intersectwith without z-coordinate</title>
      <link>https://forums.autodesk.com/t5/net-forum/intersectwith-without-z-coordinate/m-p/12434235#M6326</link>
      <description>&lt;P&gt;I know the .intersectwith method.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there and easy way to find an 'appearent intersection'. So without considering the z-values?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, There's a line from (1,1) tot (3,3) and a line form (1,3) to (3,1), they intersect at (2,2). (X,Y).&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when there's a line form (1,1,2) to (3,3,2) and a line from (1,3,4) to (3,1,4) they only SEEM to intersect at (2,2), but really don't. However is there an easy way to still find (2,2) or should I project both the lines to the same plane?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 18:07:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/intersectwith-without-z-coordinate/m-p/12434235#M6326</guid>
      <dc:creator>stefanveurink68AXD</dc:creator>
      <dc:date>2023-12-11T18:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Intersectwith without z-coordinate</title>
      <link>https://forums.autodesk.com/t5/net-forum/intersectwith-without-z-coordinate/m-p/12434322#M6327</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You should use the IntersectWith overload which takes a projection plane as argument:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/OARX/2023/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_DatabaseServices_Entity_IntersectWith_Entity_Autodesk_AutoCAD_DatabaseServices_Intersect_Plane_Point3dCollection_IntPtr_IntPtr" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/OARX/2023/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_DatabaseServices_Entity_IntersectWith_Entity_Autodesk_AutoCAD_DatabaseServices_Intersect_Plane_Point3dCollection_IntPtr_IntPtr&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;using (var line1 = new Line(new Point3d(1, 1, 2), new Point3d(3, 3, 2)))
using (var line2 = new Line(new Point3d(1, 3, 4), new Point3d(3, 1, 4)))
{
    var points = new Point3dCollection();
    var plane = new Plane(Point3d.Origin, Vector3d.ZAxis);
    line1.IntersectWith(line2, Intersect.OnBothOperands, plane, points, IntPtr.Zero, IntPtr.Zero);
    var ed = Application.DocumentManager.MdiActiveDocument.Editor;
    foreach (Point3d point in points)
    {
        ed.WriteMessage($"\n{point}");
    }
}&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 11 Dec 2023 21:07:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/intersectwith-without-z-coordinate/m-p/12434322#M6327</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2023-12-11T21:07:28Z</dc:date>
    </item>
  </channel>
</rss>

