diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index e968fca..1d66881 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -642,7 +642,7 @@ function BeamLib.GetFaceWithMostAdj( Proc, nPartId, bCompare3Fc, dCosSideAng) -- premio quella che non è sottosquadra e che ha la X minore local bDiffSmall = true for i = 1, #dtElev do - if dtElev[i] > dMinElev + 5 or dtElev[i] > 80 then + if ( dtElev[i] > dMinElev + 5 or dtElev[i] > 80) and dMinElev < 0.85 * dtElev[i] then bDiffSmall = false end end diff --git a/LuaLibs/ProcessCut.lua b/LuaLibs/ProcessCut.lua index e7072f3..947bdde 100644 --- a/LuaLibs/ProcessCut.lua +++ b/LuaLibs/ProcessCut.lua @@ -262,6 +262,7 @@ end --------------------------------------------------------------------- -- Applicazione della lavorazione con testa da sopra local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf, bForceTangentLeadInOut) + local sWarn -- ingombro del grezzo b3Raw = b3Raw or EgtGetRawPartBBox( nRawId) -- ingombro del pezzo @@ -373,10 +374,17 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b end -- verifico se necessari tagli supplementari o se presente superficie limitante EgtOutLog( string.format( 'MaxDepth=%.1f MaxVertDepth=%.1f CutH=%.1f CutV=%.1f', dMaxDepth, dMaxVertDepth, dCutH, dCutV), 3) + -- se lungo, una faccia e rivolto sul retro verso l'alto si forzano i cubetti per evitare di rovinare il pezzo successivo + local bForceDicing = ( Proc.Fct == 1 and Proc.AffectedFaces.Left and bLongCut and vtN:getZ() > 10 * GEO.EPS_SMALL and vtN:getY() < 10 * GEO.EPS_SMALL) local vCuts = {} - if not Proc.AdvTail and ( dCutH > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or dCutV > dMaxVertDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC) then + if ( ( not Proc.AdvTail) or bForceDicing) and ( dCutH > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or dCutV > dMaxVertDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC) then local ptExtra, vtExtra local bAutoCalcSurf = true + if Proc.AdvTail then + -- do avviso che la lama può sbordare nel pezzo successivo + sWarn = 'Warning : Cut machining can damage next piece' + EgtOutLog( sWarn .. ' (process ' .. tostring( Proc.Id) .. ')') + end if bFillAreaPiece or bFillTail then local ptMiddle = ( b3Solid:getMin() + b3Solid:getMax()) / 2 ptExtra = Point3d( b3Solid:getMin():getX() + 5*GEO.EPS_SMALL, ptMiddle:getY(), ptMiddle:getZ()) @@ -415,7 +423,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b end end -- se il taglio è più spesso della lama abilito il dicing, altrimenti no - if dMaxElev > dSawThick then + if ( dMaxElev > dSawThick) or bForceDicing then vCuts = DC.GetDice( nAddGrpId, EgtIf( bForced, b3Raw, b3Solid), ptC, vtN, bAutoCalcSurf, ptExtra, vtExtra, dMaxVertDepth - BD.CUT_EXTRA, dNewDiceDim) -- se taglio sborda in coda e non è stato inserito nessun taglio a cubetti, lo rilancio con le dimensioni customizzate if ( bFillTail or bCustDiceCut) and #vCuts == 0 then @@ -642,7 +650,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw) if not bOk then return bOk, sErr end end - return true + return true, sWarn end --------------------------------------------------------------------- @@ -867,22 +875,31 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, return false, sErr end local bNoDicing = false + local sWarn -- se taglio con testa da sopra if not bDownHead and not bDownTurn then local bOk, sErr, bNoDicing2 = MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf, bForceTangentLeadInOut) bNoDicing = bNoDicing2 - if not bOk then return false, sErr end + if not bOk then + return false, sErr + else + sWarn = sErr + end -- altrimenti taglio con testa da sotto else local bOk, sErr = MakeFromDown( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead) - if not bOk then return false, sErr end + if not bOk then + return false, sErr + else + sWarn = sErr + end end -- Aggiornamento ingombro (se vero taglio o richiesto) -- Se lascio il cordolo (bNoDicing) non aggiorno il grezzo perchè lo scarto rimane attaccato if ( ProcessCut.Identify( Proc) or bUpdateIng) and not bNoDicing then UpdateEncumbrance( Proc, vtN, dOvmHead, nRawId, b3Solid, b3Raw) end - return true + return true, sWarn end --------------------------------------------------------------------- diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 21a0015..994c06f 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -200,6 +200,7 @@ local function AssignQIdent( Proc) elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 17 then Q_DEPTH_CHAMFER = 'Q01' -- d Q_ONLY_CHAMFER = 'Q02' -- i + Q_USE_MILL = 'Q03' -- i elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 20 then Q_DEPTH_CHAMFER = 'Q01' -- d Q_USE_MILL = 'Q02' -- i @@ -5288,7 +5289,7 @@ function SawPlusChain.Saw.CalculateMachiningParameters( Proc, FaceToMachine, Edg EgtOutLog( Cutting.Message) end end - if EdgeToMachine.ToolDirection:getZ() < BD.NZ_MINA then + if EdgeToMachine.ToolDirection:getZ() < BD.NZ_MINA and BD.C_SIMM then Cutting.CanApply = false Cutting.Message = 'Feature '.. Proc.FeatureId .. ' : skipped sawblade from bottom' EgtOutLog( Cutting.Message) @@ -6152,9 +6153,20 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa vtN, vtN2 = vtN2, vtN sPocketing = ML.FindPocketing( sMchFind, dDiam2, dFacElev2 + dCollSic2) if not sPocketing then - local sErr = 'Error : '..sMchFind..' not found in library' - EgtOutLog( sErr) - return false, sErr + dDiam, dDiam2 = dDiam2, dDiam + dCollSic, dCollSic2 = dCollSic2, dCollSic + nFacInd, nFacInd2 = nFacInd2, nFacInd + dH, dH2 = dH2, dH + dV, dV2 = dV2, dV + dFacElev, dFacElev2 = dFacElev2, dFacElev + rfFac, rfFac2 = rfFac2, rfFac + vtN, vtN2 = vtN2, vtN + sPocketing = ML.FindPocketing( sMchFind, dDiam2, nil, nil, nil, nil, nil, nil, 'Longest') + if not sPocketing then + local sErr = 'Error : '..sMchFind..' not found in library' + EgtOutLog( sErr) + return false, sErr + end end end -- provo con contornatura diff --git a/UpdateLog.txt b/UpdateLog.txt index 8d9ccd3..47aa933 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,11 @@ ==== Beam Update Log ==== +Versione 2.7d2 (17/04/2025) +- Added : in scanalatura aggiunta Q03 per forzare fresa +- Modif : in slot con lama + sega a catena abilitata lavorazione da sotto per macchine con testa sopra +- Modif : nei tagli modifche in caso di tagli di coda anticipati +- Modif : in lavorazioni tipo tacca ma 3 facce migliorata la scelta faccia + Versione 2.7d1 (04/04/2025) - Fixed : in PreDrill piccola correzione - Fixed : nei tagli varie correzioni diff --git a/Version.lua b/Version.lua index f801f3c..286b01d 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '2.7d1' +VERSION = '2.7d2' MIN_EXE = '2.6e5'