From cc9a2314ebb3b828677d55ecf63381542e1115b3 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 12 Jun 2026 18:18:44 +0200 Subject: [PATCH] =?UTF-8?q?-=20in=20FACEBYCHAINSAW=20corretti=20punti=20di?= =?UTF-8?q?=20attacco=20per=20verifica=20finecorsa;=20corretto=20calcolo?= =?UTF-8?q?=20safeZ=20-=20in=20MachiningLib=20piccola=20correzione=20alla?= =?UTF-8?q?=20stima=20lunghezza=20percorso=20sega=20a=20catena=20-=20in=20?= =?UTF-8?q?STR0003=20si=20gestisce=20il=20cambio=20di=20orientamento=20seg?= =?UTF-8?q?a=20a=20catena=20in=20caso=20di=20lavorazione=20fallita=20(es:?= =?UTF-8?q?=20finecorsa);=20se=20raggio=20lama=20non=20finito=20si=20abbas?= =?UTF-8?q?sa=20la=20qualit=C3=A0=20(SEMI)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/MachiningLib.lua | 4 ++-- Strategies/Standard/STR0003/STR0003.lua | 11 +++++++++-- StrategyLibs/FACEBYCHAINSAW.lua | 7 ++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/LuaLibs/MachiningLib.lua b/LuaLibs/MachiningLib.lua index 19d1465..b6ad0d5 100644 --- a/LuaLibs/MachiningLib.lua +++ b/LuaLibs/MachiningLib.lua @@ -1593,8 +1593,8 @@ function MachiningLib.GetTimeToMachineAllStepsWithLeadInOut( Machining, Part) Machining.CloneStepsLongitudinal.nCount = 1 end -- stima tempi di lavorazione per i diversi tratti - local dTimeToMachineLeadIn = ( Machining.dDepthToMachine + ( TOOLS[Machining.nToolIndex].SetupInfo.dZSafeDelta or 60) + EgtMdbGetGeneralParam( MCH_GP.SAFEZ)) / dToolStartFeed - local dTimeToMachineLeadOut = ( Machining.dDepthToMachine + ( TOOLS[Machining.nToolIndex].SetupInfo.dZSafeDelta or 60) + EgtMdbGetGeneralParam( MCH_GP.SAFEZ)) / dToolEndFeed + local dTimeToMachineLeadIn = ( Machining.dDepthToMachine + ( TOOLS[Machining.nToolIndex].SetupInfo.dZSafeDelta or 0) + EgtMdbGetGeneralParam( MCH_GP.SAFEZ)) / dToolStartFeed + local dTimeToMachineLeadOut = ( Machining.dDepthToMachine + ( TOOLS[Machining.nToolIndex].SetupInfo.dZSafeDelta or 0) + EgtMdbGetGeneralParam( MCH_GP.SAFEZ)) / dToolEndFeed local dTimeToMachineEdge = Machining.dLengthToMachine / dToolFeed -- calcolo lunghezze e tempi if Machining.Steps.nStepType == MCH_MILL_ST.ZIGZAG then diff --git a/Strategies/Standard/STR0003/STR0003.lua b/Strategies/Standard/STR0003/STR0003.lua index 0650064..4ceb742 100644 --- a/Strategies/Standard/STR0003/STR0003.lua +++ b/Strategies/Standard/STR0003/STR0003.lua @@ -415,7 +415,8 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters) end -- ancora materiale residuo - se possibile si lavora dal lato - if Chainsaw.Result.Bottom[#Chainsaw.Result.Bottom].dResidualDepth > 10 * GEO.EPS_SMALL + if ( Chainsaw.Result.Bottom[#Chainsaw.Result.Bottom].dResidualDepth > 10 * GEO.EPS_SMALL + or not Chainsaw.Result.Bottom[#Chainsaw.Result.Bottom].bIsApplicable) and #Proc.MainFaces.SideFaces == 1 then -- si lavora solamente l'impronta lama sul fondo @@ -698,7 +699,13 @@ function STR0003.Make( bAddMachining, Proc, Part, CustomParameters) else Strategy.Result.sStatus = 'Not-Completed' end - Strategy.Result.dQuality = FeatureLib.GetStrategyQuality( Result) + + if Proc.Topology.sName == 'Groove-4-Blind' or Proc.Topology.sName == 'Pocket-5-Blind' then + Strategy.Result.dQuality = FeatureLib.GetStrategyQuality( 'SEMI') + else + Strategy.Result.dQuality = FeatureLib.GetStrategyQuality( Result) + end + Strategy.Result.dTimeToMachine = FeatureLib.GetStrategyTimeToMachine( Result) Strategy.Result.dMRR = ( dFeatureVolume / Strategy.Result.dTimeToMachine) / pow( 10, 6) else diff --git a/StrategyLibs/FACEBYCHAINSAW.lua b/StrategyLibs/FACEBYCHAINSAW.lua index 645584f..8e3dbcc 100644 --- a/StrategyLibs/FACEBYCHAINSAW.lua +++ b/StrategyLibs/FACEBYCHAINSAW.lua @@ -44,8 +44,9 @@ local function CalculateLeadInOut( Machining, EdgeToMachine, sSideToMachine, dLe end -- punti dell'attacco - LeadIn.ptPoint = EdgeToMachine.ptStart - EdgeToMachine.vtEdge * LeadIn.dStartAddLength + EdgeToMachine.vtN * ( EdgeToMachine.dElevation - Machining.dDepthToMachine) - LeadOut.ptPoint = EdgeToMachine.ptEnd + EdgeToMachine.vtEdge * LeadOut.dEndAddLength + EdgeToMachine.vtN * ( EdgeToMachine.dElevation - Machining.dDepthToMachine) + local dLengthToAdd = EgtIf( Machining.bToolInvert, -Machining.dStartSafetyLength, EdgeToMachine.dElevation - ( Machining.dMaxElev or 0) + Machining.dStartSafetyLength) + LeadIn.ptPoint = EdgeToMachine.ptStart - EdgeToMachine.vtEdge * LeadIn.dStartAddLength + EdgeToMachine.vtN * dLengthToAdd + LeadOut.ptPoint = EdgeToMachine.ptEnd + EdgeToMachine.vtEdge * LeadOut.dEndAddLength + EdgeToMachine.vtN * dLengthToAdd return LeadIn, LeadOut end @@ -173,7 +174,7 @@ function FACEBYCHAINSAW.Make( Proc, Part, FaceToMachine, EdgeToMachine, Optional -- offset radiale Mortising.dRadialOffset = 0 -- distanza di sicurezza - Mortising.dStartSafetyLength = max( EdgeToMachine.dElevation, ( TOOLS[Mortising.nToolIndex].SetupInfo.dZSafeDelta or 60) + EgtMdbGetGeneralParam( MCH_GP.SAFEZ)) + Mortising.dStartSafetyLength = ( TOOLS[Mortising.nToolIndex].SetupInfo.dZSafeDelta or 0) + EgtMdbGetGeneralParam( MCH_GP.SAFEZ) -- overlap Mortising.dOverlap = 0 -- step