EgtExecutor 2.3c3 :

- in ExeTrimCurveWithRegion corretta tolleranza sugli intervalli ammessi
- in generale si evita di introdurre buchi non necessari negli Id con spezzature di entità.
This commit is contained in:
Dario Sassi
2021-03-30 17:56:43 +00:00
parent 889cd44867
commit db6134d221
3 changed files with 14 additions and 2 deletions
+12 -2
View File
@@ -747,7 +747,7 @@ MyTrimCurveWithRegion( int nCrvId, int nRegId, bool bInVsOut, bool bOn, int& nCo
if ( ! pSFR->GetCurveClassification( *CrvLoc, ccClass))
return GDB_ID_NULL ;
// determino gli intervalli di curva da conservare
Intervals inOk ;
Intervals inOk( 100 * EPS_PARAM) ;
for ( auto& ccOne : ccClass) {
if ( ( bInVsOut && ccOne.nClass == CRVC_IN) ||
( ! bInVsOut && ccOne.nClass == CRVC_OUT) ||
@@ -756,9 +756,11 @@ MyTrimCurveWithRegion( int nCrvId, int nRegId, bool bInVsOut, bool bOn, int& nCo
}
// recupero un intervallo di id contigui per tutte le parti
int nFirstId = pGeomDB->GetNewId() ;
if ( nFirstId == nCrvId + 1)
nFirstId = nCrvId ;
int nCurrId = nFirstId ;
if ( ! pGeomDB->ChangeId( nCrvId, nFirstId))
return GDB_ID_NULL ;
int nCurrId = nFirstId ;
// eseguo la divisione
nCount = 0 ;
double dParS, dParE ;
@@ -863,6 +865,8 @@ MyTrimFlatCurveWithBox( int nCrvId, const Frame3d& frBox, const Vector3d& vtDiag
}
// recupero un intervallo di id contigui per tutte le parti
int nFirstId = pGeomDB->GetNewId() ;
if ( nFirstId == nCrvId + 1)
nFirstId = nCrvId ;
if ( ! pGeomDB->ChangeId( nCrvId, nFirstId))
return GDB_ID_NULL ;
int nCurrId = nFirstId ;
@@ -934,6 +938,8 @@ ExeSplitCurve( int nId, int nParts)
bOk = bOk && ( dLen > 10 * EPS_SMALL) ;
// recupero un intervallo di id contigui per tutte le parti
int nFirstId = pGeomDB->GetNewId() ;
if ( nFirstId == nId + 1)
nFirstId = nId ;
bOk = bOk && pGeomDB->ChangeId( nId, nFirstId) ;
int nCurrId = nFirstId ;
// eseguo la divisione
@@ -1094,6 +1100,8 @@ ExeSplitCurveAtCorners( int nId, double dTgAngToler, int* pnCount)
}
// recupero un intervallo di id contigui per tutte le parti
int nFirstId = pGeomDB->GetNewId() ;
if ( nFirstId == nId + 1)
nFirstId = nId ;
bOk = bOk && pGeomDB->ChangeId( nId, nFirstId) ;
int nCurrId = nFirstId ;
// eseguo la divisione
@@ -1175,6 +1183,8 @@ ExeSplitCurveAtSelfInters( int nId, int* pnCount)
}
// recupero un intervallo di id contigui per tutte le parti
int nFirstId = pGeomDB->GetNewId() ;
if ( nFirstId == nId + 1)
nFirstId = nId ;
bOk = bOk && pGeomDB->ChangeId( nId, nFirstId) ;
int nCurrId = nFirstId ;
// eseguo la divisione