diff --git a/LuaLibs/WProcessLapJoint.lua b/LuaLibs/WProcessLapJoint.lua index 6a43f81..607c190 100644 --- a/LuaLibs/WProcessLapJoint.lua +++ b/LuaLibs/WProcessLapJoint.lua @@ -32,6 +32,7 @@ -- 2023/10/02 Aggiunta segnalazione lavorazione tipo Side non trovata. -- 2023/11/14 Aggiunta tasche in doppio. -- Miglioramenti sostanziali nella gestione delle tasche. +-- 2023/11/16 Fresature a salire estese a groove cieche. -- Tabella per definizione modulo local WPL = {} @@ -1439,7 +1440,15 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacet, GDB_ID.ROOT) local dElev = WL.GetFaceElevation( Proc.Id, nFacet, nRawId) -- dati della faccia più orizzontale - local nOtherFacet = abs( nFacet - 1) + local nOtherFacet + local dMinZ = 1 + for i = 1, Proc.Fct do + local dCurrentZ = Proc.Face[i].VtN:getZ() + if dCurrentZ < dMinZ then + nOtherFacet = Proc.Face[i].Id + dMinZ = dCurrentZ + end + end local vtN2 = EgtSurfTmFacetNormVersor( Proc.Id, nOtherFacet, GDB_ID.ROOT) local dElevOtherFacet = WL.GetFaceElevation( Proc.Id, nOtherFacet, nRawId) -- se lap joint 2 facce dal basso e angolo negativo @@ -1892,12 +1901,12 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d -- 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 + if vtN2:getZ() < -0.996 then bUpwardMilling = true end -- step extra in caso di doppio con mix rabbet dal basso e dall'alto, per eliminare la lamina che potrebbe rimanere - if Proc.Double and Proc.Double == 2 and Proc.Topology == 'Rabbet' and + if Proc.Double and Proc.Double == 2 and ( Proc.Topology == 'Rabbet' or Proc.Topology == 'Groove') and not ( Proc.AffectedFaces.Bottom and Proc.Mirror.AffectedFaces.Bottom) and not ( Proc.AffectedFaces.Top and Proc.AffectedFaces.Bottom) then -- determino a quale delle due feature applicare la lavorazione local bProcVsMirrorToCopy = true