diff --git a/EXE_GdbModifyCurve.cpp b/EXE_GdbModifyCurve.cpp index f7c4b29..882061c 100644 --- a/EXE_GdbModifyCurve.cpp +++ b/EXE_GdbModifyCurve.cpp @@ -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 diff --git a/EXE_NstCreateFlatParts.cpp b/EXE_NstCreateFlatParts.cpp index 1cc4f3d..63098d4 100644 --- a/EXE_NstCreateFlatParts.cpp +++ b/EXE_NstCreateFlatParts.cpp @@ -872,6 +872,8 @@ VerifyPrepareFlatParts( void) } // recupero un intervallo di id contigui per tutte le parti int nFirstId = pGeomDB->GetNewId() ; + if ( nFirstId == vOpenIds[i] + 1) + nFirstId = vOpenIds[i] ; pGeomDB->ChangeId( vOpenIds[i], nFirstId) ; int nCurrId = nFirstId ; // eseguo la divisione diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 8da70b0..0cf3df1 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