EgtMachKernel :

- a fresatura aggiunta gestione lista di curve per FaceUse tramite "EdgesFaceUse" con valori a vettore di interi in UserNotes
- in tutte le lavorazioni sistemato ricalcolo con stato con bit MCH_ST_GEO_MODIF impostato
- in tutte le lavorazioni SetGeometry imposta bit MCH_ST_GEO_MODIF solo se gli Id e i SubId delle geometrie sono effettivamente variati.
This commit is contained in:
Dario Sassi
2025-04-07 11:54:28 +02:00
parent c944dd9893
commit ef28db40e1
16 changed files with 210 additions and 80 deletions
+10 -4
View File
@@ -397,7 +397,8 @@ Chiseling::SetGeometry( const SELVECTOR& vIds)
// verifico validità gestore DB geometrico
if ( m_pGeomDB == nullptr)
return false ;
// reset della geometria corrente
// copia temporanea e reset della geometria corrente
SELVECTOR vOldId = m_vId ;
m_vId.clear() ;
// verifico che gli identificativi rappresentino delle entità ammissibili (tutte curve o tutte facce)
int nType = GEO_NONE ;
@@ -413,7 +414,8 @@ Chiseling::SetGeometry( const SELVECTOR& vIds)
m_vId.emplace_back( Id) ;
}
// aggiorno lo stato
m_nStatus |= MCH_ST_GEO_MODIF ;
if ( m_vId != vOldId)
m_nStatus |= MCH_ST_GEO_MODIF ;
// restituisco presenza geometria da lavorare
return ( ! m_vId.empty() || vIds.empty()) ;
}
@@ -501,6 +503,10 @@ Chiseling::Apply( bool bRecalc, bool bPostApply)
return false ;
}
// se modificata geometria, necessario ricalcolo
if ( ( m_nStatus & MCH_ST_GEO_MODIF) != 0)
bRecalc = true ;
// verifico se necessario continuare nell'aggiornamento
if ( ! bRecalc && ! bToolChanged &&
( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) {
@@ -1016,7 +1022,7 @@ Chiseling::GetCurves( SelData Id, ICURVEPLIST& lstPC)
// la porto in globale
pCrvCompo->ToGlob( frGlob) ;
// sistemazioni varie
AdjustCurveFromSurf( pCrvCompo, TOOL_ORTHO, FACE_CONT, V_NULL, 0) ;
AdjustCurveFromSurf( pCrvCompo, TOOL_ORTHO, FACE_CONT, V_NULL, {}, 0) ;
// la restituisco
lstPC.emplace_back( Release( pCrvCompo)) ;
return true ;
@@ -1052,7 +1058,7 @@ Chiseling::GetCurves( SelData Id, ICURVEPLIST& lstPC)
// la porto in globale
pCrvCompo->ToGlob( frGlob) ;
// sistemazioni varie
AdjustCurveFromSurf( pCrvCompo, TOOL_ORTHO, FACE_CONT, V_NULL, 0) ;
AdjustCurveFromSurf( pCrvCompo, TOOL_ORTHO, FACE_CONT, V_NULL, {}, 0) ;
// la restituisco
lstPC.emplace_back( Release( pCrvCompo)) ;
}