<?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: Any method to check if polyline is crossing an entity that belongs to a different layer? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12586239#M5412</link>
    <description>&lt;P&gt;Note that solutions which iterate through each entity in source and target set will lead to long run times when lots of entities are present.&lt;/P&gt;&lt;P&gt;The solution to this is first generate bounding boxes for each item, then sort the target boxes by starting X coord and ending X coord. Then use that to figure the set of items between that for a given source item.&lt;/P&gt;&lt;P&gt;That allows you to cut out many items for the expensive actual intersect step, which you must do eventually.&lt;/P&gt;&lt;P&gt;That is paraphrasing, it takes time to set up such programs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do TIN surface programs, and you do a similar thing with tri bounding boxes, but you make a "tree" structure called a k-d tree. Then you can use that for certain things. This is all computational geometry and speeds things up to almost instant. Its fun but very detailed.&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Feb 2024 18:40:38 GMT</pubDate>
    <dc:creator>JamesMaeding</dc:creator>
    <dc:date>2024-02-27T18:40:38Z</dc:date>
    <item>
      <title>Any method to check if polyline is crossing an entity that belongs to a different layer?</title>
      <link>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12570582#M5405</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am looking for any method that can help me to identify that in 2d drawing at different points if our polyline is crossing the entities that belong to different layers and add a small markup at those points or a symbol to highlight it. Please suggest any methods that I can use using c#&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 07:04:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12570582#M5405</guid>
      <dc:creator>goswami12897</dc:creator>
      <dc:date>2024-02-20T07:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Any method to check if polyline is crossing an entity that belongs to a different layer?</title>
      <link>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12570631#M5406</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13116392"&gt;@goswami12897&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;there is nothing in the API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a crude idea would be to&amp;nbsp;&lt;/P&gt;&lt;P&gt;determine the bounding box of the polyline,&lt;/P&gt;&lt;P&gt;select all entities that are in or pass through that bounding box,&lt;/P&gt;&lt;P&gt;iterate the selection ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; if the layer is the same, ignore,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; else test for intersections with the pline, and save the points,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; iterate the points list and add your marker of choice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 07:28:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12570631#M5406</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2024-02-20T07:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Any method to check if polyline is crossing an entity that belongs to a different layer?</title>
      <link>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12570913#M5407</link>
      <description>&lt;P&gt;Make Point3dCollection (pcoll) from pline by pline.GetPoint3dAtt()&lt;/P&gt;&lt;P&gt;var objectids = ed.SelectFence(pcoll).Value.GetObjectIds();&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 09:59:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12570913#M5407</guid>
      <dc:creator>cuongtk2</dc:creator>
      <dc:date>2024-02-20T09:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Any method to check if polyline is crossing an entity that belongs to a different layer?</title>
      <link>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12575540#M5408</link>
      <description>&lt;P&gt;Thanks a lot it worked wonderfully for me after adding points at first and last vertex of polyline and then looking for objectids thanks a lot, is there anyway through which if entity is a hatch I can look for a point in that hatch too if it cuts the polyline?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 08:52:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12575540#M5408</guid>
      <dc:creator>goswami12897</dc:creator>
      <dc:date>2024-02-22T08:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Any method to check if polyline is crossing an entity that belongs to a different layer?</title>
      <link>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12577502#M5409</link>
      <description>&lt;P&gt;from 0 to hatch.NumberOfLoops&lt;/P&gt;&lt;P&gt;BulgeVertexCollection bvc = hatch.GetLoopAt(0).Polyline;&lt;BR /&gt;// Make new closed pline from bvc =&amp;gt; pline1&lt;/P&gt;&lt;P&gt;Point3dCollection pcl = new Point3dCollection();&lt;BR /&gt;pline.IntersectWith(pline1, Intersect.ExtendThis, pcl, IntPtr.Zero, IntPtr.Zero);&lt;BR /&gt;ed.WriteMessage(pcl.Count.ToString());&lt;BR /&gt;// pline1.Dipose()&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 01:53:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12577502#M5409</guid>
      <dc:creator>cuongtk2</dc:creator>
      <dc:date>2024-02-23T01:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Any method to check if polyline is crossing an entity that belongs to a different layer?</title>
      <link>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12577662#M5410</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6638420"&gt;@cuongtk2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6638420"&gt;@cuongtk2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Make Point3dCollection (pcoll) from pline by pline.GetPoint3dAtt()&lt;/P&gt;&lt;P&gt;var objectids = ed.SelectFence(pcoll).Value.GetObjectIds();&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;nice solution,&lt;/P&gt;&lt;P&gt;but there may be some edge case errors in the case of polyline arc segments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 05:01:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12577662#M5410</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2024-02-23T05:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Any method to check if polyline is crossing an entity that belongs to a different layer?</title>
      <link>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12577937#M5411</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;Yes, that's entirely possible. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;You can check GetBulgeAt(i) /= 0 and add Point with a factor of 1..n &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;GetPointAtParam(i+1/n)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 08:59:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12577937#M5411</guid>
      <dc:creator>cuongtk2</dc:creator>
      <dc:date>2024-02-23T08:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Any method to check if polyline is crossing an entity that belongs to a different layer?</title>
      <link>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12586239#M5412</link>
      <description>&lt;P&gt;Note that solutions which iterate through each entity in source and target set will lead to long run times when lots of entities are present.&lt;/P&gt;&lt;P&gt;The solution to this is first generate bounding boxes for each item, then sort the target boxes by starting X coord and ending X coord. Then use that to figure the set of items between that for a given source item.&lt;/P&gt;&lt;P&gt;That allows you to cut out many items for the expensive actual intersect step, which you must do eventually.&lt;/P&gt;&lt;P&gt;That is paraphrasing, it takes time to set up such programs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do TIN surface programs, and you do a similar thing with tri bounding boxes, but you make a "tree" structure called a k-d tree. Then you can use that for certain things. This is all computational geometry and speeds things up to almost instant. Its fun but very detailed.&lt;/P&gt;&lt;P&gt;thx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 18:40:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12586239#M5412</guid>
      <dc:creator>JamesMaeding</dc:creator>
      <dc:date>2024-02-27T18:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Any method to check if polyline is crossing an entity that belongs to a different layer?</title>
      <link>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12678441#M5413</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6638420"&gt;@cuongtk2&lt;/a&gt;&amp;nbsp;thanks most of the things worked out but I am not able to understand how to make a polyline from bulgevertexcollection? will you elaborate?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 10:47:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/any-method-to-check-if-polyline-is-crossing-an-entity-that/m-p/12678441#M5413</guid>
      <dc:creator>goswami12897</dc:creator>
      <dc:date>2024-04-01T10:47:33Z</dc:date>
    </item>
  </channel>
</rss>

