diff --git a/MachMgr.h b/MachMgr.h index c360638..d877d8c 100644 --- a/MachMgr.h +++ b/MachMgr.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- // EgalTech 2015-2024 //---------------------------------------------------------------------------- -// File : MachMgr.h Data : 02.04.24 Versione : 2.6d1 +// File : MachMgr.h Data : 22.04.24 Versione : 2.6d4 // Contenuto : Dichiarazione della classe MachMgr. // // @@ -15,6 +15,7 @@ // 28.10.23 DS Aggiunte GetClEntAxesVal e GetToolSetupPosInCurrSetup. // 30.03.24 DS Aggiunte GetAllAxesNames e GetCalcTable. // 02.04.24 DS Aggiunta GetClEntAxesMask. +// 22.04.24 DS Aggiunta GetExitId. // //---------------------------------------------------------------------------- @@ -361,6 +362,7 @@ class MachMgr : public IMachMgr int GetAxisId( const std::string& sAxis) const override ; int GetHeadId( const std::string& sHead) const override ; int GetHeadExitCount( const std::string& sHead) const override ; + int GetExitId( const std::string& sHead, int nExit) const override ; int GetTcPosId( const std::string& sTcPos) const override ; bool GetAxisToken( const std::string& sAxis, std::string& sToken) const override ; bool GetAxisType( const std::string& sAxis, bool& bLinear) const override ; diff --git a/MachMgrMachines.cpp b/MachMgrMachines.cpp index ef4ba1b..50f4caa 100644 --- a/MachMgrMachines.cpp +++ b/MachMgrMachines.cpp @@ -274,6 +274,15 @@ MachMgr::GetHeadExitCount( const string& sHead) const return ( ( pMch != nullptr) ? pMch->GetHeadExitCount( sHead) : 0) ; } +//---------------------------------------------------------------------------- +int +MachMgr::GetExitId( const string& sHead, int nExit) const +{ + Machine* pMch = GetCurrMachine() ; + // recupero identificativo dell'uscita della testa indicata nella macchina corrente + return ( ( pMch != nullptr) ? pMch->GetExitId( sHead, nExit) : GDB_ID_NULL) ; +} + //---------------------------------------------------------------------------- int MachMgr::GetTcPosId( const string& sTcPos) const diff --git a/Milling.cpp b/Milling.cpp index 3d32bd5..010559a 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -2934,8 +2934,9 @@ Milling::AddZigZagMilling( const ICurveComposite* pCompo, const Vector3d& vtTool m_pMchMgr->SetLastError( 2324, "Error in Milling : LeadOut must be out of rawpart") ; bOk = false ; } - // aggiungo opportuna retrazione - if ( ! AddSawBladeSideRetract( ptP1, vtRetr, vtTool, dSafeZ, dSawEndElev, dEndElev, dAppr)) { + // se finale oppure dentro il materiale, aggiungo opportuna retrazione + if ( ( k == nStep || ! bUnderEnd) && + ! AddSawBladeSideRetract( ptP1, vtRetr, vtTool, dSafeZ, dSawEndElev, dEndElev, dAppr)) { m_pMchMgr->SetLastError( 2312, "Error in Milling : Retract not computable") ; return false ; } @@ -4602,7 +4603,7 @@ Milling::AddSawBladeSideRetract( const Point3d& ptP, const Vector3d& vtRetr, con } } - if ( bAddExtract && + if ( bAddExtract && ! AreSameVectorEpsilon( vtRetr, vtTool, LIM_SIN_DIFF_DIR) && ( ! AreSameVectorEpsilon( vtMove, vtTool, LIM_SIN_DIFF_DIR) || dEndElev + dSafeZ > dMove + 10 * EPS_SMALL)) { Point3d ptCurr ; if ( ! GetCurrPos( ptCurr)) diff --git a/Simulator.cpp b/Simulator.cpp index a9fe706..cdab2cf 100644 --- a/Simulator.cpp +++ b/Simulator.cpp @@ -2135,6 +2135,8 @@ Simulator::SetToolForVmill( const string& sTool, const string& sHead, int nExit, ExeVolZmapSetGenTool( vVmill, sTool, nOutlineId, nFlag, bFirst) ; else if ( nType == TT_MORTISE_STD) ExeVolZmapSetMortiserTool( vVmill, sTool, dLen, dDiam, dThick, dCornR, nFlag, bFirst) ; + else if ( nType == TT_CHISEL_STD) + ExeVolZmapSetChiselTool( vVmill, sTool, dLen, dDiam, dDiam, nFlag, bFirst) ; else if ( nType == TT_SAW_STD || nType == TT_SAW_FLAT) ExeVolZmapSetSawTool( vVmill, sTool, dLen, dDiam, dThick, 0, dCornR, nFlag, bFirst) ; else if ( nType == TT_WATERJET)