Sweep feature does not accept NewBodyOption for creating SOLID

Sweep feature does not accept NewBodyOption for creating SOLID

Anonymous
Not applicable
448 Views
1 Reply
Message 1 of 2

Sweep feature does not accept NewBodyOption for creating SOLID

Anonymous
Not applicable

I wish to create an equivalent sweep for the sheet metal flange. It seems to work ok except that the features appear hidden. Please see attached picture.

 

Most likey its becuase the tool body created by feature is not able to JOIN with the existing part. Actually, I wish to have NEWBODY option. But it gives error (don't know why), so I had to use JOIN, which does not give error but does not show the feature.

 

 

            ElseIf TypeOf oFeature Is FlangeFeature Then
                oFeature.SetEndOfPart(True)
                Dim flangefeat As FlangeFeature = oFeature
                Dim definition As FlangeDefinition = flangefeat.Definition
                Dim edges As Inventor.EdgeCollection = definition.Edges
                Dim count As Integer = edges.Count
                Dim planeCollection As ObjectCollection = _invApp.TransientObjects.CreateObjectCollection()

                If Not edges Is Nothing Then
                    ' Collect all inputs first, then rollback to the end
                    For Each ed As Edge In edges
                        Dim fc1 As Face = ed.Faces.Item(1)
                        Dim fc2 As Face = ed.Faces.Item(2)
                        Dim pl As Inventor.Polyline3d
                        If fc1.Evaluator.Area > fc2.Evaluator.Area Then ' smaller one needs to be swept
                            pl = ExtractBoundaryOfFace(fc2)
                        Else
                            pl = ExtractBoundaryOfFace(fc1)
                        End If
                        planeCollection.Add(pl)

                    Next
                End If

                m_compDef.SetEndOfPartToTopOrBottom(False)

                For Each pl As Inventor.Polyline3d In planeCollection
                    Dim path As Inventor.Path = CreatePathForFlange(pl, oFeature)
                    Dim profileSketch As PlanarSketch = Nothing
                    CreateSketchOutOfFaceBoundary(pl, profileSketch)
                    Dim profile As Profile = profileSketch.Profiles.AddForSolid
                    CreateNewSweep(profile, path, PartFeatureOperationEnum.kJoinOperation)
                Next

 

 

Attached also is code and part file.

 

Wish to have PartFeatureOperationEnum Enumerator kNewBodyOperation working for SWEEP feature

 

0 Likes
Accepted solutions (1)
449 Views
1 Reply
Reply (1)
Message 2 of 2

Vladimir.Ananyev
Alumni
Alumni
Accepted solution

Your problem is caused by sick profile.  The profile in the planar sketch you create for sweep feature is not suitable to produce a solid body.  You may easily verify this in UI.  Inventor can produce surface only as shown in my screenshot.

 

 sweep.PNG

I would suggest create profile using the projected face edges.

cheers


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

0 Likes