diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index bb13488..690a2e1 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/Pocketing.cpp b/Pocketing.cpp index 0b416d7..c1aebc7 100644 --- a/Pocketing.cpp +++ b/Pocketing.cpp @@ -1621,7 +1621,7 @@ Pocketing::ProcessPath( int nPathId, int nPvId, int nClId) return false ; break ; case POCKET_SUB_SPIRALIN : - if ( ! AddSpiralIn( pCompo, vtTool, vtExtr, dDepth, dElev, dOkStep, bSplitArcs)) + if ( ! AddSpiralIn( pCompo, vtTool, vtExtr, dDepth, dElev, dOkStep, bSplitArcs, bMidOpen, ptMidOpen)) return false ; break ; case POCKET_SUB_SPIRALOUT : @@ -2594,7 +2594,7 @@ Pocketing::AddOneWay( const ICurveComposite* pCompo, const Vector3d& vtTool, con //---------------------------------------------------------------------------- bool Pocketing::AddSpiralIn( const ICurveComposite* pCompo, const Vector3d& vtTool, const Vector3d& vtExtr, - double dDepth, double dElev, double dOkStep, bool bSplitArcs) + double dDepth, double dElev, double dOkStep, bool bSplitArcs, bool bMidOpen, const Point3d& ptMidOpen) { // recupero distanze di sicurezza double dSafeZ = m_pMchMgr->GetCurrMachiningsMgr()->GetSafeZ() ; @@ -2620,6 +2620,18 @@ Pocketing::AddSpiralIn( const ICurveComposite* pCompo, const Vector3d& vtTool, c if ( pMCrv->GetCurveCount() == 0) break ; ++ nReg ; + + // se prima regione e gestione lato aperto + if ( nReg == 1 && bMidOpen) { + // premetto alla spirale la partenza da fuori + Point3d ptStart ; pMCrv->GetStartPoint( ptStart) ; + Vector3d vtMove = ptMidOpen - ptStart ; vtMove.Normalize() ; + Point3d ptOut = ptMidOpen + vtMove * ( 0.5 * m_TParams.m_dDiam + dSafeZ) ; + pMCrv->AddLine( ptOut, false) ; + // aggiungo al ritorno l'uscita + Point3d ptEnd ; pRCrv->GetEndPoint( ptEnd) ; + pRCrv->AddLine( ptOut, true) ; + } // determino numero e affondamento degli step int nStep = 1 ; diff --git a/Pocketing.h b/Pocketing.h index 868a831..e2e5061 100644 --- a/Pocketing.h +++ b/Pocketing.h @@ -80,7 +80,7 @@ class Pocketing : public Machining bool AddOneWay( const ICurveComposite* pCompo, const Vector3d& vtTool, const Vector3d& vtExtr, double dDepth, double dElev, double dOkStep, bool bSplitArcs) ; bool AddSpiralIn( const ICurveComposite* pCompo, const Vector3d& vtTool, const Vector3d& vtExtr, - double dDepth, double dElev, double dOkStep, bool bSplitArcs) ; + double dDepth, double dElev, double dOkStep, bool bSplitArcs, bool bMidOpen, const Point3d& ptMidOpen) ; bool AddSpiralOut( const ICurveComposite* pCompo, const Vector3d& vtTool, const Vector3d& vtExtr, double dDepth, double dElev, double dOkStep, bool bSplitArcs) ; bool CalcSpiral( const ICurveComposite* pCompo, int nReg, bool bSplitArcs,