Hello all.
So I'm looping through a Face's Loops, and then looping through its Edges. Everything is fine until I get an EllipticalArc for a nativecurve.
I'm basically tracing the edge to convert it to a PolyLine. I know Gile has written some classes that convert Regions to PolyLines, but this code existed prior to me finding that. And rather than rewrite my stuff to use Gile's code, I'm hoping I can just fix (what I think is) one line of code and I'll be back up and running.
As I said, this existed and worked in Acad2016, but it doesn't work in 2018.
Here's a quick snippet... I suspect the code that is wrong is the "New Ellipse" line and I'm hoping someone will point out what I'm doing wrong.
Dim F As BRep.Face = --some face--
For Each L As BRep.BoundaryLoop In F.Loops
Dim bClosed As Boolean = False
Dim bErr As Boolean = False
Dim iEdgeCount As Integer = 0
Do Until bClosed Or bErr
Dim E As BRep.Edge = L.Edges(iEdgeCount)
Dim C As Curve3d = E.Curve
Dim extC As ExternalCurve3d = C
Dim nativeCurve As Curve3d = extC.NativeCurve
If extC.IsEllipticalArc Then
Dim ellArc3d As EllipticalArc3d = nativeCurve
Dim VecToUse As Vector3d = ellArc3d.Normal
Dim ellActual As New Ellipse(ellArc3d.Center, VecToUse, ellArc3d.MajorAxis * ellArc3d.MajorRadius, ellArc3d.MinorRadius / ellArc3d.MajorRadius, ellArc3d.StartAngle, ellArc3d.EndAngle)
End If
iEdgeCount += 1
Loop
Next
The EllArc3d looks as I expect, meaning the StartPoint and EndPoint are where they should be: See EllArc3d.jpg.
But when I use the same "New Ellipse" command the StartPoint and EndPoint are different: See ellActual.jpg.
The full face is shown in AntiSwirlFace.jpg. I've BOLDED the elliptical curve that I'm specifically having probs with. There are other elliptical curves in that geometry and they are all doing a similar thing.