diff --git a/LuaLibs/WProcessLapJoint.lua b/LuaLibs/WProcessLapJoint.lua index 5af1dd0..a626a82 100644 --- a/LuaLibs/WProcessLapJoint.lua +++ b/LuaLibs/WProcessLapJoint.lua @@ -1805,6 +1805,12 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d end end + -- se la groove è rivolta verso il basso (-85°) lavoro a salire con step negativo + local bUpwardMilling = false + if Proc.Fct == 2 and vtN2:getZ() < -0.996 then + bUpwardMilling = true + end + local dStepOri if not bExcludeSideMill then -- inserisco la lavorazione di ribasso o gola @@ -1845,8 +1851,7 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d EgtSetMachiningParam( MCH_MP.DEPTH, dMaxMat) end end - -- se la groove è rivolta verso il basso (-85°) lavoro a salire con step negativo - if Proc.Fct == 2 and vtN2:getZ() < -0.996 then + if bUpwardMilling then dStep = -dStep end EgtSetMachiningParam( MCH_MP.STEP, dStep) @@ -1961,6 +1966,9 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d dMaxElev = max( ( nStepOtherFace + 1) * dStepOtherFace - GEO.EPS_SMALL, 0) dDepthOtherFace = dElevOtherFacet end + if bUpwardMilling then + dStepOtherFace = -dStepOtherFace + end EgtSetMachiningParam( MCH_MP.STEP, dStepOtherFace) EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxElev, 3) .. ';') if bMachFromDn then