diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index 83859fd..adb85e0 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -778,13 +778,20 @@ function BeamLib.GetNzLimDownUp( b3Raw, vtN, vtOrtho) else return -0.383 end - elseif b3Raw:getDimZ() < BD.MIN_DIM_HBEAM then + elseif b3Raw:getDimZ() < 300 then -- N_HorAng < 10° if vtN and ( abs( vtN:getY()) < 0.174) then return -0.5 else return -0.259 end + elseif b3Raw:getDimZ() < BD.MIN_DIM_HBEAM then + -- N_HorAng < 10° + if vtN and ( abs( vtN:getY()) < 0.174) then + return -0.342 + else + return -0.259 + end else -- N_HorAng < 10° if vtN and ( abs( vtN:getY()) < 0.174) then diff --git a/LuaLibs/ProcessCut.lua b/LuaLibs/ProcessCut.lua index f8a8677..331e050 100644 --- a/LuaLibs/ProcessCut.lua +++ b/LuaLibs/ProcessCut.lua @@ -22,6 +22,7 @@ -- 2023/08/01 Correzione su offset per taglio doppio di lato. -- 2023/08/01 In caso di pezzi alti su macchina tipo PF i tagli doppi di lato non vengono usati, si usa il metodo standard. -- 2023/09/12 In MakeFromTop abbassato a 590 mm il limite per convertire in LongCut. +-- 2023/10/27 In MakeFromTop corretto massimo materiale in caso di lavorazione da sotto. -- Tabella per definizione modulo local ProcessCut = {} @@ -556,7 +557,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b end -- lavoro la faccia local vtOrthoO - if bFromBottom and dCutV < dMaxVertDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then + if bFromBottom and dCutV < dMaxDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then vtOrthoO = -Z_AX() elseif bHorizCut and ( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or ( vtN:getX() > 0 and vtN:getZ() <= 0.708) or ( abs( vtN:getY()) < 0.1 and vtN:getZ() <= 0)) then vtOrthoO = Z_AX() diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 7377c09..a649113 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -79,6 +79,8 @@ -- 2023/09/27 In MakeMoreFaces e Classify refactoring della gestione scanalatura chiusa. -- 2023/09/27 In MakeLongMoreFaces aggiunto Topology.Classify alla Proc creata. -- 2023/10/03 In MakePocket aggiunto messaggio in caso si rovini il pezzo successivo. +-- 2023/10/25 In LapJoint 2 facce longitudinali faccio di lama solo se taglio completamente. Altrimenti fresa. +-- 2023/10/27 In Lapjoint 2 facce con angolo > 90 deg, se forzata fresa, si svuota la faccia principale e si lavora poi la faccia inclinata. -- Tabella per definizione modulo local ProcessLapJoint = {} @@ -5403,10 +5405,10 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa if not sWarn then sWarn = '' end sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2) end - -- se ho più di 3 facce e non di forma ad u oppure ho 3 facce e di forma ad u + -- se ho più di 3 facce e non di forma ad u oppure ho 3 facce e di forma ad u oppure groove a 2 facce -- e non sono stati inseriti antischeggia di lama -- controllo se c'è una faccia non ortogonale alla principale e la lavoro con una contornatura o svuotatura - if ( ( Proc.Fct > 3 and not bIsU) or ( Proc.Fct == 3 and bIsU)) and not bMadeASbyBld then + if ( ( Proc.Fct >= 3 and not bIsU) or ( Proc.Fct == 3 and bIsU) or ( Proc.Fct == 2)) and not bMadeASbyBld then -- Recupero le facce adiacenti alla principale local vAdj = EgtSurfTmFacetAdjacencies( Proc.Id, nFacInd)[1] if not vAdj or #vAdj == 0 then @@ -5430,7 +5432,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa local ptPs = ( ptP1 + ptP2) / 2 local bOk, sWarn2 bOk, sWarn2 = MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, tvtNx, nFacInd, vAdj[i], ptPs, tDimAndRef, - b3Raw, EgtIf( ( Proc.Fct == 3 and bIsU), 0, 2), nUseRoughTool, dAng, sPocketing, sTuuidPk, dFacElev) + b3Raw, EgtIf( ( Proc.Fct == 3 and bIsU) or Proc.Fct == 2, 0, 2), nUseRoughTool, dAng, sPocketing, sTuuidPk, dFacElev) if not bOk then return bOk, sWarn2 end if sWarn2 then if not sWarn then sWarn = '' end @@ -5910,7 +5912,14 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) -- leggo i parametri Q per utilizzare la fresa di fianco e/o lama local nUseSideTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0 local bUseBlade = EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') == 1 - return Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool) + local bOk, sMyWarn = Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool) + -- se non sono riuscito a farlo di lama, riprovo con la fresa + if not bOk and bUseBlade then + bUseBlade = false + return Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool) + else + return bOk, sMyWarn + end -- prima faccia terminale elseif b3Fac1:getDimX() < 1 and abs( vtN2:getX()) < GEO.EPS_SMALL then -- la faccia 0 deve essere quella lunga @@ -5998,7 +6007,14 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) if Proc.Box:getDimX() > 0.8 * b3Solid:getDimX() and abs( b3Fac1:getDimX() - b3Fac2:getDimX()) < 50 and abs( b3Fac1:getCenter():getX() - b3Fac2:getCenter():getX()) < 50 then local nUseSideTool = EgtGetInfo( Proc.Id, Q_SIDE_ROUGH_TOOL, 'i') or 0 - return Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool) + local bOk, sMyWarn = Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool) + -- se non sono riuscito a farlo di lama, riprovo con la fresa + if not bOk and bUseBlade then + bUseBlade = false + return Long2Cut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nUseSideTool) + else + return bOk, sMyWarn + end -- altrimenti else -- verifico se da lavorare con testa da sotto @@ -6009,9 +6025,9 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) if VerifyBHSideMill( Proc) then return MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, true) -- se ortogonali e non forzata lama, con fresa - elseif not bUseBlade and bAdj and abs( dAng + 90) < 1 then + elseif not bUseBlade then -- se piccole - if Proc.Box:getDimX() < MAX_MILL_LIN and ( Proc.Box:getDimZ() < MAX_MILL_LIN or Proc.Box:getDimY() < MAX_MILL_LIN) then + if Proc.Box:getDimX() < MAX_MILL_LIN and ( Proc.Box:getDimZ() < MAX_MILL_LIN or Proc.Box:getDimY() < MAX_MILL_LIN) and bAdj and abs( dAng + 90) < 1 then return MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHead) else return MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, true) diff --git a/LuaLibs/ProcessLongDoubleCut.lua b/LuaLibs/ProcessLongDoubleCut.lua index 35748c2..a07c9cf 100644 --- a/LuaLibs/ProcessLongDoubleCut.lua +++ b/LuaLibs/ProcessLongDoubleCut.lua @@ -19,6 +19,7 @@ -- 2023/03/23 Correzione per caso con doppia lama da sotto. -- 2023/06/07 Sistemazione SCC per macchina TURN -- 2023/10/24 Migliorata spezzatura taglio passante con due spezzoni +-- 2023/10/25 Se effettivamente un taglio longitudinale e lama non taglia completamente, limito la lavorazione. Altrimenti esco. -- Tabella per definizione modulo local ProcessLong2Cut = {} @@ -817,6 +818,18 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster end -- altrimenti concavo else + -- se effettivamente un taglio longitudinale e lama non taglia completamente, limito la lavorazione. Altrimenti esco. + for k = 1, #vOrd do + if vWidth[vOrd[k]] + BD.CUT_SIC > dMaxDepth then + if not( ProcessLong2Cut.Identify( Proc)) then + return false + else + local sWarn2 = 'Warning in ' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. ' : elevation (' .. EgtNumToString( vWidth[vOrd[k]], 1) .. ') bigger than max saw depth (' .. EgtNumToString( dMaxDepth, 1) .. ')' + if not sWarn then sWarn = '' end + sWarn = EgtIf( #sWarn > 0, sWarn .. '\n' .. sWarn2, sWarn2) + end + end + end -- si percorrono i lati alto e basso della faccia for i = 1, nC do -- Posizione braccio portatesta @@ -857,16 +870,27 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster -- ciclo sulle passate local dOffset local dLioPerp + if j == 1 then -- il primo taglio lo faccio completo se angolo interno maggiore di 90 + local dMinOffsBigFace = max( vWidth[vOrd[j]] - dMaxDepth, 0) + -- se la faccia è più grande del massimo materiale lama, allora limito lavorazione + if dMinOffsBigFace > 0 then + dOffset = dMinOffsBigFace -- se angolo interno inferiore di 90° calcolo l'arretramento della lama + un piccolo delta di 0.3 - if dAng < - ( 90 + 10 * GEO.EPS_SMALL) then + elseif dAng < - ( 90 + 10 * GEO.EPS_SMALL) then dOffset = 0.3 + ((dToolThick* vtN[vOrd[1]]) * vtN[vOrd[2]] * vtN[vOrd[2]]):len() else dOffset = 0 end dLioPerp = vWidth[vOrd[j]] + BD.CUT_SIC else -- il secondo ridotto della distanza minima e della componente spessore della lama - dOffset = dDimStrip + ((dToolThick* vtN[vOrd[1]]) - (dToolThick* vtN[vOrd[1]]) * vtN[vOrd[2]] * vtN[vOrd[2]]):len() + local dMinOffsBigFace = max( vWidth[vOrd[j]] - dMaxDepth, 0) + -- se la faccia è più grande del massimo materiale lama, allora limito lavorazione + if dMinOffsBigFace > 0 then + dOffset = dMinOffsBigFace + else + dOffset = dDimStrip + ((dToolThick* vtN[vOrd[1]]) - (dToolThick* vtN[vOrd[1]]) * vtN[vOrd[2]] * vtN[vOrd[2]]):len() + end dLioPerp = vWidth[vOrd[j]] - dOffset + BD.CUT_SIC end local dLioTang = 0 diff --git a/UpdateLog.txt b/UpdateLog.txt index c187f30..5d69ba9 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,11 @@ ==== Beam Update Log ==== +Versione 2.5j2 (27/10/2023) +- Modif : in LapJoint gestito caso groove due facce >90° con fresa, se forzato da parametro Q +- Modif : in LongCut e LongDoubleCut migliorata spezzatura taglio passante con due spezzoni +- Modif : nei tagli di lama migliorata gestione con percorso bilinea +- Modif : in LapJoint 2 facce longitudinali si usa taglio di lama solo se si taglia completamente, altrimenti fresa + Versione 2.5j1 (23/10/2023) - Added : in Process (lancio da EgtCAM5 quindi uso praticamente solo interno) aggiunta possibilità di tenere ordine pezzi in barra come da selezione - Fixed : piccola correzione a Classify di FeatureTopology per casi senza geometria diff --git a/Version.lua b/Version.lua index 153486b..5b2e63c 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '2.5j1' +VERSION = '2.5j2' MIN_EXE = '2.5c1'