From b9bb1aefdd5bd780251a2f18008c928790247f7d Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 5 Nov 2024 17:20:44 +0100 Subject: [PATCH] =?UTF-8?q?-=20in=20BeamExec=20>=20GetToolsFromDB,=20in=20?= =?UTF-8?q?lettura=20parametri=20con=20EgtGetValInNotes,=20aggiunta=20'd'?= =?UTF-8?q?=20se=20valori=20numerici=20-=20in=20SPLITCUT=20>=20GetSplitStr?= =?UTF-8?q?ategy=20gestito=20caso=20in=20cui=20GetMaxMatReductionBladeCut?= =?UTF-8?q?=20non=20=C3=A8=20presente=20in=20BeamData=20anche=20per=20il?= =?UTF-8?q?=20Machining[2]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/BeamExec.lua | 16 ++++++++-------- Strategies/Standard/SPLITCUT/SPLITCUT.lua | 8 ++++++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/LuaLibs/BeamExec.lua b/LuaLibs/BeamExec.lua index a1cfbc1..4cceb0d 100644 --- a/LuaLibs/BeamExec.lua +++ b/LuaLibs/BeamExec.lua @@ -125,7 +125,7 @@ function BeamExec.GetToolsFromDB() Tool.ToolHolder.dDiameter = EgtTdbGetCurrToolThDiam() or TH_DIAMETER_HSK63 -- diametro standard HSK63 Tool.ToolHolder.dLength = EgtTdbGetCurrToolThLength() or TH_LENGTH_HSK63 -- lunghezza standard HSK63 -- parametri scritti nelle note - Tool.nDouble = EgtGetValInNotes( Tool.sUserNotes, 'DOUBLE') + Tool.nDouble = EgtGetValInNotes( Tool.sUserNotes, 'DOUBLE', 'd') Tool.bIsProfiledTool = not EgtTdbIsCurrToolStandardDraw() -- lettura parametri non comuni ( famiglia DRILLBIT non ha parametri specifici) @@ -140,23 +140,23 @@ function BeamExec.GetToolsFromDB() -- verifico che parametri siano compatibili con una fresa a coda di rondine ( angolo di fianco standard Coda di rondine -> 15°) Tool.bIsDoveTail = Tool.Type == 'MILL_NOTIP' and abs( abs( Tool.dSideAngle) - SIDEANGLE_DOVETAIL) < 1 -- verifico che sia una fresa tipo T-Mill o BlockHaus - Tool.dSideDepth = EgtGetValInNotes( Tool.sUserNotes, 'SIDEDEPTH') or 0 -- se non settato nell'utensile, dico che non ha massimo affondamento laterale + Tool.dSideDepth = EgtGetValInNotes( Tool.sUserNotes, 'SIDEDEPTH', 'd') or 0 -- se non settato nell'utensile, dico che non ha massimo affondamento laterale Tool.bIsTMill = Tool.dSideDepth > 0 - Tool.dStep = EgtGetValInNotes( Tool.sUserNotes, 'STEP') or ( Tool.dMaxMaterial / 3) -- se non settato nell'utensile, considero metà del tagliente - Tool.dSideStep = EgtGetValInNotes( Tool.sUserNotes, 'SIDESTEP') or floor( Tool.dDiameter / 3) -- se non settato nell'utensile, considero metà del diametro + Tool.dStep = EgtGetValInNotes( Tool.sUserNotes, 'STEP', 'd') or ( Tool.dMaxMaterial / 3) -- se non settato nell'utensile, considero metà del tagliente + Tool.dSideStep = EgtGetValInNotes( Tool.sUserNotes, 'SIDESTEP', 'd') or floor( Tool.dDiameter / 3) -- se non settato nell'utensile, considero metà del diametro Tool.bIsPen = abs( Tool.dSpeed) < 5 -- recupero parametri propri delle lame elseif sToolFamily == 'SAWBLADE' then Tool.bIsUsedForLongCut = EgtGetValInNotes( Tool.sUserNotes, 'LONGCUT') == 1 or false -- false come valore di default - Tool.dStep = EgtGetValInNotes( Tool.sUserNotes, 'STEP') or Tool.dThickness -- se non settato nell'utensile, considero lo spessore lama - Tool.dSideStep = EgtGetValInNotes( Tool.sUserNotes, 'SIDESTEP') or Tool.dMaxMaterial -- se non settato nell'utensile, considero un quarto del diametro + Tool.dStep = EgtGetValInNotes( Tool.sUserNotes, 'STEP', 'd') or Tool.dThickness -- se non settato nell'utensile, considero lo spessore lama + Tool.dSideStep = EgtGetValInNotes( Tool.sUserNotes, 'SIDESTEP', 'd') or Tool.dMaxMaterial -- se non settato nell'utensile, considero un quarto del diametro -- recupero parametri propri delle motoseghe elseif sToolFamily == 'MORTISE' then Tool.dDistance = EgtTdbGetCurrToolParam( MCH_TP.DIST) or 90 -- 90mm dimensione standard aggregato catena Tool.bIsMortise = EgtGetValInNotes( Tool.sUserNotes, 'MORTISE') == 1 Tool.bIsChainSaw = not Tool.bIsMortise - Tool.dStep = EgtGetValInNotes( Tool.sUserNotes, 'STEP') or floor( Tool.dMaxMaterial / 3) -- se non settato nell'utensile, considero un terzo della lunghezza - Tool.dSideStep = EgtGetValInNotes( Tool.sUserNotes, 'SIDESTEP') or ( Tool.dThickness - 1) -- se non settato nell'utensile, considero spessore catena meno 1mm di sicurezza + Tool.dStep = EgtGetValInNotes( Tool.sUserNotes, 'STEP', 'd') or floor( Tool.dMaxMaterial / 3) -- se non settato nell'utensile, considero un terzo della lunghezza + Tool.dSideStep = EgtGetValInNotes( Tool.sUserNotes, 'SIDESTEP', 'd') or ( Tool.dThickness - 1) -- se non settato nell'utensile, considero spessore catena meno 1mm di sicurezza Tool.dCornerRadius = EgtTdbGetCurrToolParam( MCH_TP.CORNRAD) Tool.dWidth = Tool.dDiameter end diff --git a/Strategies/Standard/SPLITCUT/SPLITCUT.lua b/Strategies/Standard/SPLITCUT/SPLITCUT.lua index 831df7e..02a46a1 100644 --- a/Strategies/Standard/SPLITCUT/SPLITCUT.lua +++ b/Strategies/Standard/SPLITCUT/SPLITCUT.lua @@ -176,8 +176,12 @@ local function GetSplitStrategy( Proc, Part) end end if Machining[2].bIsApplicable then - local dRadius = TOOLS[Machining[2].ToolInfo.nToolIndex].dDiameter / 2 - dMaxMatBladeHorizontalDouble = min( TOOLS[Machining[2].ToolInfo.nToolIndex].dMaxMaterial, dRadius - BeamData.GetMaxMatReductionBladeCut( TOOLS[Machining[2].ToolInfo.nToolIndex].sHead, Z_AX())) + if BeamData.GetMaxMatReductionBladeCut then + local dRadius = TOOLS[Machining[2].ToolInfo.nToolIndex].dDiameter / 2 + dMaxMatBladeHorizontalDouble = min( TOOLS[Machining[2].ToolInfo.nToolIndex].dMaxMaterial, dRadius - BeamData.GetMaxMatReductionBladeCut( TOOLS[Machining[2].ToolInfo.nToolIndex].sHead, Z_AX())) + else + dMaxMatBladeHorizontalDouble = TOOLS[Machining[2].ToolInfo.nToolIndex].dMaxMaterial + end end -- TODO considerare di tagliare con il massimo materiale possibile per non salire troppo in Z (macchine tipo PF), oppure non scendere troppo (tipo Kairos)