diff --git a/LuaLibs/WProcessLapJoint.lua b/LuaLibs/WProcessLapJoint.lua index cdf16ad..37226a1 100644 --- a/LuaLibs/WProcessLapJoint.lua +++ b/LuaLibs/WProcessLapJoint.lua @@ -24,6 +24,7 @@ -- 2023/06/30 Aggiunta lettura delle note esistenti dalle lavorazioni per evitare di sovrascriverle. -- 2023/07/10 In MakeSideGrooveByMill si impedisce ora di lavorare una groove se la testa deve scendere sotto al limite superiore del grezzo. -- 2023/07/25 Aggiunte passate laterali per SideGroove, se specificato SIDESTEP nelle note utensile. +-- 2023/01/08 Migliorato controllo testa sotto al grezzo in SieGroove. -- Tabella per definizione modulo local WPL = {} @@ -1505,9 +1506,13 @@ local function MakeSideGrooveByMill( Proc, nFacet, nRawId, b3Raw, sCustomMach, d EgtOutLog( sErr) return false, sErr end - -- se la testa scende sotto al limite superiore del grezzo e non c'è sufficiente capacità di sottosquadro + -- dimensioni della testa local dHeadMaxWidth = 250 - if dMillTotLen < ( abs( dRawMaxZ - dGrooveMinZ) + 1) and ( dElev > 0.5 * ( dMillDiam - dHeadMaxWidth) - 10 * GEO.EPS_SMALL) then + local dHeadMinWidth = 160 + local dHeadMinWidthHeight = 30 + -- se la testa scende sotto al limite superiore del grezzo e non c'è sufficiente capacità di sottosquadro + if ( dMillTotLen < ( abs( dRawMaxZ - dGrooveMinZ) + 10 * GEO.EPS_SMALL) and ( dElev > 0.5 * ( dMillDiam - dHeadMinWidth) - 10 * GEO.EPS_SMALL)) or + ( dMillTotLen + dHeadMinWidthHeight < ( abs( dRawMaxZ - dGrooveMinZ) + 10 * GEO.EPS_SMALL) and ( dElev > 0.5 * ( dMillDiam - dHeadMaxWidth) - 10 * GEO.EPS_SMALL)) then local sErr = 'Error : Tool too short, head will collide with rawpart' EgtOutLog( sErr) return false, sErr