From 3b5ab5089bb54cbd633167488f401f3803c607f3 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Fri, 31 Oct 2025 11:08:22 +0100 Subject: [PATCH 1/5] EgtGeomKernel . - ulteriore piccola correzione alle rigate. --- SurfBezier.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/SurfBezier.cpp b/SurfBezier.cpp index cc6ba21..de2ba63 100644 --- a/SurfBezier.cpp +++ b/SurfBezier.cpp @@ -42,7 +42,6 @@ #include "/EgtDev/Include/EGkIntervals.h" #define EIGEN_NO_IO #include "/EgtDev/Extern/Eigen/Dense" -#include "/EgtDev/Include/EGkGeoObjSave.h" using namespace std ; @@ -4917,11 +4916,6 @@ SurfBezier::CreateByTwoCurves( const ICurve* pCurve0, const ICurve* pCurve1, int ++c ; continue ; } - // ho un match con una joint esistente - else if( dParam - int( dParam) < EPS_SMALL) { - ++c ; - continue ; - } if ( dParam <= dLastParamMatch || AreSamePointApprox( ptJoint, ptLastPointMatch)) { dParam = dLastParamMatch ; vbRep0[c] = true ; @@ -4932,6 +4926,12 @@ SurfBezier::CreateByTwoCurves( const ICurve* pCurve0, const ICurve* pCurve1, int else { dLastParamMatch = dParam ; ptLastPointMatch = ptJoint ; + // ho un match con una joint esistente + if( dParam - int( dParam) < EPS_SMALL) { + ++c ; + continue ; + } + vdSplit0.push_back( dParam) ; // verifico se ho un match per questo punto // in tal caso vuol dire che sto creando una ripetizione nRep1 @@ -4992,11 +4992,6 @@ SurfBezier::CreateByTwoCurves( const ICurve* pCurve0, const ICurve* pCurve1, int ++c ; continue ; } - // ho un match con una joint esistente - else if( dParam - int( dParam) < EPS_SMALL) { - ++c ; - continue ; - } if ( dParam <= dLastParamMatch || AreSamePointApprox( ptJoint, ptLastPointMatch)) { dParam = dLastParamMatch ; vbRep1[c] = true ; @@ -5007,6 +5002,11 @@ SurfBezier::CreateByTwoCurves( const ICurve* pCurve0, const ICurve* pCurve1, int else { dLastParamMatch = dParam ; ptLastPointMatch = ptJoint ; + // ho un match con una joint esistente + if( dParam - int( dParam) < EPS_SMALL) { + ++c ; + continue ; + } vdSplit1.push_back( dParam) ; // verifico se ho un match per questo punto From c8e9d1e0125f5e5a7da3f84417712b232a41525f Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Fri, 31 Oct 2025 11:09:11 +0100 Subject: [PATCH 2/5] EgtGeomKernel : - rimozione parti di debug. --- SurfBezier.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/SurfBezier.cpp b/SurfBezier.cpp index de2ba63..ae1954e 100644 --- a/SurfBezier.cpp +++ b/SurfBezier.cpp @@ -5190,17 +5190,6 @@ SurfBezier::CreateByTwoCurves( const ICurve* pCurve0, const ICurve* pCurve1, int ++ nAddedSpan ; } - //debug - ICURVEPOVECTOR vCrv ; - GetAllPatchesIsocurves( false, vCrv) ; - vector vGeo ; - for( int i = 0 ; i < int(vCrv.size()); ++i) - vGeo.push_back( vCrv[i]) ; - vector vCol( vGeo.size()) ; - fill( vCol.begin(), vCol.end(), Color( 255, 0 ,128)) ; - SaveGeoObj( vGeo, vCol, "D:/Temp/bezier/ruled/isoCurves.nge") ; - //debug - return bOk ; } else if ( RLT_B_LENPAR ) { From f1f93124a062762db072614dd30bd0a9a7e2bdc5 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Fri, 31 Oct 2025 13:16:10 +0100 Subject: [PATCH 3/5] EgtGeomKernel : - correzione alle sup di bezier. --- SurfBezier.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SurfBezier.cpp b/SurfBezier.cpp index ae1954e..81deadb 100644 --- a/SurfBezier.cpp +++ b/SurfBezier.cpp @@ -1791,8 +1791,9 @@ SurfBezier::GetAuxSurf( void) const } else { // se con la stessa precisione di quella di visualizzazione restituisco quella - if ( m_pSTMRefined!= nullptr && s_dAuxSurfTol > m_pSTMRefined->GetTempParam() - EPS_SMALL) - return m_pSTMRefined ; + if ( m_pSTMRefined != nullptr && s_dAuxSurfTol > m_pSTMRefined->GetTempParam() - EPS_SMALL) + m_pSTM = m_pSTMRefined->Clone() ; + return m_pSTM ; } // eseguo calcolo m_pSTM = GetApproxSurf( s_dAuxSurfTol, 100 * EPS_SMALL, false) ; @@ -1824,7 +1825,8 @@ SurfBezier::GetAuxSurfRefined( void) const else { // se con la stessa precisione di quella di visualizzazione restituisco quella if ( m_pSTM != nullptr && s_dAuxSurfRefinedTol > m_pSTM->GetTempParam() - EPS_SMALL) - return m_pSTM ; + m_pSTMRefined = m_pSTM->Clone() ; + return m_pSTMRefined ; } // eseguo calcolo m_pSTMRefined = GetApproxSurf( s_dAuxSurfRefinedTol, 100 * EPS_SMALL, true) ; From 1321742afe130375fe3b04a318b975101eb98b77 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Fri, 31 Oct 2025 13:21:37 +0100 Subject: [PATCH 4/5] EgtGeomKernel : - piccola correzione. --- SurfBezier.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/SurfBezier.cpp b/SurfBezier.cpp index 81deadb..05dd2d2 100644 --- a/SurfBezier.cpp +++ b/SurfBezier.cpp @@ -1791,9 +1791,10 @@ SurfBezier::GetAuxSurf( void) const } else { // se con la stessa precisione di quella di visualizzazione restituisco quella - if ( m_pSTMRefined != nullptr && s_dAuxSurfTol > m_pSTMRefined->GetTempParam() - EPS_SMALL) + if ( m_pSTMRefined != nullptr && s_dAuxSurfTol > m_pSTMRefined->GetTempParam() - EPS_SMALL) { m_pSTM = m_pSTMRefined->Clone() ; - return m_pSTM ; + return m_pSTM ; + } } // eseguo calcolo m_pSTM = GetApproxSurf( s_dAuxSurfTol, 100 * EPS_SMALL, false) ; @@ -1824,9 +1825,10 @@ SurfBezier::GetAuxSurfRefined( void) const } else { // se con la stessa precisione di quella di visualizzazione restituisco quella - if ( m_pSTM != nullptr && s_dAuxSurfRefinedTol > m_pSTM->GetTempParam() - EPS_SMALL) + if ( m_pSTM != nullptr && s_dAuxSurfRefinedTol > m_pSTM->GetTempParam() - EPS_SMALL) { m_pSTMRefined = m_pSTM->Clone() ; - return m_pSTMRefined ; + return m_pSTMRefined ; + } } // eseguo calcolo m_pSTMRefined = GetApproxSurf( s_dAuxSurfRefinedTol, 100 * EPS_SMALL, true) ; From 592a92ebdb0f9264444a9f71b7dc7dc403fa5dee Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Fri, 31 Oct 2025 15:05:44 +0100 Subject: [PATCH 5/5] EgtGeomKernel : - correzione alla getLoops. --- SurfBezier.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SurfBezier.cpp b/SurfBezier.cpp index 05dd2d2..d0c66ed 100644 --- a/SurfBezier.cpp +++ b/SurfBezier.cpp @@ -3403,7 +3403,7 @@ SurfBezier::CalcPoles( void) const bool SurfBezier::GetLoops( ICRVCOMPOPOVECTOR& vCC, bool bLineOrBezier) const { - // se necessario calcolo i poli + // se necessario calcolo i poli if ( m_vbPole.empty()) CalcPoles() ; @@ -3783,9 +3783,9 @@ SurfBezier::GetSingleEdge3D( bool bLineOrBezier, int nEdge) const else pCrvBz0->SetControlPoint( p, GetControlPoint( nIndex, nullptr), GetControlWeight( nIndex, nullptr)) ; } - pCrvBz0->Invert() ; pCrvCompo->AddCurve( Release( pCrvBz0)) ; } + pCrvCompo->Invert() ; } break ; } @@ -3805,9 +3805,9 @@ SurfBezier::GetSingleEdge3D( bool bLineOrBezier, int nEdge) const else pCrvBz1->SetControlPoint( p, GetControlPoint( nIndex, nullptr), GetControlWeight( nIndex, nullptr)) ; } - pCrvBz1->Invert() ; pCrvCompo->AddCurve( Release( pCrvBz1)) ; } + pCrvCompo->Invert() ; } break ; }