- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I have come across an issue with the FlatBendResults object in a specific case. In general, the results are good but when used with a bend that was "split" with let's say a cut in the folded model, then the results seem to be incorrect.
I cant seem to be able to get the Start and End points/vertices of some of the bend lines.
To keep the explanation simple I have attached a part file for reference.
The code below will insert a Work Point at each endpoint of the bend lines. If you run this you will see what I mean. Is this a known bug or am I missing something here?
Open the part and activate the Flat Pattern. Then run the code. Check the points created in the Flat Pattern environment.
Private Sub BtnAddWorkPoints_Click(sender As Object, e As EventArgs) Handles BtnAddWorkPoints.Click
Try
oApp = Marshal.GetActiveObject("Inventor.Application")
Catch ex As Exception
MessageBox.Show("Could not connect to Inventor.")
Exit Sub
End Try
Dim oTransGeom As TransientGeometry
oTransGeom = oApp.TransientGeometry
Dim oPartDoc As PartDocument = oApp.ActiveDocument
Dim oSmCompdef As SheetMetalComponentDefinition = oPartDoc.ComponentDefinition
Dim oFlat As FlatPattern = oSmCompdef.FlatPattern
Dim oTopFace As Face = oFlat.TopFace
If oFlat.FlatBendResults.Count > 0 Then
For i As Integer = 1 To oFlat.FlatBendResults.Count
oFlat.WorkPoints.AddFixed(oFlat.FlatBendResults.Item(i).Edge.StartVertex.Point)
oFlat.WorkPoints.AddFixed(oFlat.FlatBendResults.Item(i).Edge.StopVertex.Point)
Next i
End If
End Sub
Any help would be appreciated!
Cheers
Solved! Go to Solution.