<?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 Get Solid Body with Sculpt Feature in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/get-solid-body-with-sculpt-feature/m-p/11184173#M36830</link>
    <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to convert my SurfaceBody/NonParametricBaseFeature into a solid body. My idea is to use a SculptFeature as this works already manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can see the feature to convert in the screenshot down below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="220521-Wochenbericht KW21 - Inventor Forum - Surface Body to Solid.JPG" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1070138i89540CEA460B3D5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="220521-Wochenbericht KW21 - Inventor Forum - Surface Body to Solid.JPG" alt="220521-Wochenbericht KW21 - Inventor Forum - Surface Body to Solid.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code to get this feature into my PartDocument is here:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;' Get the source document
Dim oSourceAsmDoc As AssemblyDocument = g_inventorApplication.ActiveDocument

' Get the Interference Body.
Dim oIntBody As SurfaceBody = oCollision.oIntBody

' Copy the face as a transient B-Rep face.
Dim oNewBody As SurfaceBody = g_inventorApplication.TransientBRep.Copy(oIntBody)

' Add the body to the existing gripper jaw document
Dim oTargetPartDoc As PartDocument = g_inventorApplication.Documents.Item(3)

' Create a non-parametric base feature using the face as a transition to get rotated face
Dim oTransitionNPFeature As NonParametricBaseFeature = oTargetPartDoc.ComponentDefinition.Features.NonParametricBaseFeatures.Add(oNewBody)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I copied an interference body from an assembly document to a part document using an adaption of the following issue:&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/transformation-of-surfacebody-copy-does-not-work/m-p/11070628#M136042" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/transformation-of-surfacebody-copy-does-not-work/m-p/11070628#M136042&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My idea to use a SculptFeature is based on the following steps done manually ("Formen" is german for Sculpt):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="&amp;quot;Formen&amp;quot; is german for Sculpt" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1070140iBAF6F8171BEA71DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="220521-Wochenbericht KW21 - Inventor Forum - SculptFeature 1.JPG" alt="&amp;quot;Formen&amp;quot; is german for Sculpt" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;"Formen" is german for Sculpt&lt;/span&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-center" image-alt="The result of Sculpt -&amp;gt; New Body  is a solid body" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1070141i01283FCAB9E86B94/image-size/medium?v=v2&amp;amp;px=400" role="button" title="220521-Wochenbericht KW21 - Inventor Forum - SculptFeature 2.JPG" alt="The result of Sculpt -&amp;gt; New Body  is a solid body" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;The result of Sculpt -&amp;gt; New Body  is a solid body&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already tried to write these steps in Visual Basic:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;' Creat sculpt surface collection
Dim SurfCol As ObjectCollection = g_inventorApplication.TransientObjects.CreateObjectCollection
        SurfCol.Add(oTransitionNPFeature)

' Create a sculpt feature; convert SurfaceBody to Solid
Dim oSculptFeature As SculptFeature = oDoc.ComponentDefinition.Features.SculptFeatures.Add(SurfCol, PartFeatureOperationEnum.kNewBodyOperation)&lt;/LI-CODE&gt;&lt;P&gt;The problem is the input of the SculptFeature.Add Method. I couldn't the right solution what to type as an input for this method yet.&lt;/P&gt;&lt;P&gt;I've tried the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;CreateSculptSurface -&amp;gt; Error with input (oNewBody or&amp;nbsp;oTransitionNPFeature)&lt;/LI&gt;&lt;LI&gt;Add -&amp;gt; Error with input (oNewBody or oTransitionNPFeature)&lt;/LI&gt;&lt;LI&gt;First creating a surface collection and use the method Add -&amp;gt; same Error with input&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to convert this SurfaceBody or&amp;nbsp;NonParametricBaseFeature into a Solid?&amp;nbsp;Preferably with the method SculptFeature.Add?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be very happy to receive some help with this issue.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 21 May 2022 12:10:54 GMT</pubDate>
    <dc:creator>ga42bon</dc:creator>
    <dc:date>2022-05-21T12:10:54Z</dc:date>
    <item>
      <title>Get Solid Body with Sculpt Feature</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/get-solid-body-with-sculpt-feature/m-p/11184173#M36830</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to convert my SurfaceBody/NonParametricBaseFeature into a solid body. My idea is to use a SculptFeature as this works already manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can see the feature to convert in the screenshot down below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="220521-Wochenbericht KW21 - Inventor Forum - Surface Body to Solid.JPG" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1070138i89540CEA460B3D5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="220521-Wochenbericht KW21 - Inventor Forum - Surface Body to Solid.JPG" alt="220521-Wochenbericht KW21 - Inventor Forum - Surface Body to Solid.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code to get this feature into my PartDocument is here:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;' Get the source document
