<?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: Revit Tpiece geometric analysis in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/revit-tpiece-geometric-analysis/m-p/12991062#M3316</link>
    <description>&lt;P&gt;Yes. You can look at the connector coordinate system:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://www.revitapidocs.com/2024/cb6d725d-654a-f6f3-fed0-96cc618a42f1.htm" target="_blank"&gt;https://www.revitapidocs.com/2024/cb6d725d-654a-f6f3-fed0-96cc618a42f1.htm&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Its Z axis point in the connector direction, so you can use that to determine the relative connector angles.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Aug 2024 09:41:48 GMT</pubDate>
    <dc:creator>jeremy_tammik</dc:creator>
    <dc:date>2024-08-30T09:41:48Z</dc:date>
    <item>
      <title>Revit Tpiece geometric analysis</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-tpiece-geometric-analysis/m-p/12990937#M3315</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im trying to make a function that will take in a tpiece and return a coefficient base on a table from DIN 1988-300:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndrejLicanin_0-1725006034457.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1403895iC4DA8882B1B4BDA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AndrejLicanin_0-1725006034457.png" alt="AndrejLicanin_0-1725006034457.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I get T pieces by collecting family instances and checking the part type in the MEPModel field.&lt;/P&gt;&lt;P&gt;After that, I retrieved the connectors from the T piece and obtained the flow values, but I can't determine the coefficients based on just that. I would need some way to identify which connector is going straight and which one is branching off.&lt;/P&gt;&lt;P&gt;I thought the angle property could help me here, but no luck—in the families I'm looking at, they are all 0.&amp;nbsp; Any idea how to tackle this problem? How would i determine which connector is comming from the side at a t piece?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 08:27:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-tpiece-geometric-analysis/m-p/12990937#M3315</guid>
      <dc:creator>Andrej.Licanin</dc:creator>
      <dc:date>2024-08-30T08:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Revit Tpiece geometric analysis</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-tpiece-geometric-analysis/m-p/12991062#M3316</link>
      <description>&lt;P&gt;Yes. You can look at the connector coordinate system:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://www.revitapidocs.com/2024/cb6d725d-654a-f6f3-fed0-96cc618a42f1.htm" target="_blank"&gt;https://www.revitapidocs.com/2024/cb6d725d-654a-f6f3-fed0-96cc618a42f1.htm&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Its Z axis point in the connector direction, so you can use that to determine the relative connector angles.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2024 09:41:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-tpiece-geometric-analysis/m-p/12991062#M3316</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2024-08-30T09:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Revit Tpiece geometric analysis</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-tpiece-geometric-analysis/m-p/12995868#M3317</link>
      <description>&lt;P&gt;Thanks Jeremy,it works&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-09-02 15_50_36-Unity_calc_TpieceData.txt - Notepad.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1404769i4BC86603DD4B43B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-09-02 15_50_36-Unity_calc_TpieceData.txt - Notepad.png" alt="2024-09-02 15_50_36-Unity_calc_TpieceData.txt - Notepad.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Here is the code for the function:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        public static Element AnalyzeTee2(Element element, Document doc)
        {
            Element elementAtAngle = null;

            // Check if the element is a FamilyInstance
            if (!PipeNetworkSplitter.isSplitter(element))
            {
                return null;
            }

            List&amp;lt;Connector&amp;gt; tpieceConnectors = getConnectors(element);


            Connector connector1 = tpieceConnectors[0];
            Connector connector2 = tpieceConnectors[1];
            Connector connector3 = tpieceConnectors[2];

            XYZ zVector1 = connector1.CoordinateSystem.BasisZ;
            XYZ zVector2 = connector2.CoordinateSystem.BasisZ;
            XYZ zVector3 = connector3.CoordinateSystem.BasisZ;

            if (AreVectorsParallel(zVector1,zVector2)) elementAtAngle = getConnectingConnector(connector3).Owner;
            if (AreVectorsParallel(zVector2,zVector3)) elementAtAngle = getConnectingConnector(connector1).Owner;
            if (AreVectorsParallel(zVector1,zVector3)) elementAtAngle = getConnectingConnector(connector2).Owner;

            return elementAtAngle;
        }
        public static bool AreVectorsParallel(XYZ vector1, XYZ vector2, double tolerance = 1e-6)
        {
            // Compute the cross product of the two vectors
            XYZ crossProduct = vector1.CrossProduct(vector2);

            // Check if the cross product is close to zero vector within the given tolerance
            return crossProduct.IsAlmostEqualTo(XYZ.Zero, tolerance);
        }&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 02 Sep 2024 13:55:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-tpiece-geometric-analysis/m-p/12995868#M3317</guid>
      <dc:creator>Andrej.Licanin</dc:creator>
      <dc:date>2024-09-02T13:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Revit Tpiece geometric analysis</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-tpiece-geometric-analysis/m-p/13016170#M3318</link>
      <description>&lt;P&gt;Thank you for the confirmation! Shared on the blog for posterity:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2024/09/mep-cable-tray-bend-and-tee-analysis-1.html#3" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2024/09/mep-cable-tray-bend-and-tee-analysis-1.html#3&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 09:39:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-tpiece-geometric-analysis/m-p/13016170#M3318</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2024-09-12T09:39:37Z</dc:date>
    </item>
  </channel>
</rss>

