EgtGeomKernel 1.6h3 :
- migliorata approssimazione curve per riconoscimento di tratti rettilinei - aggiunta CopyMaterial a GeomDB - correzioni a IntersCurveCurve per le curve approssimate - aggiunte a Intervals Union, Intersection e Difference - correzioni a SelfIntersCurve per curve approssimate - aggiunte funzioni di creazione Regioni (Rectangle, Stadium, Disk e da zuppa di curve) - migliorie varie a Regioni e introduzione dei componenti connessi (chunk).
This commit is contained in:
@@ -24,6 +24,7 @@ void
|
||||
Intervals::Reset( void)
|
||||
{
|
||||
m_lInts.clear() ;
|
||||
m_Iter = m_lInts.end() ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -139,6 +140,40 @@ Intervals::Remove( double dMin, double dMax)
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void
|
||||
Intervals::Union( const Intervals& Other)
|
||||
{
|
||||
// aggiungo tutti gli intervalli dell'altro
|
||||
for ( auto& Interv : Other.m_lInts)
|
||||
Add( Interv.first, Interv.second) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void
|
||||
Intervals::Intersection( const Intervals& Other)
|
||||
{
|
||||
// se l'insieme è vuoto non devo fare alcunché
|
||||
if ( m_lInts.empty())
|
||||
return ;
|
||||
// Insieme di intervalli ausiliario ampio come il corrente
|
||||
Intervals Aux ;
|
||||
Aux.Set( m_lInts.front().first, m_lInts.back().second) ;
|
||||
// Sottraggo Other da Aux
|
||||
Aux.Difference( Other) ;
|
||||
// Sottraggo Aux dal corrente
|
||||
Difference( Aux) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void
|
||||
Intervals::Difference( const Intervals& Other)
|
||||
{
|
||||
// sottraggo tutti gli intervalli dell'altro
|
||||
for ( auto& Interv : Other.m_lInts)
|
||||
Remove( Interv.first, Interv.second) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Intervals::GetMinMax( double& dMin, double& dMax)
|
||||
|
||||
Reference in New Issue
Block a user