<?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: Polyline3d intersect in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/polyline3d-intersect/m-p/1642110#M81717</link>
    <description>Dear Alexander Rivilis,&lt;BR /&gt;
&lt;BR /&gt;
I'll do that. Thank you.&lt;BR /&gt;
&lt;BR /&gt;
GS</description>
    <pubDate>Sat, 13 May 2006 06:35:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-05-13T06:35:15Z</dc:date>
    <item>
      <title>Polyline3d intersect</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline3d-intersect/m-p/1642108#M81715</link>
      <description>Hello everyone,&lt;BR /&gt;
&lt;BR /&gt;
1. How to get the intersection of 2 Polyline3d in different plane? &lt;BR /&gt;
I tried using IntersectWith() but it return no intersection because the polylines lies in different plane. &lt;BR /&gt;
2. How about Aparent Intersect? Is there anyone who can teach me how to implement this in my C# code?&lt;BR /&gt;
&lt;BR /&gt;
Thank you.&lt;BR /&gt;
&lt;BR /&gt;
GS</description>
      <pubDate>Fri, 12 May 2006 02:49:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline3d-intersect/m-p/1642108#M81715</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-05-12T02:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline3d intersect</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline3d-intersect/m-p/1642109#M81716</link>
      <description>What about create projections of those Polyline3d on single plan (with help of Polyline3d.GetProjectedCurve method)?&lt;BR /&gt;
After than you can do IntersectWith() with projections.</description>
      <pubDate>Fri, 12 May 2006 13:08:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline3d-intersect/m-p/1642109#M81716</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-05-12T13:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline3d intersect</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline3d-intersect/m-p/1642110#M81717</link>
      <description>Dear Alexander Rivilis,&lt;BR /&gt;
&lt;BR /&gt;
I'll do that. Thank you.&lt;BR /&gt;
&lt;BR /&gt;
GS</description>
      <pubDate>Sat, 13 May 2006 06:35:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline3d-intersect/m-p/1642110#M81717</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-05-13T06:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline3d intersect</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline3d-intersect/m-p/1642111#M81718</link>
      <description>Dear Alexander Rivilis,&lt;BR /&gt;
&lt;BR /&gt;
I'll appreciate if you can show me a snippet code how to do it.&lt;BR /&gt;
Thank you in advance.&lt;BR /&gt;
&lt;BR /&gt;
GS</description>
      <pubDate>Sat, 13 May 2006 06:46:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline3d-intersect/m-p/1642111#M81718</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-05-13T06:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline3d intersect</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline3d-intersect/m-p/1642112#M81719</link>
      <description>[code]&lt;BR /&gt;
using System ;&lt;BR /&gt;
using System.Collections; &lt;BR /&gt;
using Autodesk.AutoCAD.Runtime ;&lt;BR /&gt;
using Autodesk.AutoCAD.DatabaseServices;&lt;BR /&gt;
using Autodesk.AutoCAD.Geometry;&lt;BR /&gt;
using Autodesk.AutoCAD.EditorInput;&lt;BR /&gt;
using Autodesk.AutoCAD.ApplicationServices;&lt;BR /&gt;
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;&lt;BR /&gt;
&lt;BR /&gt;
[assembly: CommandClass(typeof(ClassLibrary.Class))]&lt;BR /&gt;
&lt;BR /&gt;
namespace ClassLibrary&lt;BR /&gt;
{&lt;BR /&gt;
  public class Class&lt;BR /&gt;
  {&lt;BR /&gt;
    [CommandMethod("IntPoly3d")]&lt;BR /&gt;
    static public void IntPoly3d()&lt;BR /&gt;
    {&lt;BR /&gt;
      Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;
      Polyline3d pl1 = SelectPoly3d("\nSelect first Polyline3d: ");&lt;BR /&gt;
      if (pl1 == null) return;&lt;BR /&gt;
      Polyline3d pl2 = SelectPoly3d("\nSelect second Polyline3d: ");&lt;BR /&gt;
      if (pl2 == null) return;&lt;BR /&gt;
      // We can project our plines in direction of Z axis of WCS,&lt;BR /&gt;
      // but you can use another project plane&lt;BR /&gt;
      Vector3d dir = new Vector3d(0,0,1);&lt;BR /&gt;
      Point3d orig = new Point3d (0,0,0);&lt;BR /&gt;
      // Plane of WCS&lt;BR /&gt;
      Plane planeWCS = new Plane(orig, dir);&lt;BR /&gt;
      Curve pl1_prj = pl1.GetProjectedCurve(planeWCS,dir); pl1.Dispose();&lt;BR /&gt;
      Curve pl2_prj = pl2.GetProjectedCurve(planeWCS,dir); pl2.Dispose();&lt;BR /&gt;
      Point3dCollection pts = new Point3dCollection();&lt;BR /&gt;
      pl1_prj.IntersectWith(pl2_prj,Intersect.OnBothOperands,pts,0,0);&lt;BR /&gt;
      if (pts.Count &amp;gt; 0) &lt;BR /&gt;
      {&lt;BR /&gt;
        ed.WriteMessage("\nNumber of intersection: {0}",pts.Count);&lt;BR /&gt;
        foreach (Point3d pt in pts) ed.WriteMessage("\n Point: {0}",pt);&lt;BR /&gt;
      } &lt;BR /&gt;
      else &lt;BR /&gt;
      {&lt;BR /&gt;
        ed.WriteMessage("\nNo intersection!");&lt;BR /&gt;
      }&lt;BR /&gt;
      pl1_prj.Dispose(); pl2_prj.Dispose();&lt;BR /&gt;
    }&lt;BR /&gt;
    static private Polyline3d SelectPoly3d(string str)&lt;BR /&gt;
    {&lt;BR /&gt;
      Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;
      Database db = HostApplicationServices.WorkingDatabase;&lt;BR /&gt;
      PromptEntityResult rs = ed.GetEntity(str);&lt;BR /&gt;
      if (rs.Status == PromptStatus.OK) &lt;BR /&gt;
      {&lt;BR /&gt;
        Transaction trans = db.TransactionManager.StartTransaction();&lt;BR /&gt;
        Entity ent = (Entity)trans.GetObject(rs.ObjectId, OpenMode.ForRead);&lt;BR /&gt;
        Polyline3d pl = ent as Polyline3d;&lt;BR /&gt;
        trans.Commit();&lt;BR /&gt;
        if (pl == null) ed.WriteMessage("\nIt is not Polyline3d!");&lt;BR /&gt;
        return pl;&lt;BR /&gt;
      }&lt;BR /&gt;
      return null;&lt;BR /&gt;
    }                     &lt;BR /&gt;
  }&lt;BR /&gt;
}&lt;BR /&gt;
[/code]</description>
      <pubDate>Sat, 13 May 2006 08:55:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline3d-intersect/m-p/1642112#M81719</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-05-13T08:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Polyline3d intersect</title>
      <link>https://forums.autodesk.com/t5/net-forum/polyline3d-intersect/m-p/1642113#M81720</link>
      <description>Dear Alexander Rivilis,&lt;BR /&gt;
Thank you so much to your help it helps me a lot however its my mistake that I was not able to inform you that I need also the value of Z coordinate. What should I do so that I get also get it like Apparent Intersect does?&lt;BR /&gt;
Once again thank you.&lt;BR /&gt;
&lt;BR /&gt;
GS</description>
      <pubDate>Mon, 15 May 2006 04:36:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/polyline3d-intersect/m-p/1642113#M81720</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-05-15T04:36:40Z</dc:date>
    </item>
  </channel>
</rss>

