<?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 Torus geometry does not evaluate as expected in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/torus-geometry-does-not-evaluate-as-expected/m-p/10736462#M43844</link>
    <description>&lt;P&gt;Using Autodesk Inventor Professional 2020 Build: 396, Release 2020.4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a program that evaluates torus surfaces on imported .step file geometry (solid bodies). It seems on some items that are imported the torus evaluates as if it is fully revolved around its center axis which in some cases it is not. For example I would expect a rangebox to be as shown below (smaller box only containing the actual surface), Instead the result is the larger box as if the torus was fully revolved around its center axis.&lt;/P&gt;&lt;P&gt;Is there a way to only evaluate the actual surface? Do I need to do something else when importing the geometry?&lt;/P&gt;&lt;P&gt;Some imports evaluate as expected some do not. Can anyone explain the inconsistency?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CAD_CAM_MAN_0-1636052287452.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/986028i6D3569E0A6F6505E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CAD_CAM_MAN_0-1636052287452.png" alt="CAD_CAM_MAN_0-1636052287452.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CAD_CAM_MAN_1-1636052409231.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/986030i8BAF2C033C597AC0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CAD_CAM_MAN_1-1636052409231.png" alt="CAD_CAM_MAN_1-1636052409231.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;'Sample code
For Each face As Face In MyBody.Faces
            If Not IsNothing(TryCast(face.Geometry, Torus)) Then
                Dim ADoc As PartDocument = InventorApp.ActiveDocument
                Dim PCdef As PartComponentDefinition = ADoc.ComponentDefinition
                Dim FaceGeo As Torus = face.Geometry
                Dim MyBox As Box = FaceGeo.Evaluator.RangeBox
                With PCdef.WorkPoints
                    .AddFixed(MyBox.MaxPoint)
                    .AddFixed(MyBox.MinPoint)
                End With
            End If
        Next&lt;/LI-CODE&gt;&lt;P&gt;Sample code result...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CAD_CAM_MAN_2-1636053241356.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/986038iF56D0FC6753F3168/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CAD_CAM_MAN_2-1636053241356.png" alt="CAD_CAM_MAN_2-1636053241356.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried using .isParamOnFace with points that are not on the actual surface shown but would be on the surface if the torus was fully revolved around its center axis. The points still evaluate as if on the surface.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Nov 2021 19:21:43 GMT</pubDate>
    <dc:creator>CAD_CAM_MAN</dc:creator>
    <dc:date>2021-11-04T19:21:43Z</dc:date>
    <item>
      <title>Torus geometry does not evaluate as expected</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/torus-geometry-does-not-evaluate-as-expected/m-p/10736462#M43844</link>
      <description>&lt;P&gt;Using Autodesk Inventor Professional 2020 Build: 396, Release 2020.4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a program that evaluates torus surfaces on imported .step file geometry (solid bodies). It seems on some items that are imported the torus evaluates as if it is fully revolved around its center axis which in some cases it is not. For example I would expect a rangebox to be as shown below (smaller box only containing the actual surface), Instead the result is the larger box as if the torus was fully revolved around its center axis.&lt;/P&gt;&lt;P&gt;Is there a way to only evaluate the actual surface? Do I need to do something else when importing the geometry?&lt;/P&gt;&lt;P&gt;Some imports evaluate as expected some do not. Can anyone explain the inconsistency?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CAD_CAM_MAN_0-1636052287452.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/986028i6D3569E0A6F6505E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CAD_CAM_MAN_0-1636052287452.png" alt="CAD_CAM_MAN_0-1636052287452.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CAD_CAM_MAN_1-1636052409231.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/986030i8BAF2C033C597AC0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CAD_CAM_MAN_1-1636052409231.png" alt="CAD_CAM_MAN_1-1636052409231.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;'Sample code
For Each face As Face In MyBody.Faces
            If Not IsNothing(TryCast(face.Geometry, Torus)) Then
                Dim ADoc As PartDocument = InventorApp.ActiveDocument
                Dim PCdef As PartComponentDefinition = ADoc.ComponentDefinition
                Dim FaceGeo As Torus = face.Geometry
                Dim MyBox As Box = FaceGeo.Evaluator.RangeBox
                With PCdef.WorkPoints
                    .AddFixed(MyBox.MaxPoint)
                    .AddFixed(MyBox.MinPoint)
                End With
            End If
        Next&lt;/LI-CODE&gt;&lt;P&gt;Sample code result...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CAD_CAM_MAN_2-1636053241356.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/986038iF56D0FC6753F3168/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CAD_CAM_MAN_2-1636053241356.png" alt="CAD_CAM_MAN_2-1636053241356.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried using .isParamOnFace with points that are not on the actual surface shown but would be on the surface if the torus was fully revolved around its center axis. The points still evaluate as if on the surface.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 19:21:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/torus-geometry-does-not-evaluate-as-expected/m-p/10736462#M43844</guid>
      <dc:creator>CAD_CAM_MAN</dc:creator>
      <dc:date>2021-11-04T19:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Torus geometry does not evaluate as expected</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/torus-geometry-does-not-evaluate-as-expected/m-p/10736901#M43845</link>
      <description>&lt;P&gt;The Geometry Property of the Face is a generic Geometric Shape.&amp;nbsp; Use the Face Itself:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;For Each f As Face In MyBody.Faces
    If Not IsNothing(TryCast(f.Geometry, Torus)) Then
        Dim ADoc As PartDocument = ThisApplication.ActiveDocument
        Dim PCdef As PartComponentDefinition = ADoc.ComponentDefinition
        'Dim FaceGeo As Torus = f.Geometry
        Dim MyBox As Box = f.Evaluator.RangeBox 'FaceGeo.Evaluator.RangeBox
        With PCdef.WorkPoints
            .AddFixed(MyBox.MaxPoint)
            .AddFixed(MyBox.MinPoint)
        End With
    End If
Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you have any questions or if this is not working as intended.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 23:49:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/torus-geometry-does-not-evaluate-as-expected/m-p/10736901#M43845</guid>
      <dc:creator>J-Camper</dc:creator>
      <dc:date>2021-11-04T23:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Torus geometry does not evaluate as expected</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/torus-geometry-does-not-evaluate-as-expected/m-p/10737925#M43846</link>
      <description>&lt;P&gt;Thank you JCamper!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works as expected now...&lt;/P&gt;&lt;LI-CODE lang="general"&gt;'Sample Code
        For Each face As Face In MyBody.Faces
            If Not IsNothing(TryCast(face.Geometry, Torus)) Then
                Dim ADoc As PartDocument = InventorApp.ActiveDocument
                Dim PCdef As PartComponentDefinition = ADoc.ComponentDefinition
                'Dim FaceGeo As Torus = face.Geometry
                Dim MyBox As Box = face.Evaluator.RangeBox
                With PCdef.WorkPoints
                    .AddFixed(MyBox.MaxPoint)
                    .AddFixed(MyBox.MinPoint)
                End With
            End If
        Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CAD_CAM_MAN_0-1636115451808.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/986285iF2898AE0E706D237/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CAD_CAM_MAN_0-1636115451808.png" alt="CAD_CAM_MAN_0-1636115451808.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 12:36:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/torus-geometry-does-not-evaluate-as-expected/m-p/10737925#M43846</guid>
      <dc:creator>CAD_CAM_MAN</dc:creator>
      <dc:date>2021-11-05T12:36:04Z</dc:date>
    </item>
  </channel>
</rss>

