<?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: Check if Solid3d is parallel to some axis in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/check-if-solid3d-is-parallel-to-some-axis/m-p/9642254#M18996</link>
    <description>&lt;P&gt;Here is a modified function that will give a Vector3d aligned to the longest direction of a 3dSolid.&amp;nbsp; One caveat: &amp;nbsp;The returned vector may not align perfectly to the extrusion direction if the solid has had subsequent modifications (i.e., modified ends, mid-span booleans, etc.).&amp;nbsp; Minimal testing and error checking&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        private Vector3d PreliminaryLenVector(Solid3dMassProperties SMP)
        {
            int position = 0;
            Vector3d PM = SMP.PrincipalMoments;
            double min = PM.X;
            double nonMin0;
            double nonMin1;
            if (min &amp;gt; PM.Y)
            {
                position = 1;
                nonMin0 = min;
                min = PM.Y;
            }
            else nonMin0 = PM.Y;


            if (min &amp;gt; PM.Z)
            {
                position = 2;
                nonMin1 = min;
                min = PM.Z;
            }
            else nonMin1 = PM.Z;

            return SMP[position];
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 18 Jul 2020 09:40:47 GMT</pubDate>
    <dc:creator>SEANT61</dc:creator>
    <dc:date>2020-07-18T09:40:47Z</dc:date>
    <item>
      <title>Check if Solid3d is parallel to some axis</title>
      <link>https://forums.autodesk.com/t5/net-forum/check-if-solid3d-is-parallel-to-some-axis/m-p/9642206#M18995</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I'm starting work with Solid3D. I have created steel profile as Solid3D (&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;say UB beam)&lt;/SPAN&gt;&lt;/SPAN&gt; with additional custom properties and I want to tag this element using two properties from this object. Everything works fine I can attached tag to the middle of object. The problem is that I want to put the tag outside of object (up when Solid is parallel to Xaxis, on left when Solid is parallel to Yaxis) . Now I calculate the midpoint basics on MinPoint and MaxPoint from the extends. My question is how to check if Solid is parallel to the Xaxis, YAxis, or at angle to the Xaxis. I can draw line from MinPint to MaxPoint but this line never will be parallel to the solid object so this is not the way...&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jul 2020 08:26:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/check-if-solid3d-is-parallel-to-some-axis/m-p/9642206#M18995</guid>
      <dc:creator>marcin.sachs</dc:creator>
      <dc:date>2020-07-18T08:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Solid3d is parallel to some axis</title>
      <link>https://forums.autodesk.com/t5/net-forum/check-if-solid3d-is-parallel-to-some-axis/m-p/9642254#M18996</link>
      <description>&lt;P&gt;Here is a modified function that will give a Vector3d aligned to the longest direction of a 3dSolid.&amp;nbsp; One caveat: &amp;nbsp;The returned vector may not align perfectly to the extrusion direction if the solid has had subsequent modifications (i.e., modified ends, mid-span booleans, etc.).&amp;nbsp; Minimal testing and error checking&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        private Vector3d PreliminaryLenVector(Solid3dMassProperties SMP)
        {
            int position = 0;
            Vector3d PM = SMP.PrincipalMoments;
            double min = PM.X;
            double nonMin0;
            double nonMin1;
            if (min &amp;gt; PM.Y)
            {
                position = 1;
                nonMin0 = min;
                min = PM.Y;
            }
            else nonMin0 = PM.Y;


            if (min &amp;gt; PM.Z)
            {
                position = 2;
                nonMin1 = min;
                min = PM.Z;
            }
            else nonMin1 = PM.Z;

            return SMP[position];
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jul 2020 09:40:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/check-if-solid3d-is-parallel-to-some-axis/m-p/9642254#M18996</guid>
      <dc:creator>SEANT61</dc:creator>
      <dc:date>2020-07-18T09:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Check if Solid3d is parallel to some axis</title>
      <link>https://forums.autodesk.com/t5/net-forum/check-if-solid3d-is-parallel-to-some-axis/m-p/9646886#M18997</link>
      <description>&lt;P&gt;Many Thanks,&lt;BR /&gt;It's working perfect for me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 14:26:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/check-if-solid3d-is-parallel-to-some-axis/m-p/9646886#M18997</guid>
      <dc:creator>marcin.sachs</dc:creator>
      <dc:date>2020-07-21T14:26:45Z</dc:date>
    </item>
  </channel>
</rss>

