From db6134d221ad6e779e3a931c968c953488d00a15 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 30 Mar 2021 17:56:43 +0000 Subject: [PATCH] =?UTF-8?q?EgtExecutor=202.3c3=20:=20-=20in=20ExeTrimCurve?= =?UTF-8?q?WithRegion=20corretta=20tolleranza=20sugli=20intervalli=20ammes?= =?UTF-8?q?si=20-=20in=20generale=20si=20evita=20di=20introdurre=20buchi?= =?UTF-8?q?=20non=20necessari=20negli=20Id=20con=20spezzature=20di=20entit?= =?UTF-8?q?=C3=A0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EXE_GdbModifyCurve.cpp | 14 ++++++++++++-- EXE_NstCreateFlatParts.cpp | 2 ++ EgtExecutor.rc | Bin 16176 -> 16176 bytes 3 files changed, 14 insertions(+), 2 deletions(-) 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 8da70b06eb6fa23b390e37caa8d7bb8620d142b0..0cf3df14dda562bb9034e316e1aa25981938394f 100644 GIT binary patch delta 79 zcmdl`x1nysFE&Qw&A-`PnSqoe*K!sx?>N)s4T4pS#*-bnk~jAW*?>e(i-FY$N+HxV MD8kglDP58Q0D5;DV*mgE delta 79 zcmdl`x1nysFE&P_&A-`PnSqoe*K!sx?>N)s4T4pSMw1=6k~jAW*?>e(i-FY$N+HxV MD8kglDP58Q0C_7LTL1t6