EgtGeomKernel :

- a ExtText aggiunta GetAuxSurf (solo per font di sistema)
- molto migliorata gestione anelli e spikes nella creazione di regioni.
This commit is contained in:
Dario Sassi
2020-06-02 10:12:47 +00:00
parent e8796dac88
commit e6d64e2c60
9 changed files with 239 additions and 27 deletions
+19 -8
View File
@@ -1051,15 +1051,12 @@ SurfFlatRegion::ApproxLoopWithLines( int nChunk, int nLoop, double dLinTol, doub
}
//----------------------------------------------------------------------------
const ISurfTriMesh*
SurfFlatRegion::GetAuxSurf( void) const
SurfTriMesh*
SurfFlatRegion::CalcAuxSurf( double dLinTol, double dAngTolDeg) const
{
// la superficie deve essere validata
if ( m_nStatus != OK || m_vpLoop.empty())
return nullptr ;
// se già calcolata, la restituisco
if ( m_pSTM != nullptr)
return m_pSTM ;
// la creo
PtrOwner<SurfTriMesh> pSTM( CreateBasicSurfTriMesh()) ;
if ( IsNull( pSTM))
@@ -1073,7 +1070,7 @@ SurfFlatRegion::GetAuxSurf( void) const
ICurve* pLoop = GetMyLoop( i, j) ;
while ( pLoop != nullptr) {
// approssimo con linee a destra per non avere problemi in punti di contatto tra esterni e interni
if ( ! pLoop->ApproxWithLines( LIN_TOL_FINE, ANG_TOL_STD_DEG, ICurve::APL_RIGHT, vPL[j]))
if ( ! pLoop->ApproxWithLines( dLinTol, dAngTolDeg, ICurve::APL_RIGHT, vPL[j]))
return nullptr ;
pLoop = GetMyLoop( i, ++j) ;
}
@@ -1090,8 +1087,22 @@ SurfFlatRegion::GetAuxSurf( void) const
pSTM->DoSewing( *pChSTM) ;
}
}
// la salvo
m_pSTM = Release( pSTM) ;
// la restituisco
return Release( pSTM) ;
}
//----------------------------------------------------------------------------
const ISurfTriMesh*
SurfFlatRegion::GetAuxSurf( void) const
{
// la superficie deve essere validata
if ( m_nStatus != OK || m_vpLoop.empty())
return nullptr ;
// se già calcolata, la restituisco
if ( m_pSTM != nullptr)
return m_pSTM ;
// la creo e la salvo
m_pSTM = CalcAuxSurf( LIN_TOL_FINE, ANG_TOL_STD_DEG) ;
return m_pSTM ;
}