EgtGeomKernel 1.5h4 :

- uso set di istruzioni SSE2
- miglioramenti generali ad ApproxWithArcs
- estensione uso di PolyLine e PolyArc
- a TSC aggiunta funzione CurveCompo.FromCurveApproximation.
This commit is contained in:
Dario Sassi
2014-08-17 16:47:24 +00:00
parent 77e74ccf4e
commit 0d5f3b28cb
10 changed files with 532 additions and 224 deletions
+22
View File
@@ -23,6 +23,7 @@
//----------------------------------------------------------------------------
PolyLine::PolyLine( void)
{
m_nRejected = 0 ;
m_nCount = 0 ;
m_iter = m_lUPoints.end() ;
}
@@ -36,6 +37,7 @@ PolyLine::~PolyLine( void)
bool
PolyLine::Clear( void)
{
m_nRejected = 0 ;
m_nCount = 0 ;
m_lUPoints.clear() ;
m_iter = m_lUPoints.end() ;
@@ -46,6 +48,12 @@ PolyLine::Clear( void)
bool
PolyLine::AddUPoint( double dPar, const Point3d& ptP)
{
// se il punto è uguale al precedente (ignoro parametro), non lo inserisco ma ok
if ( m_nCount > 0 && AreSamePointApprox( ptP, m_lUPoints.back().second)) {
++ m_nRejected ;
return true ;
}
// eseguo inserimento
try {
m_lUPoints.push_back( UPOINT( dPar, ptP)) ;
}
@@ -58,6 +66,20 @@ PolyLine::AddUPoint( double dPar, const Point3d& ptP)
return true ;
}
//----------------------------------------------------------------------------
bool
PolyLine::Close( void)
{
// ci devono essere almeno 2 punti
if ( m_lUPoints.size() < 2)
return false ;
// verifico non sia già chiuso
if ( AreSamePointApprox( m_lUPoints.front().second, m_lUPoints.back().second))
return false ;
// aggiungo un punto uguale al primo in coda
return AddUPoint( m_lUPoints.front().first, m_lUPoints.front().second) ;
}
//----------------------------------------------------------------------------
bool
PolyLine::EraseFirstUPoint( void)