<?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: Determine if entity is outside clip boundary in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/determine-if-entity-is-outside-clip-boundary/m-p/7653384#M28624</link>
    <description>&lt;P&gt;Thanks, I will look at these, hope I can get the idea.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Dec 2017 00:01:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-12-29T00:01:02Z</dc:date>
    <item>
      <title>Determine if entity is outside clip boundary</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-if-entity-is-outside-clip-boundary/m-p/7617957#M28620</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If anyone know how to determine if an entity in a clipped block reference is outside clip boundary that mean they are not shown in drawing? The inverted clip boundary maybe ignored.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 18:45:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-if-entity-is-outside-clip-boundary/m-p/7617957#M28620</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-12T18:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Determine if entity is outside clip boundary</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-if-entity-is-outside-clip-boundary/m-p/7618091#M28621</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If anyone know how to determine if an entity in a clipped block reference is outside clip boundary that mean they are not shown in drawing? The inverted clip boundary maybe ignored.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Unfortunately, that is not a simple problem to solve. The clipping happens at the primitive/display geometry level. To do it, you have to analyze an exploded copy of each entity in the block reference, and compare it to the clipping boundary. For curve-based entities, or entities that decompose into same, you would use IntersectWith() to detect an intersection with the boundary, and a BRep-based point containment test against the boundary to determine if non-intersecting&amp;nbsp;curves are inside or outside of it.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 19:20:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-if-entity-is-outside-clip-boundary/m-p/7618091#M28621</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-12-12T19:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Determine if entity is outside clip boundary</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-if-entity-is-outside-clip-boundary/m-p/7618231#M28622</link>
      <description>&lt;P&gt;Thank you for your time. I'm planning to use draw overrule to circle that are inside a block reference. I though that I can get the clip boundary of the block then check if the circle is completely inside the clip boundary. but seem it is a really heavy task.&lt;/P&gt;&lt;P&gt;Because AutoCAD Regen drawing is much faster so that I wondering if AutoCAD saved some property that let AutoCAD itself know when they do regenerating drawing.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 19:54:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-if-entity-is-outside-clip-boundary/m-p/7618231#M28622</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-12T19:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Determine if entity is outside clip boundary</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-if-entity-is-outside-clip-boundary/m-p/7637126#M28623</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;Thank you for your time. I'm planning to use draw overrule to circle that are inside a block reference. I though that I can get the clip boundary of the block then check if the circle is completely inside the clip boundary. but seem it is a really heavy task.&lt;/P&gt;&lt;P&gt;Because AutoCAD Regen drawing is much faster so that I wondering if AutoCAD saved some property that let AutoCAD itself know when they do regenerating drawing.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If you open AcExportLayout.dll and AcExportLayoutEx.dll in reflector or some other similar too and look at the code, you will see how complicated the problem is. Export Layout resorts to API spoofing to clip custom objects against the viewport boundary. API spoofing involves creating versions of the WorldGeometry, ViewportGeometry, and many related classes, and then calling WorldDraw() on the object that's being clipped. The spoofed versions of those APIs simply examines the calls to the methods of those classes to capture the raw geometry generated by the object being clipped. It's an interesting solution to the problem but also an incredibly complicated one.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 03:49:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-if-entity-is-outside-clip-boundary/m-p/7637126#M28623</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-12-20T03:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Determine if entity is outside clip boundary</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-if-entity-is-outside-clip-boundary/m-p/7653384#M28624</link>
      <description>&lt;P&gt;Thanks, I will look at these, hope I can get the idea.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2017 00:01:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-if-entity-is-outside-clip-boundary/m-p/7653384#M28624</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-29T00:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Determine if entity is outside clip boundary</title>
      <link>https://forums.autodesk.com/t5/net-forum/determine-if-entity-is-outside-clip-boundary/m-p/7662444#M28625</link>
      <description>&lt;P&gt;I have routines that do such overlap detection. The subject comes up in many areas of civil engineering.&lt;/P&gt;
&lt;P&gt;The functions are not trivial, and you have to decide on several things when items are really close to touching.&lt;/P&gt;
&lt;P&gt;Even if you make the routines to test for intersection, that may be too slow on clip boundaries with say 500 segments.&lt;/P&gt;
&lt;P&gt;So you will want to do some kind of bounding box optimization to eliminate crossing tests when say a circle is inside the boundary but its bounding box does not cross any boundary segment boxes. Pick a point on the circle and test if inside or outside the boundary, do not test if the circle hits every segment as it obviously won't.&lt;/P&gt;
&lt;P&gt;My routines run fast enough to trim thousands of triangles and the difference between optimization and not is 100 fold in speed.&lt;/P&gt;
&lt;P&gt;I'm sure they could be sped up more too, but the point is no optimization will be ugly when running on a lot of stuff with complex boundary.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 23:01:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/determine-if-entity-is-outside-clip-boundary/m-p/7662444#M28625</guid>
      <dc:creator>JamesMaeding</dc:creator>
      <dc:date>2018-01-03T23:01:42Z</dc:date>
    </item>
  </channel>
</rss>

