EgtGeomKernel 1.4l2 : Aggiunte ApproxWithLines su Curve Semplici.

This commit is contained in:
Dario Sassi
2013-12-21 16:18:29 +00:00
parent 6287c113b4
commit 30f8c71894
21 changed files with 548 additions and 105 deletions
+17 -1
View File
@@ -114,7 +114,7 @@ bool
CurveLine::Validate( void)
{
if ( m_nStatus == TO_VERIFY)
m_nStatus = ( ( DistSq( m_PtStart, m_PtEnd) > EPS_SMALL * EPS_SMALL) ? OK : ERR) ;
m_nStatus = ( ( SqDist( m_PtStart, m_PtEnd) > EPS_SMALL * EPS_SMALL) ? OK : ERR) ;
return ( m_nStatus == OK) ;
}
@@ -202,6 +202,22 @@ CurveLine::GetLength( double& dLen) const
return ( dLen > EPS_SMALL) ;
}
//----------------------------------------------------------------------------
bool
CurveLine::ApproxWithLines( double dLinTol, double dAngTolDeg, UPNTVECTOR& vUPoints) const
{
// la curva deve essere validata
if ( m_nStatus != OK)
return false ;
// inserisco gli estremi
vUPoints.reserve( 2) ;
vUPoints.push_back( UPOINT( 0, m_PtStart)) ;
vUPoints.push_back( UPOINT( 1, m_PtEnd)) ;
return true ;
}
//----------------------------------------------------------------------------
bool
CurveLine::Reverse( void)