From acdd4e10fbc1a0a11b08310f74340f07a935436a Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 19 Jun 2024 15:58:31 +0200 Subject: [PATCH] - in StepJointNotch abilitati correttamente smussi con testa da sotto - in Lapjoint lunghe che guardano il top, se sufficientemente lunghe, si blocca l'asse C per non sollecitare inutilmente l'asse B --- LuaLibs/ProcessLapJoint.lua | 5 +++++ LuaLibs/ProcessStepJointNotch.lua | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index fca6f1c..87570b6 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3299,6 +3299,11 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTHO_CONT) -- imposto posizione braccio porta testa local nSCC = MCH_SCC.NONE + -- se si lavora una faccia orizzontale e la dimensione X della feature รจ sufficiente, blocco l'asse B per evitare sollecitazioni inutili + local b3Face = EgtGetBBoxGlob( Proc.Id, GDB_BB.STANDARD) + if BD.C_SIMM and AreSameOrOppositeVectorApprox( tvtN[2], Z_AX()) and b3Face:getDimX() > BD.LONGCUT_ENDLEN then + nSCC = MCH_SCC.ADIR_YM + end if bLapJointAngTrasm then nSCC = MCH_SCC.ADIR_NEAR elseif not BD.C_SIMM and not BD.TURN then diff --git a/LuaLibs/ProcessStepJointNotch.lua b/LuaLibs/ProcessStepJointNotch.lua index 6cc0035..1f206d1 100644 --- a/LuaLibs/ProcessStepJointNotch.lua +++ b/LuaLibs/ProcessStepJointNotch.lua @@ -481,7 +481,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead) end end -- se diretta verso Z - elseif abs( vtExtr:getZ()) > 0.99 then + elseif abs( vtExtr:getZ()) > 0.99 and not ( BD.DOWN_HEAD or nTypePos == 0) then -- se diretta verso Z+ if vtExtr:getZ() > 0 then -- se sborda verso Z+ abilito solo la lavorazione della parte normale @@ -506,7 +506,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead) local dExtra = 2 -- recupero la lavorazione local sMillType = 'Mark' - local bDownHead = ( BD.DOWN_HEAD and abs( vtExtr:getZ()) < 0.1) + local bDownHead = BD.DOWN_HEAD and vtExtr:getZ() < GEO.EPS_SMALL local sMilling, bH2 sMilling, _, _, bH2 = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bDownHead) if not sMilling then @@ -539,6 +539,14 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead) end end if bExeOpposite then + bDownHead = BD.DOWN_HEAD and vtExtr:getZ() > - GEO.EPS_SMALL + sMilling, _, _, bH2 = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bDownHead) + if not sMilling then + local sErr = 'Error : milling not found in library' + EgtOutLog( sErr) + return false, sErr + end + bDownHead = ( bDownHead and bH2) -- Inserisco la lavorazione del lato opposto local sName2 = 'SJN_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local nMch2Id = EgtAddMachining( sName2, sMilling)