EgtGeomKernel :
- piccole velocizzazioni per biarchi - modifiche per unificazioni AreSamePoint***.
This commit is contained in:
+5
-3
@@ -136,14 +136,16 @@ GetBiArc( const Point3d& ptP0, double dDir0Deg, const Point3d& ptP1, double dDir
|
||||
|
||||
// determino la massima distanza tra la curva e il biarco
|
||||
double dSqDist = 0 ;
|
||||
const double STEP = dTol ; // scelto euristicamente
|
||||
const double STEP = 10 ;
|
||||
Point3d ptCurr ;
|
||||
bool bPnt = PL.GetFirstPoint( ptCurr) ;
|
||||
Point3d ptPrev = ptCurr ;
|
||||
while ( bPnt) {
|
||||
double dLen = Dist( ptCurr, ptPrev) ;
|
||||
int nStep = ( dLen < STEP ? 2 : 1) * ( int( dLen / STEP) + 1) ;
|
||||
nStep = min( 10, nStep) ; // scelto euristicamente
|
||||
int nStep = int( dLen / STEP) + 1 ;
|
||||
int nMinStep = ( dLen > 50 * dTol ? 3 : ( dLen > 10 * dTol ? 2 : 1)) ;
|
||||
int nMaxStep = 10 ;
|
||||
nStep = Clamp( nStep, nMinStep, nMaxStep) ;
|
||||
for ( int i = 1 ; i <= nStep ; ++ i) {
|
||||
double dCoeff = double( i) / nStep ;
|
||||
Point3d ptP = Media( ptPrev, ptCurr, dCoeff) ;
|
||||
|
||||
Reference in New Issue
Block a user