EgtGeomKernel 2.4k5 :

- correzione in creazione regioni, eliminando curve chiude con diametro di ingombro inferiore a 20 epsilon.
This commit is contained in:
DarioS
2022-11-24 09:29:58 +01:00
parent 7c3b3e516a
commit a4bd5a25c2
3 changed files with 17 additions and 2 deletions
+16
View File
@@ -242,6 +242,22 @@ MyAdjustLoops( ICurve* pCurve, ICURVEPLIST& CrvLst)
++ iIter ;
}
// elimino le curve troppo piccole
for ( auto iIter = CrvLst.begin() ; iIter != CrvLst.end() ;) {
CurveComposite* pCrvCo = GetBasicCurveComposite( *iIter) ;
BBox3d b3CrvCo ;
double dDiam ;
if ( ! pCrvCo->GetLocalBBox( b3CrvCo) || b3CrvCo.IsEmpty() ||
! b3CrvCo.GetDiameter( dDiam) || dDiam < 20 * EPS_SMALL) {
delete pCrvCo ;
pCrvCo = nullptr ;
iIter = CrvLst.erase( iIter) ;
}
else {
++ iIter ;
}
}
// riporto le curve nel riferimento originale
if ( bNeedRef) {
for ( auto pCrv : CrvLst)
BIN
View File
Binary file not shown.
+1 -2
View File
@@ -378,8 +378,7 @@ OsFont::GetRegion( const string& sText, int nInsPos, ISURFFRPLIST& lstSFR) const
if ( ! GetCharOutline( vCode[i], dAdvance, lstPC))
return false ;
// lo trasformo opportunamente
ICURVEPLIST::iterator iIter ;
for ( iIter = lstPC.begin() ; iIter != lstPC.end() ; ++ iIter) {
for ( auto iIter = lstPC.begin() ; iIter != lstPC.end() ; ++ iIter) {
// inverto i percorsi per avere gli esterni CCW
(*iIter)->Invert() ;
// la trasformo per avere solo archi e rette