Sync changes from upstream repository

Co-authored-by: croudyj <croudyj@gmail.com>
Co-authored-by: Dale Lear <dalelear@mcneel.com>
Co-authored-by: Greg Arden <greg@mcneel.com>
Co-authored-by: Jussi Aaltonen <jussi@mcneel.com>
Co-authored-by: piac <giulio@mcneel.com>
Co-authored-by: Pierre Cuvilliers <pierre@mcneel.com>
Co-authored-by: Steve Baer <steve@mcneel.com>
Co-authored-by: Will Pearson <will@mcneel.com>
This commit is contained in:
Bozo the Builder
2023-06-27 14:12:47 -07:00
parent 112b5142ba
commit 3c751dd0ea
33 changed files with 2151 additions and 1856 deletions

View File

@@ -559,6 +559,15 @@ bool ON_Curve::IsPlanar( ON_Plane* plane, double tolerance ) const
}
}
}
// RH-75060 GBA 9-June-23
// For a planar simple closed curve we should return the plane
// whose orientation that matches the curve orientation.
if (rc && plane && IsClosed())
{
if (ON_ClosedCurveOrientation(*this, *plane) < 0)
plane->Flip();
}
}
return rc;
}