EgtGeomKernel 2.2h2 :

- le superfici di Bezier sono state estese per essere multipatch.
This commit is contained in:
Dario Sassi
2020-08-12 08:27:46 +00:00
parent 2ac30358a6
commit 98fe4b7ba1
6 changed files with 392 additions and 186 deletions
+47
View File
@@ -1096,6 +1096,53 @@ CurveComposite::GetPointD1D2( double dU, Side nS, Point3d& ptPos, Vector3d* pvtD
return m_CrvSmplS[nC]->GetPointD1D2( dUc, ICurve::FROM_MINUS, ptPos, pvtDer1, pvtDer2) ;
}
//----------------------------------------------------------------------------
bool
CurveComposite::IsAPoint( void) const
{
// verifico lo stato
if ( m_nStatus != OK)
return false ;
// ciclo di verifica
for ( auto Iter = m_CrvSmplS.begin() ; Iter != m_CrvSmplS.end() ; ++Iter) {
if ( (*Iter)->GetType() != CRV_BEZIER ||
! GetBasicCurveBezier(*Iter)->IsAPoint())
return false ;
}
return true ;
}
//----------------------------------------------------------------------------
bool
CurveComposite::GetApproxLength( double& dLen) const
{
// verifico lo stato
if ( m_nStatus != OK)
return false ;
// ciclo di calcolo
dLen = 0 ;
for ( auto Iter = m_CrvSmplS.begin() ; Iter != m_CrvSmplS.end() ; ++Iter) {
double dLenCrvSmpl ;
if ( (*Iter)->GetType() == CRV_BEZIER) {
if ( GetBasicCurveBezier(*Iter)->GetApproxLength( dLenCrvSmpl))
dLen += dLenCrvSmpl ;
else
return false ;
}
else {
if ( (*Iter)->GetLength( dLenCrvSmpl))
dLen += dLenCrvSmpl ;
else
return false ;
}
}
return true ;
}
//----------------------------------------------------------------------------
bool
CurveComposite::GetLength( double& dLen) const