From 704c035dbb695d4fd45260fe6adaafe5b8af9f4d Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 15 Mar 2018 19:13:41 +0000 Subject: [PATCH] =?UTF-8?q?EgtMachKernel=20:=20-=20a=20Milling=20e=20Pocke?= =?UTF-8?q?ting=20aggiunta=20possibilit=C3=A0=20di=20impostare=20da=20note?= =?UTF-8?q?=20utente=20elevazione=20massima=20(MaxElev=3D...)=20-=20miglio?= =?UTF-8?q?rato=20riconoscimento=20singolo=20lato=20di=20contorno=20di=20f?= =?UTF-8?q?accia.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Milling.cpp | 4 ++++ Operation.cpp | 2 +- Pocketing.cpp | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Milling.cpp b/Milling.cpp index ffefb6e..686e55b 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -1287,6 +1287,10 @@ Milling::ProcessPath( int nPathId, int nPvId, int nClId) } else return false ; + // eventuale imposizione massima elevazione da note utente + double dMaxElev ; + if ( FromString( ExtractInfo( m_Params.m_sUserNotes, "MaxElev="), dMaxElev) && dElev > dMaxElev) + dElev = dMaxElev ; // verifico che lo step dell'utensile sia sensato double dOkStep = m_Params.m_dStep ; diff --git a/Operation.cpp b/Operation.cpp index 62e8617..bb327ad 100644 --- a/Operation.cpp +++ b/Operation.cpp @@ -508,7 +508,7 @@ Operation::AdjustCurveFromSurf( ICurveComposite* pCrvCompo, int nToolDir, int nF dMin = b3Box.GetMin().x ; dMax = b3Box.GetMax().x ; } - double dTol = min( ( dMax - dMin) / 4., 20.) ; + double dTol = min( ( dMax - dMin) / 8., 20.) ; // cerco il punto medio delle curve più vicino all'estremo desiderato double dRef = dMin ; if ( nFaceUse == FACE_DOWN || nFaceUse == FACE_FRONT || nFaceUse == FACE_LEFT) diff --git a/Pocketing.cpp b/Pocketing.cpp index d314e57..d5a22c4 100644 --- a/Pocketing.cpp +++ b/Pocketing.cpp @@ -1135,6 +1135,10 @@ Pocketing::ProcessPath( int nPathId, int nPvId, int nClId) } else return false ; + // eventuale imposizione massima elevazione da note utente + double dMaxElev ; + if ( FromString( ExtractInfo( m_Params.m_sUserNotes, "MaxElev="), dMaxElev) && dElev > dMaxElev) + dElev = dMaxElev ; // verifico che il massimo materiale dell'utensile sia sensato const double MIN_MAXMAT = 1.0 ; @@ -1163,7 +1167,7 @@ Pocketing::ProcessPath( int nPathId, int nPvId, int nClId) ") bigger than MaxMaterial (" + ToString( m_TParams.m_dMaxMat, 1) + ")" ; LOG_INFO( GetEMkLogger(), sInfo.c_str()) ; } - // se lavorazione singola e l'elevazione supera la capacità dell'utensile + // se lavorazione singola e l'elevazione supera la capacità dell'utensile if ( ( dOkStep < EPS_SMALL || dOkStep > dElev) && dElev > m_TParams.m_dMaxMat + EPS_SMALL) { if ( dDepth + max( dThick, 0.0) > m_TParams.m_dMaxMat) { dDepth = m_TParams.m_dMaxMat - max( dThick, 0.0) ;