Dim oSourceAsmDoc As AssemblyDocument = g_inventorApplication.ActiveDocument

' Get the Interference Body.
Dim oIntBody As SurfaceBody = oCollision.oIntBody

' Copy the face as a transient B-Rep face.
Dim oNewBody As SurfaceBody = g_inventorApplication.TransientBRep.Copy(oIntBody)

' Add the body to the existing gripper jaw document
Dim oTargetPartDoc As PartDocument = g_inventorApplication.Documents.Item(3)

' Create a non-parametric base feature using the face as a transition to get rotated face
Dim oTransitionNPFeature As NonParametricBaseFeature = oTargetPartDoc.ComponentDefinition.Features.NonParametricBaseFeatures.Add(oNewBody)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I copied an interference body from an assembly document to a part document using an adaption of the following issue:&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/transformation-of-surfacebody-copy-does-not-work/m-p/11070628#M136042" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/transformation-of-surfacebody-copy-does-not-work/m-p/11070628#M136042&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My idea to use a SculptFeature is based on the following steps done manually ("Formen" is german for Sculpt):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="&amp;quot;Formen&amp;quot; is german for Sculpt" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1070140iBAF6F8171BEA71DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="220521-Wochenbericht KW21 - Inventor Forum - SculptFeature 1.JPG" alt="&amp;quot;Formen&amp;quot; is german for Sculpt" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;"Formen" is german for Sculpt&lt;/span&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-center" image-alt="The result of Sculpt -&amp;gt; New Body  is a solid body" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1070141i01283FCAB9E86B94/image-size/medium?v=v2&amp;amp;px=400" role="button" title="220521-Wochenbericht KW21 - Inventor Forum - SculptFeature 2.JPG" alt="The result of Sculpt -&amp;gt; New Body  is a solid body" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;The result of Sculpt -&amp;gt; New Body  is a solid body&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already tried to write these steps in Visual Basic:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;' Creat sculpt surface collection
Dim SurfCol As ObjectCollection = g_inventorApplication.TransientObjects.CreateObjectCollection
        SurfCol.Add(oTransitionNPFeature)

' Create a sculpt feature; convert SurfaceBody to Solid
Dim oSculptFeature As SculptFeature = oDoc.ComponentDefinition.Features.SculptFeatures.Add(SurfCol, PartFeatureOperationEnum.kNewBodyOperation)&lt;/LI-CODE&gt;&lt;P&gt;The problem is the input of the SculptFeature.Add Method. I couldn't the right solution what to type as an input for this method yet.&lt;/P&gt;&lt;P&gt;I've tried the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;CreateSculptSurface -&amp;gt; Error with input (oNewBody or&amp;nbsp;oTransitionNPFeature)&lt;/LI&gt;&lt;LI&gt;Add -&amp;gt; Error with input (oNewBody or oTransitionNPFeature)&lt;/LI&gt;&lt;LI&gt;First creating a surface collection and use the method Add -&amp;gt; same Error with input&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to convert this SurfaceBody or&amp;nbsp;NonParametricBaseFeature into a Solid?&amp;nbsp;Preferably with the method SculptFeature.Add?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be very happy to receive some help with this issue.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2022 12:10:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/get-solid-body-with-sculpt-feature/m-p/11184173#M36830</guid>
      <dc:creator>ga42bon</dc:creator>
      <dc:date>2022-05-21T12:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Get Solid Body with Sculpt Feature</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/get-solid-body-with-sculpt-feature/m-p/11184260#M36831</link>
      <description>&lt;P&gt;You might want to have a look at &lt;A href="https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/a-dynamic-box/m-p/10787044/highlight/true#M131813" target="_blank" rel="noopener"&gt;this post&lt;/A&gt;. There I wrote a rule that creates a solid box using a "NonParametricBaseFeature". Maybe you can use that rule as an example.&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2022 13:57:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/get-solid-body-with-sculpt-feature/m-p/11184260#M36831</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2022-05-21T13:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get Solid Body with Sculpt Feature</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/get-solid-body-with-sculpt-feature/m-p/11184380#M36832</link>
      <description>&lt;P&gt;Thanks a lot!&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With some lines of code in this post I could turn my&amp;nbsp;&lt;SPAN&gt;NonParametricBaseFeature into solid.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2022 15:41:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/get-solid-body-with-sculpt-feature/m-p/11184380#M36832</guid>
      <dc:creator>ga42bon</dc:creator>
      <dc:date>2022-05-21T15:41:46Z</dc:date>
    </item>
  </channel>
</rss>

