Merge commit '727025d2311ce1b8d464fc85ebe52b713f3a7a53' into feature/Svuotature

This commit is contained in:
Riccardo Elitropi
2025-03-04 08:07:04 +01:00
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)) {