diff --git a/AdjustLoops.cpp b/AdjustLoops.cpp index c6f1f96..87465f6 100644 --- a/AdjustLoops.cpp +++ b/AdjustLoops.cpp @@ -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) diff --git a/EgtGeomKernel.rc b/EgtGeomKernel.rc index b0026d0..f415dc0 100644 Binary files a/EgtGeomKernel.rc and b/EgtGeomKernel.rc differ diff --git a/FontOs.cpp b/FontOs.cpp index 56cf0d5..4bda957 100644 --- a/FontOs.cpp +++ b/FontOs.cpp @@ -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