EgtGeomKernel 2.4k6 :

- migliorata IsClosedAndFlat di PolyLine (se non riesce a calcolare il piano chiama IsFlat e quindi usa PCA)
- corretta RemoveCurveSmallZs per caso in cui non riesce a rimuovere il segmento incriminato.
This commit is contained in:
DarioS
2022-11-28 15:18:28 +01:00
parent 817bfa788e
commit 7ee0e38cec
3 changed files with 20 additions and 9 deletions
+4 -2
View File
@@ -599,8 +599,10 @@ PolyLine::IsClosedAndFlat( Plane3d& plPlane, double& dArea, double dToler) const
PolygonPlane PolyPlane ;
for ( bool bFound = GetFirstPoint( ptP) ; bFound ; bFound = GetNextPoint( ptP))
PolyPlane.AddPoint( ptP) ;
if ( ! PolyPlane.GetPlane( plPlane) || ! PolyPlane.GetArea( dArea))
return false ;
if ( ! PolyPlane.GetPlane( plPlane) || ! PolyPlane.GetArea( dArea)) {
dArea = 0 ;
return IsFlat( plPlane, dToler) ;
}
// Test each vertex to see if it is farther from plane than allowed max distance
for ( bool bFound = GetFirstPoint( ptP) ; bFound ; bFound = GetNextPoint( ptP)) {
double dDist = ( ( ptP - ORIG) * plPlane.GetVersN()) - plPlane.GetDist() ;