From 6cfdb4d22b0f2301102e85b1e64792607edb2b3b Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 8 Feb 2016 10:50:10 +0000 Subject: [PATCH] EgtMachKernel 1.6n1 : - corretto riconoscimento tipo uscita estesa - corretto recupero angoli finali lavorazione precedente causa posizione home. --- EgtMachKernel.rc | Bin 11798 -> 11782 bytes Machining.cpp | 4 ++++ Sawing.cpp | 20 +++++++++++++++----- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 32bbdca06015d6f6263c7a5c4abaf275f44dfe54..9da9e71df901f444e510b3dfce823f340689b782 100644 GIT binary patch delta 118 zcmbOh(-yPg2OF~qgU;sve3zLfU*ODQ&SNl~>?oqUIftu{1uEmnj3nyDxOs=L2Qw~B T9*mp!NV~zL(RChB4&wp<-2fzL delta 129 zcmZpRnHIC*2OFyqgARk?=HG0#%&a*Kh75+29ffr_X9>A6ZeGXj!3>wa%ryCoU>=H+ RJ{Gtv7R}OlH7m{G1^`VyBsKs5 diff --git a/Machining.cpp b/Machining.cpp index d257657..1eaff08 100644 --- a/Machining.cpp +++ b/Machining.cpp @@ -550,6 +550,10 @@ Machining::CalculateAxesValues( void) if ( ! m_pMchMgr->SetCalcTool( GetToolData().m_sName, GetToolData().m_sHead, GetToolData().m_nExit)) return false ; + // rimuovo posizionamento home da lavorazione precedente (non può più essere l'ultima) + if ( pPrevMch != nullptr) + pPrevMch->RemoveHome() ; + // recupero il numero di assi lineari e rotanti attivi int nLinAxes = m_pMchMgr->GetCurrLinAxes() ; int nRotAxes = m_pMchMgr->GetCurrRotAxes() ; diff --git a/Sawing.cpp b/Sawing.cpp index 055681f..534d04b 100644 --- a/Sawing.cpp +++ b/Sawing.cpp @@ -1148,16 +1148,26 @@ Sawing::GenerateEntityPv( const ICurveLine* pLine, const Vector3d& vtTool, const m_pGeomDB->SetName( nId3, MCH_PV_POST_CUT) ; m_pGeomDB->SetMaterial( nId3, BLUE) ; - // regione di taglio ridotto per nesting (sono escluse le parti iniziale e finale) - int nRrId = ExeCreateSurfFrRectangle3P( nPxId, ptIni, ptCross, ptEnd, RTY_LOC) ; - m_pGeomDB->SetName( nRrId, MCH_PV_RRCUT) ; - m_pGeomDB->SetMaterial( nRrId, INVISIBLE) ; // regione di taglio completo per nesting double dExtraL = m_pMchMgr->GetCurrMachiningsMgr()->GetExtraLOnCutRegion() ; int nRId = ExeCreateSurfFrRectangle3P( nPxId, ptIni - vtDir * ( dDeltaT + dExtraL), ptCross + vtDir * ( dDeltaT + dExtraL), ptEnd, RTY_LOC) ; m_pGeomDB->SetName( nRId, MCH_PV_RCUT) ; m_pGeomDB->SetMaterial( nRId, INVISIBLE) ; + // regione di taglio ridotto per nesting (sono escluse le parti iniziale e finale) + int nRrId = ExeCreateSurfFrRectangle3P( nPxId, ptIni, ptCross, ptEnd, RTY_LOC) ; + m_pGeomDB->SetName( nRrId, MCH_PV_RRCUT) ; + m_pGeomDB->SetMaterial( nRrId, INVISIBLE) ; + // regione di ingresso al taglio (parte iniziale) + int nRsId = ExeCreateSurfFrRectangle3P( nPxId, ptIni - vtDir * ( dDeltaT + dExtraL), + ptIni + vtToolH, ptIni, RTY_LOC) ; + m_pGeomDB->SetName( nRsId, MCH_PV_RLICUT) ; + m_pGeomDB->SetMaterial( nRsId, INVISIBLE) ; + // regione di uscita dal taglio (parte finale) + int nReId = ExeCreateSurfFrRectangle3P( nPxId, ptEnd, ptCross + vtDir * ( dDeltaT + dExtraL), + ptEnd + vtDir * ( dDeltaT + dExtraL) , RTY_LOC) ; + m_pGeomDB->SetName( nReId, MCH_PV_RLOCUT) ; + m_pGeomDB->SetMaterial( nReId, INVISIBLE) ; // salvo in info del gruppo la larghezza XY del taglio e la distanza XY tra centro e bordo taglio m_pGeomDB->SetInfo( nPxId, MCH_PV_KEY_WT, vtToolH.LenXY()) ; @@ -1484,7 +1494,7 @@ Sawing::AdjustForEdges( ICurveLine* pLine, double dElev, const Vector3d& vtThick else if ( bIsLast) { if ( m_Params.m_nLeadOutType == SAW_LO_STRICT) dDeltaF = - dDeltaT ; - else if ( m_Params.m_nLeadInType == SAW_LO_EXT) { + else if ( m_Params.m_nLeadOutType == SAW_LO_EXT) { // estendo al bordo del grezzo // calcolo punto di fine e direzione (sono in globale) Point3d ptP ;