From b6127178ba39d468f183c9ed7861d54e7fb0ceb2 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 15 Jan 2019 08:39:19 +0000 Subject: [PATCH] EgtMachKernel : - fori senza estrusione prendono la normale del cerchio - in fresatura nella verifica di attacco sopra il pezzo ora si tiene conto dell'affondamento - in simulazione cambiati parametri spezzatura archi per Vmill. --- Drilling.cpp | 7 ++----- Milling.cpp | 8 ++++++-- Simulator.cpp | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Drilling.cpp b/Drilling.cpp index 5b9eb8d..5d12a58 100644 --- a/Drilling.cpp +++ b/Drilling.cpp @@ -1232,11 +1232,6 @@ Drilling::GetHoleData( SelData Id, Hole& hole) pMyArc.Set( CreateCurveArc()) ; if ( IsNull( pMyArc) || ! pMyArc->Set( ptCen, vtN, dRad)) return false ; - //if ( pCompo == nullptr) - // return false ; - //const ICurveArc* pArcTmp = GetCurveArc( pCompo->GetFirstCurve()) ; - //if ( pArcTmp == nullptr || ! pMyArc.Set( pArcTmp->Clone())) - // return false ; Vector3d vtExtr ; pCompo->GetExtrusion( vtExtr) ; pMyArc->SetExtrusion( vtExtr) ; double dThick = 0 ; pCompo->GetThickness( dThick) ; @@ -1251,6 +1246,8 @@ Drilling::GetHoleData( SelData Id, Hole& hole) Vector3d vtExtr ; if ( ! pArc->GetExtrusion( vtExtr)) return false ; + if ( vtExtr.IsSmall()) + vtExtr = pArc->GetNormVersor() ; // recupero spessore double dThick = 0 ; pArc->GetThickness( dThick) ; diff --git a/Milling.cpp b/Milling.cpp index 41ca12c..519fbb3 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -2194,8 +2194,12 @@ Milling::AddOneWayMilling( const ICurveComposite* pCompo, const Vector3d& vtTool } // verifico se attacco e uscita sopra il grezzo - Point3d ptStart ; pCompo->GetStartPoint( ptStart) ; - Point3d ptEnd ; pCompo->GetEndPoint( ptEnd) ; + Point3d ptStart ; + pCompo->GetStartPoint( ptStart) ; + ptStart -= vtTool * dDepth ; + Point3d ptEnd ; + pCompo->GetEndPoint( ptEnd) ; + ptEnd -= vtTool * dDepth ; bool bAboveStartEnd = m_pMchMgr->GetHeadAbove( m_TParams.m_sHead) && GetPointAboveRaw( ptStart) && GetPointAboveRaw( ptEnd) ; // determino numero e affondamento degli step diff --git a/Simulator.cpp b/Simulator.cpp index fe8fb3d..59a532c 100644 --- a/Simulator.cpp +++ b/Simulator.cpp @@ -943,8 +943,8 @@ Simulator::ManageSingleMove( int& nStatus, double& dMove) vtRot.Rotate( vtN, dPrevCoeff * dAngCen) ; // approssimo movimento con 1 o pił step a seconda ci sia Vmill int nStep = 1 ; - const double ANG_STEP = 10.0 ; - const double LEN_STEP = 10.0 ; + const double ANG_STEP = 15.0 ; + const double LEN_STEP = 1.0 ; if ( m_nVmId != GDB_ID_NULL) nStep = int( max( max( abs( dDiffAng) / ANG_STEP, abs( dDiffAng * DEGTORAD * dRad) / LEN_STEP), 1.0)) ; for ( int i = 1 ; i <= nStep ; ++ i) {