From 67b34008c514359dc8ef3c440de02127f970b0ed Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 8 Apr 2026 14:49:54 +0200 Subject: [PATCH] EgtMachKernel 3.1d2 : - migliorata gestione Versore Direzione Ausiliaria per robot e centri di lavoro - aggiunta anche a sgrossatura e finitura superfici. --- EgtMachKernel.rc | Bin 11774 -> 11774 bytes Milling.cpp | 8 +++----- Operation.cpp | 8 ++++++-- Pocketing.cpp | 5 ++--- PocketingNT.cpp | 5 ++--- SurfFinishing.cpp | 9 +++++++++ SurfRoughing.cpp | 4 ++++ 7 files changed, 26 insertions(+), 13 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 4817995b83c2f318d7b9da582eabc29a576423cd..2daa5cc1a7771a980430d04c2a4c47d0bd535689 100644 GIT binary patch delta 236 zcmewt{V#gMI%aKGhCGIJh8%`WhGK>c1_cHUhESkLCPN8BDnkm89}HwAf_cT0IklxX ze_&=~W;ELTUhX2(<& nF)y2}rOv|(a;PWRX*mp)AcsxGetToolDir() ; Vector3d vtAux ; if ( ! bUseRefAux) { - if ( nSolCh == MCH_SCC_ADIR_NEAR || nSolCh == MCH_SCC_ADIR_FAR) { + if (( nSolCh == MCH_SCC_ADIR_NEAR || nSolCh == MCH_SCC_STD) && ! pCamData->GetAuxDir().IsSmall()) { vtAux = OrthoCompo( pCamData->GetAuxDir(), vtDir) ; vtAux.Normalize() ; } - else { + else if (( nSolCh == MCH_SCC_ADIR_FAR || nSolCh == MCH_SCC_OPPOSITE) && ! pCamData->GetAuxDir().IsSmall()) { + vtAux = - OrthoCompo( pCamData->GetAuxDir(), vtDir) ; + vtAux.Normalize() ; + } + else { // MCH_SCC_NONE (o riconducibili a questo) Frame3d frTool ; frTool.Set( ORIG, vtDir) ; frTool.Rotate( frTool.Orig(), frTool.VersZ(), 0, 1) ; diff --git a/Pocketing.cpp b/Pocketing.cpp index a78414d..6657e83 100644 --- a/Pocketing.cpp +++ b/Pocketing.cpp @@ -5169,10 +5169,9 @@ Pocketing::AddApproach( const Point3d& ptP, const Vector3d& vtTool, double dSafe else { // se impostato come parametro di lavorazione nelle UserNotes Vector3d vtAux ; - if ( GetValInNotes( m_Params.m_sUserNotes, UN_VTAUXDIR, vtAux)) { + if ( GetValInNotes( m_Params.m_sUserNotes, UN_VTAUXDIR, vtAux)) vtAux.Normalize() ; - SetAuxDir( vtAux) ; - } + SetAuxDir( vtAux) ; } // se sopra attacco c'è spazio per sicurezza o approccio double dSafeDist = ( m_bAggrBottom ? dSafeAggrBottZ : dSafeZ) ; diff --git a/PocketingNT.cpp b/PocketingNT.cpp index c34052c..7bc95cc 100644 --- a/PocketingNT.cpp +++ b/PocketingNT.cpp @@ -5261,10 +5261,9 @@ PocketingNT::AddApproach( const Point3d& ptP, const Vector3d& vtTool, double dSa else { // se impostato come parametro di lavorazione nelle UserNotes Vector3d vtAux ; - if ( GetValInNotes( m_Params.m_sUserNotes, UN_VTAUXDIR, vtAux)) { + if ( GetValInNotes( m_Params.m_sUserNotes, UN_VTAUXDIR, vtAux)) vtAux.Normalize() ; - SetAuxDir( vtAux) ; - } + SetAuxDir( vtAux) ; } // se sopra attacco c'è spazio per sicurezza o approccio double dSafeDist = ( m_bAggrBottom ? dSafeAggrBottZ : dSafeZ) ; diff --git a/SurfFinishing.cpp b/SurfFinishing.cpp index 11062b3..c12ff24 100644 --- a/SurfFinishing.cpp +++ b/SurfFinishing.cpp @@ -1797,6 +1797,11 @@ SurfFinishing::ProcessCrvCompo( int nPathId, int nPvId, int nClId) // Imposto dati comuni SetPathId( nPxId) ; SetToolDir( vtTool) ; + Vector3d vtAux ; + if ( GetValInNotes( m_Params.m_sUserNotes, UN_VTAUXDIR, vtAux)) + vtAux.Normalize() ; + SetAuxDir( vtAux) ; + // assegno il vettore estrusione al gruppo del percorso m_pGeomDB->SetInfo( nPxId, KEY_EXTR, vtTool) ; @@ -2042,6 +2047,10 @@ SurfFinishing::ProcessSfr( int nPathId, int nPvId, int nClId) // Imposto dati comuni SetPathId( nPxId) ; SetToolDir( vtTool) ; + Vector3d vtAux ; + if ( GetValInNotes( m_Params.m_sUserNotes, UN_VTAUXDIR, vtAux)) + vtAux.Normalize() ; + SetAuxDir( vtAux) ; // assegno il vettore estrusione al gruppo del percorso m_pGeomDB->SetInfo( nPxId, KEY_EXTR, vtTool) ; diff --git a/SurfRoughing.cpp b/SurfRoughing.cpp index d261184..2d7f712 100644 --- a/SurfRoughing.cpp +++ b/SurfRoughing.cpp @@ -2098,6 +2098,10 @@ SurfRoughing::ProcessPath( int nPathId, int nPvId, int nClId) // Imposto dati comuni SetPathId( nPxId) ; SetToolDir( vtTool) ; + Vector3d vtAux ; + if ( GetValInNotes( m_Params.m_sUserNotes, UN_VTAUXDIR, vtAux)) + vtAux.Normalize() ; + SetAuxDir( vtAux) ; // se richiesto ordine per ZChunk, aggiusto le geometrie inserite nel gruppo if ( m_bOrderZ)