From 0b86c4f72bf9d9d4ec21424e766b87d65def42f0 Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Thu, 2 Apr 2026 17:29:41 +0200 Subject: [PATCH 1/5] EgtGeomKernel : - in Trimming piccola correzione --- Trimming.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Trimming.cpp b/Trimming.cpp index 48d7b46..e88ff8e 100644 --- a/Trimming.cpp +++ b/Trimming.cpp @@ -4746,7 +4746,7 @@ GetTrimmingHoleBorders( const CISURFPVECTOR& vpSurf, const Point3d& ptRef, doubl // Scorro le curve successive for ( int j = i + 1 ; nIndJ == -1 && j < ssize( vHoles) ; ++ j) { // Recupero la curva corrente, se non presente allora passo alla successiva - if ( IsNull( vHoles[i].pCompoHole)) + if ( IsNull( vHoles[j].pCompoHole)) continue ; // Se il tipo è differente non possono essere in coppia if ( vHoles[i].nType != vHoles[j].nType) From d51a0d225886707f57336f09f0c3f31c142230a9 Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Fri, 3 Apr 2026 08:23:13 +0200 Subject: [PATCH 2/5] EgtGeomKernel : - in CalcPocketing correzione parametro Invert per Epicicli. --- CalcPocketing.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/CalcPocketing.cpp b/CalcPocketing.cpp index cb9e8f5..4e2b791 100644 --- a/CalcPocketing.cpp +++ b/CalcPocketing.cpp @@ -6236,9 +6236,6 @@ AddEpicycles( const PocketParams& PockParam, ICurveComposite* pCompo, ICurveComp if ( pCompo == nullptr || ! pCompo->IsValid()) return false ; - if ( PockParam.bInvert) - pCompo->Invert() ; // oriento la curva in senso antiorario - // calcolo l'Offset definito dal valore dell'raggio dell'epiciclo OffsetCurve OffsCrv ; if ( ! OffsCrv.Make( pCompo, PockParam.dEpicyclesRad, ICurve::OFF_FILLET) || OffsCrv.GetCurveCount() > 1) From fa9a9e89cb7afdf080809b65af4ced72d2b3e788 Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Fri, 3 Apr 2026 12:52:39 +0200 Subject: [PATCH 3/5] EgtGeomKernel : - in CalcPocketing aggiunte considerazioni per Lucidature su SmallRad. --- CalcPocketing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalcPocketing.cpp b/CalcPocketing.cpp index 4e2b791..93bece0 100644 --- a/CalcPocketing.cpp +++ b/CalcPocketing.cpp @@ -6541,7 +6541,7 @@ CalcSpiral( const ISurfFlatRegion* pSfrPock, const ISurfFlatRegion* pSfrOrig, co } // se non ho Chunks e devo usare un Offset più piccolo... else if ( ! bSmallRad) { - if ( PockParams.dRad < EPS_SMALL) + if ( PockParams.dRad < EPS_SMALL || PockParams.bPolishing) break ; dOffs = dOffsPrec + ( nIter == 0 ? PockParams.dRad + PockParams.dRadialOffset : PockParams.dRad) ; } From b4522c712d2857f34f560f802d394a7e21cc7df5 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Fri, 3 Apr 2026 16:19:39 +0200 Subject: [PATCH 4/5] EgtGeomKernel : - correzione alla IntersCrvCompoCrvCompo. --- IntersCrvCompoCrvCompo.cpp | 63 +++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/IntersCrvCompoCrvCompo.cpp b/IntersCrvCompoCrvCompo.cpp index 5435673..157ef3c 100644 --- a/IntersCrvCompoCrvCompo.cpp +++ b/IntersCrvCompoCrvCompo.cpp @@ -802,12 +802,19 @@ IntersCrvCompoCrvCompo::IntersCrvCompoCrvCompo( const ICurveComposite& CCompoA, INTVECTOR vNewOverlap ; // salvo eventuali incoerenze col precedente for ( int i = bCrvAClosed ? 0 : 1 ; i < m_nNumInters ; ++i) { - int j = i == 0 ? m_nNumInters - 1 : i - 1 ; - int kj = m_Info[j].bOverlap ? 1 : 0 ; + int j = ( i == 0 ? m_nNumInters - 1 : i - 1) ; + int kj = ( m_Info[j].bOverlap ? 1 : 0) ; bool bSpike = m_Info[i].bOverlap && m_Info[j].bOverlap && m_Info[i].bCBOverEq != m_Info[j].bCBOverEq ; + if ( bSpike) { + bSpike = abs( m_Info[i].IciA[0].dU - m_Info[j].IciA[0].dU) < EPS_PARAM || + abs( m_Info[i].IciA[0].dU - m_Info[j].IciA[1].dU) < EPS_PARAM || + abs( m_Info[i].IciA[1].dU - m_Info[j].IciA[0].dU) < EPS_PARAM || + abs( m_Info[i].IciA[1].dU - m_Info[j].IciA[1].dU) < EPS_PARAM ; + } if ( (m_Info[j].IciA[kj].nNextTy == ICCT_NULL || m_Info[i].IciA[0].nPrevTy == ICCT_NULL || m_Info[j].IciA[kj].nNextTy != m_Info[i].IciA[0].nPrevTy) && m_Info[j].IciA[kj].nNextTy != ICCT_SPK && m_Info[i].IciA[0].nPrevTy != ICCT_SPK) { - vIncoherenceWithPrev.push_back( i) ; + if ( vIncoherenceWithPrev.empty() || vIncoherenceWithPrev.back() != i) + vIncoherenceWithPrev.push_back( i) ; if ( bSpike) { // se ho uno spike sistemo anche il successivo int k = i == m_nNumInters - 1 ? -1 : i + 1 ; @@ -823,8 +830,8 @@ IntersCrvCompoCrvCompo::IntersCrvCompoCrvCompo( const ICurveComposite& CCompoA, // incoerenze sulla curva A if ( ! bCoherent) { for ( int i : vIncoherenceWithPrev) { - int j = i == 0 ? m_nNumInters - 1 : i - 1 ; - int kj = m_Info[j].bOverlap ? 1 : 0 ; + int j = ( i == 0 ? m_nNumInters - 1 : i - 1) ; + int kj = ( m_Info[j].bOverlap ? 1 : 0) ; int nType = 0 ; CalcSide( j, i, &CCompoA, &CCompoB, true, nType) ; if ( nType != ICCT_ON) { @@ -846,16 +853,23 @@ IntersCrvCompoCrvCompo::IntersCrvCompoCrvCompo( const ICurveComposite& CCompoA, vIncoherenceWithPrev.clear() ; // salvo eventuali incoerenze col precedente for ( int i = bCrvBClosed ? 0 : 1 ; i < m_nNumInters ; ++i) { - int j = i == 0 ? m_nNumInters - 1 : i - 1 ; - int ki = m_Info[i].bOverlap && ! m_Info[i].bCBOverEq ? 1 : 0 ; - int kj = m_Info[j].bOverlap && m_Info[j].bCBOverEq ? 1 : 0 ; + int j = ( i == 0 ? m_nNumInters - 1 : i - 1) ; + int ki = ( m_Info[i].bOverlap && ! m_Info[i].bCBOverEq ? 1 : 0) ; + int kj = ( m_Info[j].bOverlap && m_Info[j].bCBOverEq ? 1 : 0) ; bool bSpike = m_Info[i].bOverlap && m_Info[j].bOverlap && m_Info[i].bCBOverEq != m_Info[j].bCBOverEq ; + if ( bSpike) { + bSpike = abs( m_Info[i].IciA[0].dU - m_Info[j].IciA[0].dU) < EPS_PARAM || + abs( m_Info[i].IciA[0].dU - m_Info[j].IciA[1].dU) < EPS_PARAM || + abs( m_Info[i].IciA[1].dU - m_Info[j].IciA[0].dU) < EPS_PARAM || + abs( m_Info[i].IciA[1].dU - m_Info[j].IciA[1].dU) < EPS_PARAM ; + } if ( ( m_Info[j].IciB[kj].nNextTy == ICCT_NULL || m_Info[i].IciB[ki].nPrevTy == ICCT_NULL || m_Info[j].IciB[kj].nNextTy != m_Info[i].IciB[ki].nPrevTy) && m_Info[j].IciB[kj].nNextTy != ICCT_SPK && m_Info[i].IciB[ki].nPrevTy != ICCT_SPK) { - vIncoherenceWithPrev.push_back( i) ; + if ( vIncoherenceWithPrev.empty() || vIncoherenceWithPrev.back() != i) + vIncoherenceWithPrev.push_back( i) ; if ( bSpike) { // se ho uno spike sistemo anche il successivo - int k = i == m_nNumInters - 1 ? -1 : i + 1 ; + int k = ( i == m_nNumInters - 1 ? -1 : i + 1) ; if ( k == -1 && bCrvBClosed) k = 0 ; @@ -868,9 +882,9 @@ IntersCrvCompoCrvCompo::IntersCrvCompoCrvCompo( const ICurveComposite& CCompoA, // incoerenze sulla curva B if ( ! bCoherent) { for ( int i : vIncoherenceWithPrev) { - int j = i == 0 ? m_nNumInters - 1 : i - 1 ; - int ki = m_Info[i].bOverlap && ! m_Info[i].bCBOverEq ? 1 : 0 ; - int kj = m_Info[j].bOverlap && m_Info[j].bCBOverEq ? 1 : 0 ; + int j = ( i == 0 ? m_nNumInters - 1 : i - 1) ; + int ki = ( m_Info[i].bOverlap && !m_Info[i].bCBOverEq ? 1 : 0) ; + int kj = ( m_Info[j].bOverlap && m_Info[j].bCBOverEq ? 1 : 0) ; int nType = 0 ; CalcSide( j, i, &CCompoB, &CCompoA, false, nType) ; if ( nType != ICCT_ON) { @@ -903,10 +917,10 @@ IntersCrvCompoCrvCompo::CalcSide( int j, int i,const ICurve* pThisCrv, const ICu const IntCrvCrvInfo& Icci2 = m_Info[i] ; // calcolo tra l'intersezione 1 e 2 se la curva sta dentro o fuori int ki = 0 ; - int kj = Icci1.bOverlap ? 1 : 0 ; + int kj = ( Icci1.bOverlap ? 1 : 0) ; if ( ! bCrvAOrB) { - ki = m_Info[i].bOverlap && ! m_Info[i].bCBOverEq ? 1 : 0 ; - kj = m_Info[j].bOverlap && m_Info[j].bCBOverEq ? 1 : 0 ; + ki = ( m_Info[i].bOverlap && !m_Info[i].bCBOverEq ? 1 : 0) ; + kj = ( m_Info[j].bOverlap && m_Info[j].bCBOverEq ? 1 : 0) ; } double dU = 0 ; @@ -1045,8 +1059,11 @@ IntersCrvCompoCrvCompo::CalcSide( int j, int i,const ICurve* pThisCrv, const ICu bool IntersCrvCompoCrvCompo::MergeNewOverlap( int i, bool bCrvAOrB) { + if ( i >= ssize(m_Info)) + return false ; + // faccio il merge col precedente - int j = i == 0 ? m_nNumInters - 1 : i - 1 ; + int j = ( i == 0 ? m_nNumInters - 1 : i - 1) ; if ( m_Info[j].bOverlap) { m_Info[i].IciA[0] = m_Info[j].IciA[0] ; m_Info[i].IciB[0] = m_Info[j].IciB[0] ; @@ -1185,21 +1202,25 @@ SortGreaterB( const IntCrvCrvInfo& aInfo1, const IntCrvCrvInfo& aInfo2) dU1 = aInfo1.IciB[0].dU ; if ( aInfo1.bOverlap) { // caso normale - if ( aInfo1.IciB[0].dU < aInfo1.IciB[1].dU) + if ( ( aInfo1.bCBOverEq && aInfo1.IciB[0].dU < aInfo1.IciB[1].dU) || ( ! aInfo1.bCBOverEq && aInfo1.IciB[0].dU > aInfo1.IciB[1].dU)) dU1 = 0.5 * ( aInfo1.IciB[0].dU + aInfo1.IciB[1].dU) ; // a cavallo di fine / inizio - else + else if ( aInfo1.bCBOverEq) dU1 = aInfo1.IciB[0].dU + SPAN_PARAM ; + else + dU1 = aInfo1.IciB[1].dU + SPAN_PARAM ; } // determino il secondo termine del confronto dU2 = aInfo2.IciB[0].dU ; if ( aInfo2.bOverlap) { // caso normale - if ( aInfo2.IciB[0].dU < aInfo2.IciB[1].dU) + if ( ( aInfo2.bCBOverEq && aInfo2.IciB[0].dU < aInfo2.IciB[1].dU) || ( ! aInfo2.bCBOverEq && aInfo2.IciB[0].dU > aInfo2.IciB[1].dU)) dU2 = 0.5 * ( aInfo2.IciB[0].dU + aInfo2.IciB[1].dU) ; // a cavallo di fine / inizio - else + else if ( aInfo2.bCBOverEq) dU2 = aInfo2.IciB[0].dU + SPAN_PARAM ; + else + dU2 = aInfo2.IciB[1].dU + SPAN_PARAM ; } return ( dU2 > dU1 + EPS_PARAM) ; From 69d463713ce112678b51c462fe54e3c5948546ba Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Fri, 3 Apr 2026 16:21:20 +0200 Subject: [PATCH 5/5] EgtGeomKernel 3.1d2 : - cambio versione. --- EgtGeomKernel.rc | Bin 11710 -> 11710 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/EgtGeomKernel.rc b/EgtGeomKernel.rc index b702c2f2380a5b7f89201d99f64019f7db66fd5a..b529de08f0b88985c01b7860d56a8ddec33173b3 100644 GIT binary patch delta 81 zcmdlNy)SyhH#SD2&FAG5nSs