<?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: Outline class behaviour in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11913464#M12580</link>
    <description>&lt;P&gt;Outline is just an Axis Aligned Bounding Box (aka, an AABB). Testing if something is in an AABB is very fast, hence why Outline is using in filtering rather than BoundingBoxXYZ.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure what you expect to get but when you use your &lt;EM&gt;p0&lt;/EM&gt; and &lt;EM&gt;p5&lt;/EM&gt; as the outline's min and max, neither &lt;EM&gt;pin&lt;/EM&gt; nor &lt;EM&gt;pout&lt;/EM&gt;&amp;nbsp;should be inside of it and when you use&amp;nbsp;&lt;EM&gt;p0&lt;/EM&gt; and&amp;nbsp;&lt;EM&gt;p2&lt;/EM&gt;, both of them should inside of it.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Apr 2023 18:23:17 GMT</pubDate>
    <dc:creator>mhannonQ65N2</dc:creator>
    <dc:date>2023-04-21T18:23:17Z</dc:date>
    <item>
      <title>Outline class behaviour</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11907173#M12575</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I have been trying to use the Outline class in order to figure out if a point is inside a certain outline which I build from the&amp;nbsp; stems from a floor top face .&amp;nbsp; using the Outline.contains(XYZ pt, double Tolerance).&amp;nbsp;&amp;nbsp;&lt;BR /&gt;I create the outline with the&amp;nbsp; constructor that uses minimum and maximum points.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems to behave like a bounding box rather than how I expected an Outline to behave , when I compile and run the code below (one time with p2 as the Maximum point and the other with p5 ) I get the results as show in the images below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this the planned behaviour ? it's not what I expected at all , the documentation is sparse.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public void squick()
        {
            XYZ p0, p1, p2, p3, p4, p5, pout , pin;
            p0 = new XYZ(0,0,0);
            p1 = new XYZ(0,80,0);
            p2 = new XYZ(80, 80, 0);
            p3 = new XYZ(80, 50, 0);
            p4 = new XYZ(50, 50, 0);
            p5 = new XYZ(50, 0, 0);
            pout= new XYZ(60,30,0);
            pin = new XYZ(60,60,0);
            Outline outline = new Outline(p0, p5); // alternate p2 and p5 
            string o, i;
            o = outline.Contains(pout, 0.0001) ?  "Inside" : "Outside";
            i = outline.Contains(pin, 0.0001)  ? "Inside" : "Outside";
            string r = $"60,30 is {o} and 60,60 is {i}";
            // should be 60,30 is outside and 60,60 is inside 
            TaskDialog.Show("check", r);
        }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;If I use the top right corner (p2&amp;nbsp; =80,80,0) as the maximum point it shows both points (60,60 and 60,30) as inside, if I use the bottom right corner (p5 =50,0,0) as the maximum point it shows both points as outside.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jonathantaVCBM2_1-1681907904603.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1204204iFF33004B260B4740/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jonathantaVCBM2_1-1681907904603.png" alt="jonathantaVCBM2_1-1681907904603.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jonathantaVCBM2_0-1681907719795.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1204201iD95343F612869961/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jonathantaVCBM2_0-1681907719795.png" alt="jonathantaVCBM2_0-1681907719795.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 13:48:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11907173#M12575</guid>
      <dc:creator>jonathan.taVCBM2</dc:creator>
      <dc:date>2023-04-19T13:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Outline class behaviour</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11908878#M12576</link>
      <description>&lt;P&gt;I'm sorry to say that I trust no documentation whatsoever. Therefore, I am a great fan of DIY. In the simple case of determining whether a point lies within a simple polygon, I would recommend implementing and using your own algorithm, or maybe somebody else's, but one that you can analyse, understand, control and modify yourself, e.g., this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2010/12/point-in-polygon-containment-algorithm.html" target="_blank"&gt;Point in Polygon Containment Algorithm&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2012/08/room-in-area-predicate-via-point-in-polygon-test.html" target="_blank"&gt;Room in Area Predicate via Point in Polygon Test&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 05:36:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11908878#M12576</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2023-04-20T05:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Outline class behaviour</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11910123#M12577</link>
      <description>&lt;P&gt;Hi Jeremy ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;As much as I like DIY, sometimes using API's make sense. I would expect a class name Outline to behave as an outline,&amp;nbsp; or be deleted or renamed . The documentation says nothing meaningful.&lt;BR /&gt;It's a funny coincident that the first Link of the two starts with arriving at Tel Aviv , where I live.&amp;nbsp;&lt;BR /&gt;I will go through your solutions, they reference some obsolete libraries / class (Autodesk.Revit.Geometery and UVArray to name a couple) , if I make something useful/meaningful I will post here.&amp;nbsp;&lt;BR /&gt;Unfortunately I feel like marking your answer as a solution is the right thing to do albeit not quite what I was hoping for .&lt;/P&gt;&lt;P&gt;Kind regards , Jonathan.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 15:07:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11910123#M12577</guid>
      <dc:creator>jonathan.taVCBM2</dc:creator>
      <dc:date>2023-04-20T15:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Outline class behaviour</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11910495#M12578</link>
      <description>&lt;P&gt;Yes, I would love to just use official published fully documented APIs. Unfortunately, it has often proven unfeasible or ineffective. Chance are often better if they are open source, so all users can contribute. Sorry to hear that the code I shared is out of date. If you either update it yourself or share a couple of nice little use cases for testing, I can update it to share a current version on the blog.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 17:21:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11910495#M12578</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2023-04-20T17:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Outline class behaviour</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11911223#M12579</link>
      <description>&lt;P&gt;Outline Class:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800080"&gt;&lt;EM&gt;"Outline is a generic object that provides a &lt;U&gt;&lt;STRONG&gt;bounding box/bounding outline&lt;/STRONG&gt;&lt;/U&gt;. It supports operations to scale and transform. It also supports intersections and contains operations."&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apart from the nonsensical use of the term 'generic object' I can see that is possibly a bit vague (the bounding outline bit) however:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Outline.AddPoint&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#800080"&gt;"Adds a point to the bounding &lt;U&gt;&lt;STRONG&gt;box&lt;/STRONG&gt;&lt;/U&gt;, expanding it if the point is outside the existing boundary."&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So it is a box and when a point is added the box is expanded to contain it (i.e. no mention of convex hull etc). There are two constructors one takes two points (so can only create a box/line/flat rectangle). The other constructor takes another Outline which we know logically must have either been created by two points or expanded with further points into a box. Meaning there is no ability to create anything other than a box/line/rectangle with this class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally you have the method Outline.GetDiagonalLength which also indicates it is a box. Lastly regardless of how many points you add you are always left with the MaximumPoint and MinimumPoint properties that define it. Such point properties would be reporting wrong if the class was defining anything other than a line/rectangle/box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The thing to know about Outline is that it is similar to BoundingBoxXYZ but without the transform. So where they say &lt;FONT color="#800080"&gt;"&lt;EM&gt;supports operations to scale and &lt;U&gt;transform&lt;/U&gt;" &lt;/EM&gt;&lt;/FONT&gt;yes it supports scaling but I don't see any evidence that it supports transformations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that is the key complaint of the Outline class; that it is a low level thing perhaps used internally to decide if an element needs to be drawn on screen. I assumed this is why all the bounding box filters use an Outline rather than a BoundingBoxXYZ.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 22:39:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11911223#M12579</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2023-04-20T22:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Outline class behaviour</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11913464#M12580</link>
      <description>&lt;P&gt;Outline is just an Axis Aligned Bounding Box (aka, an AABB). Testing if something is in an AABB is very fast, hence why Outline is using in filtering rather than BoundingBoxXYZ.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure what you expect to get but when you use your &lt;EM&gt;p0&lt;/EM&gt; and &lt;EM&gt;p5&lt;/EM&gt; as the outline's min and max, neither &lt;EM&gt;pin&lt;/EM&gt; nor &lt;EM&gt;pout&lt;/EM&gt;&amp;nbsp;should be inside of it and when you use&amp;nbsp;&lt;EM&gt;p0&lt;/EM&gt; and&amp;nbsp;&lt;EM&gt;p2&lt;/EM&gt;, both of them should inside of it.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 18:23:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11913464#M12580</guid>
      <dc:creator>mhannonQ65N2</dc:creator>
      <dc:date>2023-04-21T18:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Outline class behaviour</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11915576#M12581</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1035859"&gt;@RPTHOMAS108&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I must have read this and and ignored it because I was looking for something else, my bad.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks , Jonathan&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2023 06:04:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11915576#M12581</guid>
      <dc:creator>jonathan.taVCBM2</dc:creator>
      <dc:date>2023-04-23T06:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Outline class behaviour</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11917317#M12582</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8377999"&gt;@mhannonQ65N2&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I figured it out, I should have read the doc rather then "&lt;STRONG&gt;&lt;EM&gt;looking at it&lt;/EM&gt;&lt;/STRONG&gt;" I guess.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still thinks that [1 ]- the name &lt;STRONG&gt;Outline&lt;/STRONG&gt;&amp;nbsp;is confusing [2] - there should be an API function to check point in a polygon/polycurve containment, after all there is Room.IsPointInRoom function and Face.IsInside function I am sure these are or could be exposed as a more generic functions.&lt;/P&gt;&lt;P&gt;Since I am checking a floor I am using the Face.IsInside function , I just needed to figure the edges in UV values , luckily there's an Edge&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;EvaluateOnFace&lt;/STRONG&gt; &lt;/EM&gt;method which is handy .&lt;/P&gt;&lt;P&gt;Thanks , Jonathan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Apr 2023 10:32:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/outline-class-behaviour/m-p/11917317#M12582</guid>
      <dc:creator>jonathan.taVCBM2</dc:creator>
      <dc:date>2023-04-24T10:32:13Z</dc:date>
    </item>
  </channel>
</rss>

