Hi I try to create a loft.
The curves are in the right order.
Dim loftBr() As Brep = Brep.CreateFromLoftRebuild(dirList, Point3d.Unset, Point3d.Unset, LoftType.Normal, False, 100)
But when I loop through my lines and reverse the ones that are in the wrong direction they don’t always flip:
Dim dirList As New List(Of Curve)
For i As Integer = 1 To projCrvList.Count - 1
If dirList.Count = 0 Then
Dim crv As Curve = projCrvList(0).DuplicateCurve
crv.Rebuild(100, 3, False)
dirList.Add(crv)
End If
Dim testCrv As Curve = projCrvList(i).DuplicateCurve
testCrv.Rebuild(100, 3, False)
Dim matchDir As Boolean = Curve.DoDirectionsMatch(projCrvList(0), testCrv)
If matchDir Then
dirList.Add(testCrv)
Else
Dim bool As Boolean = testCrv.Reverse()
dirList.Add(testCrv)
End If
Next
If I loop again through this list like:
For i As Integer = 1 To dirList.Count - 1
Dim matchDir As Boolean = Curve.DoDirectionsMatch(dirList(0), dirList(i))
If matchDir = False Then
MsgBox("Not in the same direction")
End If
Next
Then I still get a messagebox that the curves are not in the same direction, while i just looped through them to get reversed… Even when Dim bool As Boolean = testCrv.Reverse() never returns False.
Any help?