Bend Edge Length Issue (incorrect value)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have some code that finds the length of a bend and it works great until there is a cut operation that passes through the edge of the part and through the bend. When this cut exists the systems recognizes the single bend 2 times which is fineand it should, just that it should also then be able to determine the length of each segment. It appears to be providing the length of the first segment twice. Has anyone found a way to get either the segmented lengths or the length of the bend without the cut? I need a total length and the code below gives wrong data for the one edge length. the attached file shows what I mean.
idea's or suggestions?
Sub Bends()
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument
Dim smComp As SheetMetalComponentDefinition
Set smComp = oDoc.ComponentDefinition
Dim oFlat As FlatPattern
Set oFlat = smComp.FlatPattern
Dim oBend As FlatBendResult
For Each oBend In oFlat.FlatBendResults
If oBend.IsOnBottomFace = True Then
Dim oEdge As Edge
Set oEdge = oBend.Edge
Dim dMin As Double
Dim dMax As Double
Dim dSingleLength As Double
Call oEdge.Evaluator.GetParamExtents(dMin, dMax)
Call oEdge.Evaluator.GetLengthAtParam(dMin, dMax, dSingleLength)
MsgBox dSingleLength
End If
Next
End Sub
Scott