EgtGeomKernel 1.5j1 :
- modifica sui punti medi (ora sempre a metà lunghezza) - correzioni a GetParamAtLength delle curve.
This commit is contained in:
+20
-7
@@ -869,16 +869,29 @@ CurveComposite::GetMidPoint( Point3d& ptMid) const
|
||||
// verifico lo stato
|
||||
if ( m_nStatus != OK)
|
||||
return false ;
|
||||
|
||||
// determino il valore medio del parametro della curva
|
||||
double dStart, dEnd, dMid ;
|
||||
GetDomain( dStart, dEnd) ;
|
||||
dMid = 0.5 * ( dStart + dEnd) ;
|
||||
|
||||
// determino il valore del parametro a metà lunghezza
|
||||
double dLen, dMid ;
|
||||
if ( ! GetLength( dLen) || ! GetParamAtLength( 0.5 * dLen, dMid))
|
||||
return false ;
|
||||
// calcolo il punto
|
||||
return GetPointD1D2( dMid, FROM_MINUS, ptMid) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
CurveComposite::GetMidDir( Vector3d& vtDir) const
|
||||
{
|
||||
// verifico lo stato
|
||||
if ( m_nStatus != OK)
|
||||
return false ;
|
||||
// determino il valore del parametro a metà lunghezza
|
||||
double dLen, dMid ;
|
||||
if ( ! GetLength( dLen) || ! GetParamAtLength( 0.5 * dLen, dMid))
|
||||
return false ;
|
||||
// calcolo la direzione
|
||||
return ::GetTang( *this, 0.5 * m_nCounter, FROM_MINUS, vtDir) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
CurveComposite::GetDomain( double& dStart, double& dEnd) const
|
||||
@@ -1064,7 +1077,7 @@ CurveComposite::GetParamAtLength( double dLen, double& dU) const
|
||||
}
|
||||
}
|
||||
|
||||
return false ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user