EgtMachKernel 3.1f3 :

- in PocketingNT aggiunto flag 404 e 405 per lavorazioni in doppio in parallelo.
This commit is contained in:
Riccardo Elitropi
2026-06-16 17:04:52 +02:00
parent 5578036bcd
commit b877fe54b2
3 changed files with 16 additions and 4 deletions
BIN
View File
Binary file not shown.
+15 -3
View File
@@ -5208,6 +5208,8 @@ PocketingNT::CalcDoubleParallelPenultimateStep( int nDouble, int nIdDblS, double
// recupero l'entità camData corrispondente
CamData* pCamData = GetCamData( m_pGeomDB->GetUserObj( nEntId)) ;
if ( pCamData != nullptr) {
// assegno Flag e recupero Feed
pCamData->SetFlag( 405) ;
double dFeed = pCamData->GetFeed() ;
// verifico se la curva corrente appartiene al piano del LastStep
bool bOnPlane = false ;
@@ -5317,11 +5319,13 @@ PocketingNT::CalcDoubleParallelPenultimateStep( int nDouble, int nIdDblS, double
double dNini = ( ptCurr - ORIG) * vtTool ;
double dNfin = ( ptStart - ORIG) * vtTool ;
AdjustCurveSlope( pCrvSafeLink, dNini, dNfin) ;
SetFlag( 405) ;
AddCurveMove( pCrvSafeLink, bSplitArcs, MCH_CL_PARALLEL_DBL) ;
}
}
else {
// aggiungo risalita nel vuoto
SetFlag( 405) ;
AddLinearMove( ptStart, bSplitArcs, MCH_CL_PARALLEL_DBL) ;
}
@@ -5346,6 +5350,7 @@ PocketingNT::CalcDoubleParallelPenultimateStep( int nDouble, int nIdDblS, double
#endif
}
SetFeed( dFeed) ;
SetFlag( 405) ;
// elaborazioni sulla curva corrente
if ( pCurve->GetType() == CRV_LINE) {
ICurveLine* pLine = GetCurveLine( pCurve) ;
@@ -5363,10 +5368,13 @@ PocketingNT::CalcDoubleParallelPenultimateStep( int nDouble, int nIdDblS, double
GetCurrPos( ptCurr) ;
double dDepth = ( - ( ptNeatEnd - ptCurr) * vtTool) / 2. ;
if ( dDepth > 25. * EPS_SMALL) { // sempre...
SetFlag( 405) ;
SetFeed( GetEndFeed()) ; // ho rimosso tutto il materiale
AddLinearMove( ptCurr - dDepth * vtTool, bSplitArcs, MCH_CL_PARALLEL_DBL) ;
}
SetFlag( 0) ;
return true ;
}
@@ -5611,7 +5619,7 @@ PocketingNT::AddPocket( STEPINFOPOVECTOR& vStepInfo, const Vector3d& vtTool, dou
return false ;
if ( dEscapeElev > 10. * EPS_SMALL && vtEscape.Len() > 10. * EPS_SMALL) {
AddLinearMove( ptP1 + vtTool * dLastElev, bSplitArcs) ;
if ( ! AddRetract( ptP1 + vtTool * dLastElev, vtEscape, dSafeZ, dSafeAggrBottZ, dEscapeElev, dAppr, bSplitArcs)) {
if ( ! AddRetract( ptP1 + vtTool * dLastElev, vtEscape, dSafeZ, dSafeAggrBottZ, dEscapeElev, dAppr, bSplitArcs, bDoubleParallel)) {
m_pMchMgr->SetLastError( 2417, "Error in PocketingNT : Retract not computable") ;
return false ;
}
@@ -5620,7 +5628,7 @@ PocketingNT::AddPocket( STEPINFOPOVECTOR& vStepInfo, const Vector3d& vtTool, dou
// aggiungo retroazione finale
if ( currPath.bToolCompensation && dLastElev < EPS_SMALL)
dLastElev = currStep.dDepth ;
if ( ! AddRetract( ptP1, vtTool, dSafeZ, dSafeAggrBottZ, dLastElev, dAppr, bSplitArcs)) {
if ( ! AddRetract( ptP1, vtTool, dSafeZ, dSafeAggrBottZ, dLastElev, dAppr, bSplitArcs, bDoubleParallel)) {
m_pMchMgr->SetLastError( 2417, "Error in PocketingNT : Retract not computable") ;
return false ;
}
@@ -6242,7 +6250,7 @@ PocketingNT::AddLinkRetract( const Point3d& ptP, const Vector3d& vtTool, double
//----------------------------------------------------------------------------
bool
PocketingNT::AddRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dSafeAggrBottZ,
double dElev, double dAppr, bool bSplitArcs)
double dElev, double dAppr, bool bSplitArcs, bool bDoubleParallel)
{
// se con aggregato da sotto o equivalente (rinvio a 90 gradi su testa 5 assi)
bool bBottomOutStart = false ;
@@ -6253,6 +6261,8 @@ PocketingNT::AddRetract( const Point3d& ptP, const Vector3d& vtTool, double dSaf
dDistBottom = 0 ;
bBottomOutStart = ( dDistBottom < - 10 * EPS_SMALL) ;
}
if ( bDoubleParallel)
SetFlag( 404) ;
// se sopra uscita c'è spazio per sicurezza o approccio
double dSafeDist = ( m_bAggrBottom ? dSafeAggrBottZ : dSafeZ) ;
if ( ! bBottomOutStart && dElev + max( dSafeDist, dAppr) > 10 * EPS_SMALL) {
@@ -6302,6 +6312,8 @@ PocketingNT::AddRetract( const Point3d& ptP, const Vector3d& vtTool, double dSaf
return false ;
}
}
if ( bDoubleParallel)
SetFlag( 0) ;
return true ;
}
+1 -1
View File
@@ -156,7 +156,7 @@ class PocketingNT : public Machining
bool AddLinkRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dSafeAggrBottZ,
double dElev, double dAppr, bool bSplitArcs) ;
bool AddRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dSafeAggrBottZ,
double dElev, double dAppr, bool bSplitArcs) ;
double dElev, double dAppr, bool bSplitArcs, bool bDoubleParallel) ;
bool CalcFirstElevation( const Point3d& ptP1, const Vector3d& vtTool,
const StepInfoPO& currStep, double dSafeZ, double dStep, double& dCurrElev,
double& dEscapeElev, Vector3d& vtEscape) const ;