diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 2a92867..7e996f8 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/Milling.cpp b/Milling.cpp index 993fc0c..6574bda 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -107,7 +107,7 @@ Milling* Milling::Clone( void) const { // alloco oggetto - Milling* pMill = new(nothrow) Milling ; + Milling* pMill = new( nothrow) Milling ; // eseguo copia dei dati if ( pMill != nullptr) { try { @@ -4414,7 +4414,8 @@ Milling::AddSawBladeSideApproach( const Point3d& ptP, const Vector3d& vtAppr, co Vector3d vtMove = Vector3d( vtTool.x, vtTool.y, 0) ; if ( vtMove.Normalize()) { if ( m_bAboveHead && vtAppr.z < LIM_DOWN_APPRZ) { - double dExtraElev ; + // deve essere inizializzata a zero + double dExtraElev = 0 ; if ( GetAhPointUnderRaw( ptP1a, vtTool, m_TParams.m_dTDiam / 2, GetRadiusForStartEndElevation( false), m_TParams.m_dLen, true, dSafeZ, vtMove, dExtraElev)) { @@ -4436,7 +4437,8 @@ Milling::AddSawBladeSideApproach( const Point3d& ptP, const Vector3d& vtAppr, co } } else if ( ! m_bAboveHead && vtAppr.z > -LIM_DOWN_APPRZ) { - double dExtraElev ; + // deve essere inizializzata a zero + double dExtraElev = 0 ; if ( GetUhPointAboveRaw( ptP1a, vtTool, m_TParams.m_dTDiam / 2, GetRadiusForStartEndElevation( false), m_TParams.m_dLen, true, dSafeZ, vtMove, dExtraElev)) { @@ -4630,7 +4632,8 @@ Milling::AddSawBladeSideRetract( const Point3d& ptP, const Vector3d& vtRetr, con vtMove = Vector3d( vtTool.x, vtTool.y, 0) ; if ( vtMove.Normalize()) { if ( m_bAboveHead && vtRetr.z < LIM_DOWN_APPRZ) { - double dExtraElev ; + // deve essere inizializzata a zero + double dExtraElev = 0 ; if ( GetAhPointUnderRaw( ptP4, vtTool, m_TParams.m_dTDiam / 2, GetRadiusForStartEndElevation( false), m_TParams.m_dLen, true, dSafeZ, vtMove, dExtraElev)) { @@ -4641,7 +4644,8 @@ Milling::AddSawBladeSideRetract( const Point3d& ptP, const Vector3d& vtRetr, con } } else if ( ! m_bAboveHead && vtRetr.z > -LIM_DOWN_APPRZ) { - double dExtraElev ; + // deve essere inizializzata a zero + double dExtraElev = 0 ; if ( GetUhPointAboveRaw( ptP4, vtTool, m_TParams.m_dTDiam / 2, GetRadiusForStartEndElevation( false), m_TParams.m_dLen, true, dSafeZ, vtMove, dExtraElev)) { @@ -6394,7 +6398,7 @@ Milling::CalcAndSetCorrAuxDir( const ICurveComposite* pCompo, double dU, bool bI //---------------------------------------------------------------------------- Vector3d -Milling::CalcCorrDir( const ICurveComposite* pCompo, double dU, bool bInvertSide, bool bSawSpecial) +Milling::CalcCorrDir( const ICurveComposite* pCompo, double dU, bool bInvertSide, bool bSawSpecial) const { // verifico curva if ( pCompo == nullptr) @@ -6465,7 +6469,7 @@ Milling::CalcCorrDir( const ICurveComposite* pCompo, double dU, bool bInvertSide //---------------------------------------------------------------------------- bool -Milling::CalcOffset( ICurveComposite* pCompo, double dSignOffs) +Milling::CalcOffset( ICurveComposite* pCompo, double dSignOffs) const { // determino opzioni di offset int nFlag = ICurve::OFF_FILLET ; diff --git a/Milling.h b/Milling.h index 71d7955..ca5080f 100644 --- a/Milling.h +++ b/Milling.h @@ -129,8 +129,8 @@ class Milling : public Machining bool GetPointAboveRaw( const Point3d& ptP, const Vector3d& vtTool) const ; bool GetPointBelowRaw( const Point3d& ptP, const Vector3d& vtTool) const ; bool CalcAndSetCorrAuxDir( const ICurveComposite* pCompo, double dU, bool bInvertSide = false, bool bSawSpecial = false) ; - Vector3d CalcCorrDir( const ICurveComposite* pCompo, double dU, bool bInvertSide = false, bool bSawSpecial = false) ; - bool CalcOffset( ICurveComposite* pCompo, double dSignOffs) ; + Vector3d CalcCorrDir( const ICurveComposite* pCompo, double dU, bool bInvertSide = false, bool bSawSpecial = false) const ; + bool CalcOffset( ICurveComposite* pCompo, double dSignOffs) const ; bool TrimExtendCurveToClosedStm( ICurveComposite* pCompo, int nCstmId, bool bInvert) ; private :