I am testing non-PlaneSurfaces in Breps to determine which ones can be replaced with PlaneSurfaces. In this case, when
IsPlanar tolerance is set to the
ModelAbsoluteTolerance (0.001), the RevSurface and SumSurface are missed when tested directly.
TryGetPlane on the RevSurface, SumSurface, and their
ToNurbsSurface results, only the RevSurface results in a poorly-oriented plane:
When the PlaneSurface of its
TryGetPlane's plane is extended over the RevSurface, the deviation is about 0.008, which coincides with a more refined testing of
IsPlanar. On the hand, the plane from SumSurface matches the plane from
Now knowing this, I will convert RevSurfaces and SumSurfaces to NurbsSurfaces to use
TryGetPlane on the latter.
IsSurfacePlanar tests BrepFaces directly, so the same issue exists with it.
TryGetPlane isn’t used by rhinoscript (by Surfaces).