EgtMachKernel :

- ripristino stato progetto se non si riesce ad impostare il gruppo corrente causa errore in disposizione
- in finitura superfici modifica offset silhouette per eliminazione punti inutili a Zminima.
This commit is contained in:
Dario Sassi
2025-03-03 17:24:57 +01:00
parent f1cb57e084
commit 727025d231
2 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -387,8 +387,10 @@ MachMgr::SetCurrMachGroup( int nId)
// aggiorno attrezzaggio attivo
UpdateCurrSetup() ;
// imposto la prima fase come corrente
if ( ! SetCurrPhase( 1))
if ( ! SetCurrPhase( 1)) {
ResetCurrMachGroup() ;
return false ;
}
// nascondo i pezzi rimasti sotto la radice
ShowRootParts( false) ;
// rendo visibile il nuovo gruppo corrente e la relativa macchina
+3 -3
View File
@@ -1594,6 +1594,8 @@ SurfFinishing::ProcessSfr( int nPathId, int nPvId, int nClId)
return false ;
}
// creo la regione piana dalle PolyLine ricavate dalla Silhouette
const double SILH_ARC_TOL = 0.1 * SILH_TOL ;
const double SILH_ARC_FEA_MAX = 100. ;
SurfFlatRegionByContours SfrMaker ;
for ( auto& PL : vPL) {
// recupero la curva dalla silhouette
@@ -1602,8 +1604,6 @@ SurfFinishing::ProcessSfr( int nPathId, int nPvId, int nClId)
return false ;
pSilCrv->FromPolyLine( PL) ;
// approssimo con archi
const double SILH_ARC_TOL = 0.1 * SILH_TOL ;
const double SILH_ARC_FEA_MAX = 100. ;
PolyArc PA ;
if ( pSilCrv->ApproxWithArcsEx( SILH_ARC_TOL, ANG_TOL_STD_DEG, SILH_ARC_FEA_MAX, PA)) {
PtrOwner<ICurveComposite> pTempCrv( CreateCurveComposite()) ;
@@ -1622,7 +1622,7 @@ SurfFinishing::ProcessSfr( int nPathId, int nPvId, int nClId)
PtrOwner<ISurfFlatRegion> pSfrSil( SfrMaker.GetSurf()) ;
if ( ! IsNull( pSfrSil)) {
pSfrSil->ToGlob( frSurf) ;
double dPockRadOffs = m_TParams.m_dDiam - m_Params.m_dSideStep - m_Params.m_dOverlap ;
double dPockRadOffs = SILH_ARC_TOL ;
pSfrSil->Offset( dPockRadOffs, ICurve::OFF_CHAMFER) ;
// intersezione tra contorno e regione
if ( ! pSfrCnt->Intersect( *pSfrSil)) {