EgtGeomKernel 1.8j4 :
- aggiunta classe Polygon3d (da EgtExchange) - razionalizzata classe Plane3d - corretta funzione IntersLineTria.
This commit is contained in:
+3
-4
@@ -532,11 +532,10 @@ PolyLine::IsFlat( int& nRank, Point3d& ptCen, Vector3d& vtDir, double dToler) co
|
||||
vtDir.Invert() ;
|
||||
// Plane calculation
|
||||
Plane3d plPlane ;
|
||||
plPlane.vtN = vtDir ;
|
||||
plPlane.dDist = ( ptCen - ORIG) * plPlane.vtN ;
|
||||
plPlane.Set( ptCen, vtDir) ;
|
||||
// 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.vtN) - plPlane.dDist ;
|
||||
double dDist = ( ( ptP - ORIG) * plPlane.GetVersN()) - plPlane.GetDist() ;
|
||||
if ( fabs( dDist) > dToler)
|
||||
return false ;
|
||||
}
|
||||
@@ -559,7 +558,7 @@ PolyLine::IsClosedAndFlat( Plane3d& plPlane, double& dArea, double dToler) const
|
||||
return false ;
|
||||
// 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.vtN) - plPlane.dDist ;
|
||||
double dDist = ( ( ptP - ORIG) * plPlane.GetVersN()) - plPlane.GetDist() ;
|
||||
if ( fabs( dDist) > dToler)
|
||||
return false ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user