- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everybody,
I'm trying to convert my SurfaceBody/NonParametricBaseFeature into a solid body. My idea is to use a SculptFeature as this works already manually.
You can see the feature to convert in the screenshot down below.
The code to get this feature into my PartDocument is here:
' 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)
I copied an interference body from an assembly document to a part document using an adaption of the following issue: https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/transformation-of-surfacebody-copy-d...
My idea to use a SculptFeature is based on the following steps done manually ("Formen" is german for Sculpt):
"Formen" is german for Sculpt
The result of Sculpt -> New Body is a solid body
I already tried to write these steps in Visual Basic:
' 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)
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.
I've tried the following:
- CreateSculptSurface -> Error with input (oNewBody or oTransitionNPFeature)
- Add -> Error with input (oNewBody or oTransitionNPFeature)
- First creating a surface collection and use the method Add -> same Error with input
Is there a way to convert this SurfaceBody or NonParametricBaseFeature into a Solid? Preferably with the method SculptFeature.Add?
I would be very happy to receive some help with this issue.
Thank you!
Sebastian
Solved! Go to Solution.