<?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: Intersection and Bounding box in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7120844#M31205</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;In our application we are using a closed polyline in the form of rectangles to detect objects that may be enclosed within the rectangle.&amp;nbsp; In addition to enclose, we also want to detect intersection with the polyline using other objects.&amp;nbsp; We are using the function Obj.BoundingBoxIntersectWith(2ndObj, Intersect.ExtendBoth, intersectionPts, new IntPtr(0), new IntPtr(0)); to accomplish this goal, but there seems to be issues with the function picking up objects outside of the closed polyline.&amp;nbsp; Any ideas what could cause this issue?&amp;nbsp; Is there a better to detect objects within a closed polyline?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The bounding boxes of two objects can intersect even if the objects themselves don't actually intersect. &amp;nbsp;Is that what you mean? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bounding box intersection is typically used for trivial-rejection of potential candidates. IOW, if the bounding boxes of two objects &lt;EM&gt;do not&lt;/EM&gt; intersect, then the two objects do not intersect either. So, you can use BoundingBoxIntersectWith() to more-efficiently disqualify&amp;nbsp;objects before resorting to more expensive computations (such as IntersectWith).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, your process might first use BoundingBoxIntersectWith() on two objects, and if there is no intersection, you can assume the two objects don't intersect. Otherwise, you would then use IntersectWith() to compute the actual intersections..&lt;/P&gt;</description>
    <pubDate>Wed, 31 May 2017 21:29:16 GMT</pubDate>
    <dc:creator>ActivistInvestor</dc:creator>
    <dc:date>2017-05-31T21:29:16Z</dc:date>
    <item>
      <title>Intersection and Bounding box</title>
      <link>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7120583#M31204</link>
      <description>&lt;P&gt;In our application we are using a closed polyline in the form of rectangles to detect objects that may be enclosed within the rectangle.&amp;nbsp; In addition to enclose, we also want to detect intersection with the polyline using other objects.&amp;nbsp; We are using the function Obj.BoundingBoxIntersectWith(2ndObj, Intersect.ExtendBoth, intersectionPts, new IntPtr(0), new IntPtr(0)); to accomplish this goal, but there seems to be issues with the function picking up objects outside of the closed polyline.&amp;nbsp; Any ideas what could cause this issue?&amp;nbsp; Is there a better to detect objects within a closed polyline?&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 19:10:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7120583#M31204</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-31T19:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection and Bounding box</title>
      <link>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7120844#M31205</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;In our application we are using a closed polyline in the form of rectangles to detect objects that may be enclosed within the rectangle.&amp;nbsp; In addition to enclose, we also want to detect intersection with the polyline using other objects.&amp;nbsp; We are using the function Obj.BoundingBoxIntersectWith(2ndObj, Intersect.ExtendBoth, intersectionPts, new IntPtr(0), new IntPtr(0)); to accomplish this goal, but there seems to be issues with the function picking up objects outside of the closed polyline.&amp;nbsp; Any ideas what could cause this issue?&amp;nbsp; Is there a better to detect objects within a closed polyline?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The bounding boxes of two objects can intersect even if the objects themselves don't actually intersect. &amp;nbsp;Is that what you mean? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bounding box intersection is typically used for trivial-rejection of potential candidates. IOW, if the bounding boxes of two objects &lt;EM&gt;do not&lt;/EM&gt; intersect, then the two objects do not intersect either. So, you can use BoundingBoxIntersectWith() to more-efficiently disqualify&amp;nbsp;objects before resorting to more expensive computations (such as IntersectWith).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, your process might first use BoundingBoxIntersectWith() on two objects, and if there is no intersection, you can assume the two objects don't intersect. Otherwise, you would then use IntersectWith() to compute the actual intersections..&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 21:29:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7120844#M31205</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-05-31T21:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection and Bounding box</title>
      <link>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7121104#M31206</link>
      <description>&lt;P&gt;My suggest it to make sure you are using the correct Intersect enumeration. My understanding of the:&amp;nbsp;&lt;SPAN&gt;Intersect.ExtendBoth enumeration is that, if a line that is &lt;EM&gt;outside&lt;/EM&gt; the box is extended, then it will be picked up as an intersection if it intersects with the bounding box.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;There are other enumerations, choose the: Intersect.OnBothOperands enumeration and it will only pick up direct intersections with the boudning box:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;try this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Obj.BoundingBoxIntersectWith(2ndObj, Intersect.OnBothOperands, intersectionPts, new IntPtr(0), new IntPtr(0));&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Jun 2017 00:34:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7121104#M31206</guid>
      <dc:creator>BKSpurgeon</dc:creator>
      <dc:date>2017-06-01T00:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection and Bounding box</title>
      <link>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7123045#M31207</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ...Obj.BoundingBoxIntersectWith(2ndObj, Intersect.ExtendBoth, intersectionPts, new IntPtr(0), new IntPtr(0))...&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Sorry, I didn't notice that you were using Intersect.ExtendBoth, as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3011731"&gt;@BKSpurgeon&lt;/a&gt;&amp;nbsp;rightly pointed out, and&amp;nbsp;that makes a big difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should use Intersect.OnBothOperands for that argument.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 16:58:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7123045#M31207</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-06-01T16:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection and Bounding box</title>
      <link>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7123553#M31208</link>
      <description>&lt;P&gt;Is there a way to prevent an extended line outside the bounding box from pick up as an intersection while using the Intersect.ExtendBoth argument?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 19:56:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7123553#M31208</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-01T19:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection and Bounding box</title>
      <link>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7123653#M31209</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;Is there a way to prevent an extended line outside the bounding box from pick up as an intersection while using the Intersect.ExtendBoth argument?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;No, I don't believe there is.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 20:35:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7123653#M31209</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-06-01T20:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection and Bounding box</title>
      <link>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7123928#M31210</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="extendWithBoth.png" style="width: 640px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/362658iECCBFA0FFC18153B/image-size/large?v=v2&amp;amp;px=999" role="button" title="extendWithBoth.png" alt="extendWithBoth.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 22:26:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/intersection-and-bounding-box/m-p/7123928#M31210</guid>
      <dc:creator>BKSpurgeon</dc:creator>
      <dc:date>2017-06-01T22:26:02Z</dc:date>
    </item>
  </channel>
</rss>

