diff --git a/LuaLibs/ProcessFreeContour.lua b/LuaLibs/ProcessFreeContour.lua index f73dbbe..82ca02e 100644 --- a/LuaLibs/ProcessFreeContour.lua +++ b/LuaLibs/ProcessFreeContour.lua @@ -1,7 +1,8 @@ --- ProcessFreeContour.lua by Egaltech s.r.l. 2021/10/07 +-- ProcessFreeContour.lua by Egaltech s.r.l. 2022/11/03 -- Gestione calcolo profilo libero per Travi -- 2022/08/23 Aggiunta la funzione MakeByMark per la gestione del caso P13=10 --- 2022/09/21 In MakeByMill aggiunto messaggio per elevazione non raggiunta +-- 2022/09/21 In MakeByMill aggiunto messaggio per elevazione non raggiunta. +-- 2022/11/03 In MakeByMill migliorata gestione lavorazione con fresa su testa da sotto. -- Tabella per definizione modulo @@ -236,7 +237,6 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) local dDepth = abs( EgtCurveThickness( AuxId)) local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) local b3Aux = EgtGetBBoxGlob( AuxId, GDB_BB.STANDARD) - local bToolInv = ( vtExtr:getZ() < -0.1 and b3Aux:getDimZ() > b3Raw:getDimZ() - 5) local bDown = ( b3Aux:getMin():getZ() < b3Raw:getMin():getZ() + 5) -- verifico se in testa o coda local bHead = Proc.Head @@ -245,12 +245,14 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) -- recupero la lavorazione local bTopHead = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.1) local bDownHead = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.1) - local sMilling = ML.FindMilling( 'FreeContour', nil, nil, nil, nil, bTopHead, bDownHead) + local sMilling, _, _, bH2 = ML.FindMilling( 'FreeContour', nil, nil, nil, nil, bTopHead, bDownHead) if not sMilling then local sErr = 'Error : FreeContour not found in library' EgtOutLog( sErr) return false, sErr end + bDownHead = ( bDownHead and bH2) + local bToolInv = ( not bDownHead and vtExtr:getZ() < -0.1 and b3Aux:getDimZ() > b3Raw:getDimZ() - 5) -- recupero i dati dell'utensile local dToolDiam = 10 local dMaxDepth = 0 @@ -376,7 +378,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT) EgtSetMachiningParam( MCH_MP.INVERT, true) else - if vtExtr:getZ() < 0 then + if not bDownHead and vtExtr:getZ() < 0 then EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) EgtSetMachiningParam( MCH_MP.INVERT, true) EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) @@ -391,7 +393,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead) EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT) EgtSetMachiningParam( MCH_MP.INVERT, true) else - if vtExtr:getZ() < 0 then + if not bDownHead and vtExtr:getZ() < 0 then EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT) EgtSetMachiningParam( MCH_MP.INVERT, true) EgtSetMachiningParam( MCH_MP.TOOLINVERT, true) diff --git a/LuaLibs/ProcessLongCut.lua b/LuaLibs/ProcessLongCut.lua index 617431a..d47bc00 100644 --- a/LuaLibs/ProcessLongCut.lua +++ b/LuaLibs/ProcessLongCut.lua @@ -1,4 +1,4 @@ --- ProcessLongCut.lua by Egaltech s.r.l. 2022/03/07 +-- ProcessLongCut.lua by Egaltech s.r.l. 2022/11/04 -- Gestione calcolo taglio longitudinale per Travi -- 2021/02/03 Corretto FaceUse con fresa orizzontale su taglio orizzontale. -- 2021/05/18 Possibile taglio con lama anche di fianco su macchina con testa da sotto. @@ -12,6 +12,7 @@ -- 2022/03/07 Razionalizzata gestione casi con fresa di fianco. Aggiunta gestione Long2Cut anche con testa sotto. -- 2022/07/14 Aggiunta limitazione lavorazione a sinistra anche se il grezzo successivo non ha lavorazioni (finale barra) ma è abbastanza lungo da poter essere riutilizzato (BD.MinRaw). -- 2022/09/23 Modificato l'angolo per l'abilitazione della lama da sotto: ora interviene anche per facce verticali. +-- 2022/11/04 Aggiunto passaggio parametro bDownHead (Testa da Sotto) nelle chiamate a MakeSideFace. -- Tabella per definizione modulo local ProcessLongCut = {} @@ -1025,12 +1026,12 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus for j = 1, Proc.Fct - 1 do local _, vtN = EgtSurfTmFacetCenter( Proc.Id, j, GDB_ID.ROOT) if vtIni * vtN > 0 and nCountMilHead < 2 then - MakeSideFace( Proc.Id, j, nSide, sMilling, dToolDiam) + MakeSideFace( Proc.Id, j, nSide, sMilling, dToolDiam, nil, nil, bDownHead) nCountMilHead = nCountMilHead + 1 end end if bForcedLim and nCountMilHead < 1 then - MakeSideFace( Proc.Id, 0, nSide, sMilling, dToolDiam, bForcedLim) + MakeSideFace( Proc.Id, 0, nSide, sMilling, dToolDiam, bForcedLim, nil, bDownHead) nCountMilHead = nCountMilHead + 1 end end @@ -1042,12 +1043,12 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId, bCustUseBlade, nCus for j = 1, Proc.Fct - 1 do local _, vtN = EgtSurfTmFacetCenter( Proc.Id, j, GDB_ID.ROOT) if vtFin * vtN > 0 and nCountMilHead < 2 then - MakeSideFace( Proc.Id, j, nSide, sMilling, dToolDiam) + MakeSideFace( Proc.Id, j, nSide, sMilling, dToolDiam, nil, nil, bDownHead) nCountMilHead = nCountMilHead + 1 end end if bForcedLim and nCountMilHead < 2 then - MakeSideFace( Proc.Id, 0, nSide, sMilling, dToolDiam, bForcedLim) + MakeSideFace( Proc.Id, 0, nSide, sMilling, dToolDiam, bForcedLim, nil, bDownHead) nCountMilHead = nCountMilHead + 1 end end diff --git a/LuaLibs/ProcessProfCamb.lua b/LuaLibs/ProcessProfCamb.lua index 2f67a9b..a8f2e02 100644 --- a/LuaLibs/ProcessProfCamb.lua +++ b/LuaLibs/ProcessProfCamb.lua @@ -1,4 +1,4 @@ --- ProcessProfCamb.lua by Egaltech s.r.l. 2022/05/28 +-- ProcessProfCamb.lua by Egaltech s.r.l. 2022/11/03 -- Gestione calcolo profilo caudato per Travi -- 2021/05/03 Aggiunta gestione smusso da sopra e sotto per macchina con testa da sotto. -- 2021/06/28 Per macchine con testa sotto, smussi di lato con questa testa se non c'è lav.ne da sopra. @@ -8,6 +8,7 @@ -- 2022/02/02 Aggiunta funzione OnlyChamfer. -- 2022/05/24 Aggiunta fresatura da sotto su macchine con testa da sotto. -- 2022/05/28 Aggiunto calcolo svuotatura da modulo di libreria. +-- 2022/11/03 Correzione per riconoscimento testa da sotto su fresatura. -- Tabella per definizione modulo local ProcessProfCamb = {} @@ -315,12 +316,14 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH) -- leggo anticipatamente i parametri utensile fresa per dare un valore opportuno all'elevazione della lama -- recupero la lavorazione di fresatura local sMillType = 'Prof' - sMilling, _, _, bMillDown = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bMillDown) + local bH2 + sMilling, _, _, bH2 = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bMillDown) if not sMilling then local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' milling not found in library' EgtOutLog( sErr) return false, sErr end + bMillDown = ( bMillDown and bH2) -- Recupero i dati dell'utensile if EgtMdbSetCurrMachining( sMilling) then local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) diff --git a/LuaLibs/ProcessStepJoint.lua b/LuaLibs/ProcessStepJoint.lua index dfe5a45..abf920c 100644 --- a/LuaLibs/ProcessStepJoint.lua +++ b/LuaLibs/ProcessStepJoint.lua @@ -1,5 +1,6 @@ --- ProcessStepJoint.lua by Egaltech s.r.l. 2022/01/26 +-- ProcessStepJoint.lua by Egaltech s.r.l. 2022/11/03 -- Gestione calcolo giunto a gradino per Travi +-- 2022/11/03 Correzione per riconoscimento testa da sotto su fresatura. -- Tabella per definizione modulo local ProcessStepJoint = {} @@ -83,13 +84,14 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead) -- recupero la lavorazione local sMillType = 'Mark' local bDownHead = ( BD.DOWN_HEAD and abs( vtExtr:getZ()) < 0.1) - local sMilling - sMilling, _, _, bDownHead = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bDownHead) + local sMilling, bH2 + 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 standard local sName1 = 'SJN_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local nMch1Id = EgtAddMachining( sName1, sMilling) diff --git a/LuaLibs/ProcessStepJointNotch.lua b/LuaLibs/ProcessStepJointNotch.lua index 9225a5a..627336b 100644 --- a/LuaLibs/ProcessStepJointNotch.lua +++ b/LuaLibs/ProcessStepJointNotch.lua @@ -1,5 +1,6 @@ --- ProcessStepJointNotch.lua by Egaltech s.r.l. 2022/01/25 +-- ProcessStepJointNotch.lua by Egaltech s.r.l. 2022/11/03 -- Gestione calcolo tacca a gradino per Travi +-- 2022/11/03 Correzione per riconoscimento testa da sotto su fresatura. -- Tabella per definizione modulo local ProcessStepJointNotch = {} @@ -523,13 +524,14 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead) -- recupero la lavorazione local sMillType = 'Mark' local bDownHead = ( BD.DOWN_HEAD and abs( vtExtr:getZ()) < 0.1) - local sMilling - sMilling, _, _, bDownHead = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bDownHead) + local sMilling, bH2 + 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) if bExeNormal then -- Inserisco la lavorazione del lato standard local sName1 = 'SJN_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) diff --git a/LuaLibs/ProcessTenon.lua b/LuaLibs/ProcessTenon.lua index bfcd71a..a278ab9 100644 --- a/LuaLibs/ProcessTenon.lua +++ b/LuaLibs/ProcessTenon.lua @@ -1,10 +1,11 @@ --- ProcessTenon.lua by Egaltech s.r.l. 2022/05/28 +-- ProcessTenon.lua by Egaltech s.r.l. 2022/11/03 -- Gestione calcolo tenone per Travi -- 2021/10/04 Corretto calcolo HCING per pezzi piccoli. -- 2022/02/15 Aggiornata VerifyOrientation per macchine con testa da sotto. -- 2022/05/18 Migliorata gestione attacco. -- 2022/05/28 Spostato calcolo svuotatura in modulo di libreria. -- 2022/09/20 Migliorato il calcolo delle passate laterali; ora considera la reale distanza tra contorno del tenone e estremi della faccia +-- 2022/11/03 Corretto uso di bH2 (da sotto solo se anche bMillDown vero). -- Tabella per definizione modulo local ProcessTenon = {} @@ -225,7 +226,7 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) -- porto inizio curva il più possibile sul bordo in alto o in basso local dMaxDist = OVERLAP_COEFF * dMillDiam * MAX_PASS local bMyShortPart = ( bShortPart and abs( vtN:getX()) < 0.999 and abs( vtN:getY()) < 0.259) - BL.PutStartNearestToEdge( AuxId, b3Solid, dMaxDist, bH2 ~= bMyShortPart) + BL.PutStartNearestToEdge( AuxId, b3Solid, dMaxDist, ( bH2 and bMillDown) ~= bMyShortPart) -- se elevazione superiore a massimo affondamento della fresa, riduco opportunamente local sWarn local dDepth = 0