Cutting Surface with a Solid

Cutting Surface with a Solid

Anonymous
Not applicable
802 Views
6 Replies
Message 1 of 7

Cutting Surface with a Solid

Anonymous
Not applicable

I have computed a surface using my algorithm, in Sheet Metal environment. Now I wish to cut that surface using a body created by extrude, so as to create holes. Is it possible? How?

 

Picture attached.

 

In intreatcive mode, the 'Combine' feature is disabled. 

0 Likes
803 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

hope sculpt option will solve your problem.

0 Likes
Message 3 of 7

Anonymous
Not applicable

I wish to pierce hole in the surface using the solid, but with the steps I followed it is happening opposite, the solid is getting cut. Please see attached picture.

 

Also, is there any API example doing this?

0 Likes
Message 4 of 7

Anonymous
Not applicable

You need to create the surface for the solid first.

Using create object option create the surface of the solid as shown

 

 2015-08-19_10-07-13.png

 

Now while using sculpt select the surface of the solid.

 

2015-08-19_10-10-16.png

 

After doing this you could be able to get holes. 

0 Likes
Message 5 of 7

Anonymous
Not applicable

Not sure if I am misssing the right directions or what, but I am just not getting the piercing done.

Attached is the part for you to try. If that works then I will worry about getting the right APIs, as I need to do this programmatically.

 

SculptSelections.png

0 Likes
Message 6 of 7

Vladimir.Ananyev
Alumni
Alumni

As alternative you may consider Trim feature to create holes.  This works in the UI, but unfortunately TrimFeatures collection does not provide Add() method :Smiley Sad(

You may add this wish to the Inventor IdeaStation:

http://forums.autodesk.com/t5/inventor-ideastation/idb-p/v1232

 

I may suggest the workaround that produces the “trim” in two steps – as a combination of the Split and Delete Face operations. 

 

1.PNG

 

2.PNG

 

The start and the end faces belongs to the different surface bodies in your sheet metal model. That is why I had to create holes using two splits (see help on the SplitFaces method).

Please open the attached file (I added names to some of your features) and run the following vba code.  It works in the sheet metal environment.

 

Private Sub TrimImitation()

    Dim oDoc As PartDocument
    Set oDoc = ThisApplication.ActiveDocument
    Dim oDef As PartComponentDefinition
    Set oDef = oDoc.ComponentDefinition
    
    'work surface used as a tool
    Dim oToolSrf As WorkSurface
    Set oToolSrf = oDef.WorkSurfaces.Item("ToolSrf")

    ' extrude feature used to create the tool surface
    Dim oExtrFeature As ExtrudeFeature
    Set oExtrFeature = oToolSrf.SurfaceBodies.Item(1).CreatedByFeature
    
    'extrude feature definition
    Dim oExtrDef As ExtrudeDefinition
    Set oExtrDef = oExtrFeature.Definition
    
    'reference to the extrusion start face
    '(assuming thet the planar sketch was created on the planar face)
    Dim oSketch As PlanarSketch
    Set oSketch = oExtrDef.profile.Parent
    Dim oStartFace As Face
    Set oStartFace = oSketch.PlanarEntity
    
    'reference to the extrusion end face
    '(assuming that ExtentType = kToExtent)
    Dim oEndFace As Face
    Set oEndFace = oExtrDef.Extent.ToFace.Item(1)

    Dim oSplitFeatures As SplitFeatures
    Set oSplitFeatures = oDef.Features.SplitFeatures
    
    'add the 1st split feature
    Dim oColl As FaceCollection
    Set oColl = ThisApplication.TransientObjects.CreateFaceCollection
    oColl.Add oStartFace
    Dim oSplitFeature As SplitFeature
    Set oSplitFeature = oSplitFeatures.SplitFaces(oToolSrf, False, oColl)
    'delete created circular face - make the first hole
    Dim oFace As Face
    Set oFace = oSplitFeature.Faces.Item(2)
    oColl.Clear
    Call oColl.Add(oFace)
    Dim oDeleteFace As DeleteFaceFeature
    Set oDeleteFace = oDef.Features.DeleteFaceFeatures.Add(oColl)
   
    'add the 2nd split feature
    oColl.Clear
    Call oColl.Add(oEndFace)
    Set oSplitFeature = oSplitFeatures.SplitFaces(oToolSrf, False, oColl)
    'delete created face - make the second hole
    Set oFace = oSplitFeature.Faces.Item(2)
    oColl.Clear
    Call oColl.Add(oFace)
    Set oDeleteFace = oDef.Features.DeleteFaceFeatures.Add(oColl)

    Beep
End Sub

Hope you could modify this sample to suit your specific needs.

cheers


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 7 of 7

Anonymous
Not applicable

As per your suggestion, I have filed a New Idea for getting ready API.

 

Thanks a lot for providing such a detailed workaround. I will give it a try.

0 Likes