diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index 892a29a..5b39da5 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -1393,7 +1393,11 @@ function BeamLib.GetToolFromMachining( sMachiningName) else Tool.IsOnAggregate = false end + Tool.StemDiameter = EgtTdbGetCurrToolParam( MCH_TP.STEMDIAM) or 0 Tool.MaxDepth = EgtTdbGetCurrToolMaxDepth() or 0 + if Tool.StemDiameter > Tool.Diameter + GEO.EPS_SMALL then + Tool.MaxDepth = Tool.MaxDepth - BD.COLL_SIC + end -- altri utensili al momento non previsti else error( 'Wrong tool type') diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index cee96c8..98fc381 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -2455,7 +2455,7 @@ local function MakeContourByMill( Proc, idContourPath, vtTunnelDirection, dTunne -- dati utensile local ToolOpposite = BL.GetToolFromMachining( sMillingOpposite) - local bOppositMillingReachesHalfDepth = ToolOpposite.MaxDepth > dTunnelDepth + dCollSic - dDimStrip + local bOppositMillingReachesHalfDepth = ToolOpposite.MaxDepth > dTunnelDepth / 2 + dCollSic - dDimStrip / 2 -- applicazione lavorazione lato principale local sName = 'Contour_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) @@ -2510,7 +2510,7 @@ local function MakeContourByMill( Proc, idContourPath, vtTunnelDirection, dTunne dDepth = -dDimStrip / 2 -- si arriva al massimo raggiungibile else - dDepth = Tool.MaxDepth - dTunnelDepth / 2 + dDepth = Tool.MaxDepth - dTunnelDepth / 2 - dCollSic sWarn = 'Warning : incomplete' end -- non c'รจ lavorazione opposta @@ -2520,7 +2520,7 @@ local function MakeContourByMill( Proc, idContourPath, vtTunnelDirection, dTunne dDepth = dTunnelDepth / 2 - dDimStrip -- si arriva al massimo raggiungibile else - dDepth = Tool.MaxDepth - dTunnelDepth / 2 + dDepth = Tool.MaxDepth - dTunnelDepth / 2 - dCollSic sWarn = 'Warning : incomplete' end end @@ -2598,7 +2598,7 @@ local function MakeContourByMill( Proc, idContourPath, vtTunnelDirection, dTunne dDepth = -dDimStrip / 2 -- si arriva al massimo raggiungibile else - dDepth = Tool.MaxDepth - dTunnelDepth / 2 + dDepth = Tool.MaxDepth - dTunnelDepth / 2 - dCollSic sWarn = 'Warning : incomplete' end EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) @@ -2622,7 +2622,6 @@ local function MakeContourByMill( Proc, idContourPath, vtTunnelDirection, dTunne end end - if bMillingOk or ( bOppositeMillingNeeded and bMillingOppositeOk) then return true, sWarn else