From db5334217bf8db4c68bb45e51b9b5630329912d8 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Fri, 8 Aug 2025 17:15:08 +0200 Subject: [PATCH] =?UTF-8?q?-=20in=20StepJointNotch=20se=203=20facce=20si?= =?UTF-8?q?=20chiama=20LapJoint=20-=20in=20LapJoint=20->=20MachineByMill,?= =?UTF-8?q?=20in=20lavorazione=20faccia=20inclinata,=20se=20utensile=20tro?= =?UTF-8?q?ppo=20pi=C3=B9=20grande=20dell'originale=20si=20salta=20la=20la?= =?UTF-8?q?vorazione?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/ProcessLapJoint.lua | 11 ++++++++++- LuaLibs/ProcessStepJointNotch.lua | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index dcdaa3e..bfcf4e4 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3721,7 +3721,7 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas EgtOutLog( sErr) return false, sErr else - sWarn = 'Warning : lapjoint chamfer angle machined with different tool' + sWarn = 'Warning : lapjoint angled face machined with different tool' end end -- recupero i dati dell'utensile @@ -3732,6 +3732,15 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtN, nBas dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiam end end + -- se utensile troppo più grande dell'originale salto la lavorazione + if sTuuidPk and EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuidPk) or '') then + local dTDiamOriginalTool = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or 0 + if dTDiam > 2 * dTDiamOriginalTool then + sWarn = 'Warning : lapjoint angled face skipped (no compatible tool)' + EgtOutLog( sWarn) + return true, sWarn + end + end -- Calcolo uso faccia local nFaceUse = BL.GetNearestParalOpposite( tDimAndRef[1][3]:getVersZ()) -- inserisco la lavorazione di fresatura diff --git a/LuaLibs/ProcessStepJointNotch.lua b/LuaLibs/ProcessStepJointNotch.lua index a24dec6..962058a 100644 --- a/LuaLibs/ProcessStepJointNotch.lua +++ b/LuaLibs/ProcessStepJointNotch.lua @@ -13,6 +13,7 @@ local Fbs = require( 'FacesBySaw') local DC = require( 'DiceCut') local Cut = require( 'ProcessCut') local Topology = require( 'FeatureTopology') +local LapJoint = require( 'ProcessLapJoint') EgtOutLog( ' ProcessStepJointNotch started', 1) @@ -49,7 +50,7 @@ function ProcessStepJointNotch.Classify( Proc) -- numero delle facce local nFacetCnt = EgtSurfTmFacetCount( Proc.Id) -- gestisco solo 2 o 4 facce - if nFacetCnt ~= 2 and nFacetCnt ~= 4 and nFacetCnt ~= 6 and nFacetCnt ~= 8 then + if nFacetCnt ~= 2 and nFacetCnt ~= 3 and nFacetCnt ~= 4 and nFacetCnt ~= 6 and nFacetCnt ~= 8 then return false, false end -- verifico le normali delle facce @@ -583,6 +584,9 @@ end --------------------------------------------------------------------- -- Applicazione della lavorazione function ProcessStepJointNotch.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) + if Proc.Fct == 3 then + return LapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) + end -- esecuzione eventuale smusso -- ottengo anche il flag che indica che la feature è larga come la trave local bOkc, sErrC, nDiffWidth = MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)