diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 4817995..2daa5cc 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/Milling.cpp b/Milling.cpp index 2b6c664..3429cb0 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -6533,13 +6533,11 @@ Milling::CalcAndSetCorrAuxDir( const ICurveComposite* pCompo, double dU, bool bI return true ; } } - // se impostato come parametro di lavorazione nelle UserNotes + // reset o assegnamento da 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) ; - return true ; - } + SetAuxDir( vtAux) ; return true ; } diff --git a/Operation.cpp b/Operation.cpp index fa0e297..5ac8f51 100644 --- a/Operation.cpp +++ b/Operation.cpp @@ -2727,11 +2727,15 @@ Operation::CalculateClPathRobotAxesValues( int nClPathId, double dAngDeltaMinFor Vector3d vtDir = pCamData->GetToolDir() ; 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 7d8e1f2..ecab9ae 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 2b7c3dd..2e2f491 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)