From d81a0e8fbd7fbc67873899479be1b66a4e9ceb07 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Thu, 30 May 2024 15:32:47 +0200 Subject: [PATCH 1/8] In DiceCut.GetOrtoCutCenter se faccia piccola e lunga, tolto limite Z negativa per calcolare cubetti. --- LuaLibs/DiceCut.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LuaLibs/DiceCut.lua b/LuaLibs/DiceCut.lua index d53cad2..47ca923 100644 --- a/LuaLibs/DiceCut.lua +++ b/LuaLibs/DiceCut.lua @@ -155,7 +155,7 @@ local function GetOrtoCutCenter( FacetId, ptC, vtN, vtO, dOffsetEff, dNzLimDwnUp -- se faccia non troppo lunga, con un lato piccolo e non diretta troppo verso il basso, non servono dice local dMaxLen = BD.MAX_LEN_DICE or 600 if dLen < dMaxLen and dWidth < dMaxLen and - ( dLen < dOffsetEff + 1.0 or dWidth < dOffsetEff + 1.0) and vtN:getZ() > dNzLimDwnUp then + ( dLen < dOffsetEff + 1.0 or dWidth < dOffsetEff + 1.0) then return nil, nil, nil end From 498c65b006f58d5d816ca0e55a189cbc9647f2c1 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Mon, 3 Jun 2024 12:55:50 +0200 Subject: [PATCH 2/8] in FacesBySaw corretto SCC in caso di asse bloccato parallelo --- LuaLibs/FacesBySaw.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/LuaLibs/FacesBySaw.lua b/LuaLibs/FacesBySaw.lua index 49ba440..ebf2f8e 100644 --- a/LuaLibs/FacesBySaw.lua +++ b/LuaLibs/FacesBySaw.lua @@ -407,7 +407,10 @@ function FacesBySaw.MakeOne( nSurfId, nFacet, sCutting, dSawDiam, Par5, dVzLimDw EgtOutLog( 'vtN=' .. tostring( vtN) .. ' vtRef=' .. tostring( vtRef) .. ' vtOut=' .. tostring( vtOut) .. ' vtAux=' .. tostring( vtAux), 3) local nSCC = MCH_SCC.NONE if not BD.TURN then - if abs( vtAux:getX()) > abs( vtAux:getY()) - GEO.EPS_SMALL then + -- per ora aggregato usato in verticale solo in split e headcut; Fast non influenzata + if BD.C_SIMM and bMaximizeVerticalDepth then + nSCC = MCH_SCC.ADIR_ZM + elseif abs( vtAux:getX()) > abs( vtAux:getY()) - GEO.EPS_SMALL then nSCC = EgtIf( ( vtAux:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM) else nSCC = EgtIf( ( vtAux:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM) From 0c802464e11685ceec72f39609469fb6bb4334c3 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Mon, 3 Jun 2024 15:25:18 +0200 Subject: [PATCH 3/8] In DiceCut.GetOrtoCutCenter se faccia piccola e lunga, tolto limite Z negativa per calcolare cubetti solo se esiste testa sotto. Altrimenti cubetti per forza. --- LuaLibs/DiceCut.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LuaLibs/DiceCut.lua b/LuaLibs/DiceCut.lua index 47ca923..f0c3ed2 100644 --- a/LuaLibs/DiceCut.lua +++ b/LuaLibs/DiceCut.lua @@ -155,7 +155,7 @@ local function GetOrtoCutCenter( FacetId, ptC, vtN, vtO, dOffsetEff, dNzLimDwnUp -- se faccia non troppo lunga, con un lato piccolo e non diretta troppo verso il basso, non servono dice local dMaxLen = BD.MAX_LEN_DICE or 600 if dLen < dMaxLen and dWidth < dMaxLen and - ( dLen < dOffsetEff + 1.0 or dWidth < dOffsetEff + 1.0) then + ( dLen < dOffsetEff + 1.0 or dWidth < dOffsetEff + 1.0) and ( vtN:getZ() > dNzLimDwnUp or BD.DOWN_HEAD) then return nil, nil, nil end From cbb42ec088ebd51d5e13b981682cbd6c0ac5a0a9 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 5 Jun 2024 09:31:46 +0200 Subject: [PATCH 4/8] =?UTF-8?q?-=20in=20BeamLib=20funzione=20IsCutNeeded?= =?UTF-8?q?=20per=20capire=20se=20il=20taglio=20viene=20sostituito=20da=20?= =?UTF-8?q?un=20headcut=20o=20split=20-=20in=20RidgeLap=20abilitato=20Q04?= =?UTF-8?q?=20come=20LapJoint,=20se=20riconducibile=20a=202=20facce=20-=20?= =?UTF-8?q?GetFacetsInfo=20richiamata=20ogni=20volta=20che=20c'=C3=A8=20un?= =?UTF-8?q?o=20swap=20di=20facce=20-=20In=20LapJoint=20->=20MakePocket=20a?= =?UTF-8?q?bilitata=20Q=20per=20forzare=20massima=20elevazione?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaLibs/BeamLib.lua | 27 +++++++++++++++++++++++++++ LuaLibs/ProcessCut.lua | 15 +-------------- LuaLibs/ProcessLapJoint.lua | 15 +++++++++++++-- LuaLibs/ProcessRidgeLap.lua | 13 +++++++++++-- LuaLibs/ProcessStepJoint.lua | 2 ++ LuaLibs/ProcessStepJointNotch.lua | 3 +++ 6 files changed, 57 insertions(+), 18 deletions(-) diff --git a/LuaLibs/BeamLib.lua b/LuaLibs/BeamLib.lua index bb06fba..da1e6f6 100644 --- a/LuaLibs/BeamLib.lua +++ b/LuaLibs/BeamLib.lua @@ -1267,5 +1267,32 @@ function BeamLib.GetMachiningSteps( dMachiningDepth, dStep) return MachiningSteps end +------------------------------------------------------------------------------------------------------------- +function BeamLib.IsCutNeeded( Proc, b3Raw, dOvmHead, dOvmTail) + if not dOvmTail then + dOvmTail = BD.OVM_MID + end + local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT) + + if Proc.Head then + -- se coincide con il taglio di separazione precedente, non va fatto + if AreSameVectorApprox( vtN, X_AX()) and abs( ptC:getX() - b3Raw:getMax():getX() + dOvmHead) < 10 * GEO.EPS_SMALL then + return false + end + -- altrimenti taglio di coda + else + -- se coincide con taglio di separazione, non va fatto + if AreSameVectorApprox( vtN, - X_AX()) and abs( ptC:getX() - b3Raw:getMin():getX()) < dOvmTail + 10 * GEO.EPS_SMALL then + return false + end + end + -- se coincide con un taglio frontale non va fatto + if Proc.CutFront then + return false + end + + return true +end + ------------------------------------------------------------------------------------------------------------- return BeamLib \ No newline at end of file diff --git a/LuaLibs/ProcessCut.lua b/LuaLibs/ProcessCut.lua index d74d6b7..df70d66 100644 --- a/LuaLibs/ProcessCut.lua +++ b/LuaLibs/ProcessCut.lua @@ -821,20 +821,7 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT) -- se taglio di testa if not bForced then - if Proc.Head then - -- se coincide con il taglio di separazione precedente, non va fatto - if AreSameVectorApprox( vtN, X_AX()) and abs( ptC:getX() - b3Raw:getMax():getX() + dOvmHead) < 10 * GEO.EPS_SMALL then - return true - end - -- altrimenti taglio di coda - else - -- se coincide con taglio di separazione, non va fatto - if AreSameVectorApprox( vtN, - X_AX()) and abs( ptC:getX() - b3Raw:getMin():getX()) < dOvmTail + 10 * GEO.EPS_SMALL then - return true - end - end - -- se coincide con un taglio frontale non va fatto - if Proc.CutFront then + if not BL.IsCutNeeded( Proc, b3Raw, dOvmHead, dOvmTail) then return true end end diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index fc0851d..0d846a6 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -203,6 +203,8 @@ local function AssignQIdent( Proc) Q_BLADE_ON_ALONG_FACE = 'Q04' -- i Q_ANTISPLINT_TYPE = 'Q06' -- i Q_DEPTH_CHAMFER = 'Q07' -- d + elseif ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 30 then + Q_BLADE_ON_ALONG_FACE = 'Q04' -- i elseif ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 32 then Q_SIDE_ROUGH_TOOL = 'Q01' -- i Q_CONTOUR_SMALL_TOOL = 'Q02' -- i @@ -3339,7 +3341,11 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin EgtOutLog( sWarn) end -- imposto elevazione e dichiaro non si generano sfridi per VMill - local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 1) .. ';' + -- eventuale massima elevazione imposta dall'utente + local dMaxElev = EgtGetInfo( Proc.Id, Q_MAX_ELEVATION, 'd') + if dMaxElev and dMaxElev < 1 then dMaxElev = nil end + dMaxElev = dMaxElev or dElev + local sNotes = 'MaxElev=' .. EgtNumToString( dMaxElev, 1) .. ';' sNotes = sNotes .. 'VMRS=0;' if bOpenOutRaw then sNotes = sNotes .. 'OpenOutRaw=1;' @@ -6921,6 +6927,7 @@ local function MakeStaircaseStep( Proc, nRawId, b3Raw, nPartId) local nFacetRiser, nFacetTread = 0, 1 if abs( vtNRiser:getZ()) > abs( vtNTread:getZ()) then EgtSurfTmSwapFacets( Proc.Id, 0, 1) + Proc.Face = BL.GetFacetsInfo( Proc, b3Raw) vtNRiser, vtNTread = vtNTread, vtNRiser end -- riferimenti e dimensioni delle facce @@ -7146,7 +7153,8 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) end -- se lunghezza richiede spezzatura if ( Proc.Box:getDimX() > BD.LONGCUT_MAXLEN) or - ( Proc.Box:getDimX() > 0.7 * b3Solid:getDimX() and Proc.Box:getDimX() > BD.LONGCUT_ENDLEN) then + ( Proc.Box:getDimX() > 0.7 * b3Solid:getDimX() and Proc.Box:getDimX() > BD.LONGCUT_ENDLEN) or + ( nForceUseBladeOnNotContinueFace > 0 and ( Proc.Box:getDimX() > BD.LEN_SHORT_PART or 1000)) then -- una faccia if Proc.Fct == 1 then if bUseBlade then @@ -7185,6 +7193,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) elseif b3Fac1:getDimX() < 1 and abs( vtN2:getX()) < GEO.EPS_SMALL then -- la faccia 0 deve essere quella lunga EgtSurfTmSwapFacets( Proc.Id, 0, 1) + Proc.Face = BL.GetFacetsInfo( Proc, b3Raw) if bUseBlade then if nForceUseBladeOnNotContinueFace and nForceUseBladeOnNotContinueFace > 0 then return LongCut.Make( Proc, nPhase, nRawId, nPartId, bUseBlade, nForceUseBladeOnNotContinueFace) @@ -7224,10 +7233,12 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) if b3Fac1:getDimX() < 1 and b3Fac3:getDimX() < 1 then -- la faccia 0 deve essere quella lunga EgtSurfTmSwapFacets( Proc.Id, 0, 1) + Proc.Face = BL.GetFacetsInfo( Proc, b3Raw) bApplyBladeOnLongNotContinueFace = true elseif b3Fac1:getDimX() < 1 and b3Fac2:getDimX() < 1 then -- la faccia 0 deve essere quella lunga EgtSurfTmSwapFacets( Proc.Id, 0, 2) + Proc.Face = BL.GetFacetsInfo( Proc, b3Raw) bApplyBladeOnLongNotContinueFace = true elseif b3Fac2:getDimX() < 1 and b3Fac3:getDimX() < 1 then bApplyBladeOnLongNotContinueFace = true diff --git a/LuaLibs/ProcessRidgeLap.lua b/LuaLibs/ProcessRidgeLap.lua index cd81679..4d57e48 100644 --- a/LuaLibs/ProcessRidgeLap.lua +++ b/LuaLibs/ProcessRidgeLap.lua @@ -10,6 +10,7 @@ local BL = require( 'BeamLib') local Fbs = require( 'FacesBySaw') local Cut = require( 'ProcessCut') local DC = require( 'DiceCut') +local LapJoint = require( 'ProcessLapJoint') EgtOutLog( ' ProcessRidgeLap started', 1) @@ -48,6 +49,7 @@ end --------------------------------------------------------------------- -- Applicazione della lavorazione function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) + local nForceUseBladeOnNotContinueFace = EgtGetInfo( Proc.Id, 'Q04', 'i') or 0 -- recupero l'ingombro del grezzo di appartenenza local b3Raw = EgtGetRawPartBBox( nRawId) -- ingombro del pezzo @@ -133,8 +135,15 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) local b3Cut = EgtGetBBoxGlob( AddId or GDB_ID.NULL, GDB_BB.STANDARD) local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Cut, Fct = 1, Flg = Proc.Flg, Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId} - local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, false) - if not bOk then return bOk, sErr end + if BL.IsCutNeeded( CutProc, b3Raw, dOvmHead) then + local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, false) + if not bOk then return bOk, sErr end + elseif nForceUseBladeOnNotContinueFace > 0 then + EgtSurfTmRemoveFacet( Proc.Id, vFaceOrd[1] - 1) + Proc.Fct = Proc.Fct - 1 + Proc.Face = BL.GetFacetsInfo( Proc, b3Raw) + return LapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) + end end end -- recupero gruppo per geometria addizionale diff --git a/LuaLibs/ProcessStepJoint.lua b/LuaLibs/ProcessStepJoint.lua index 4d16d32..fd267f9 100644 --- a/LuaLibs/ProcessStepJoint.lua +++ b/LuaLibs/ProcessStepJoint.lua @@ -320,10 +320,12 @@ local function MakeThreeFaces( Proc, nPhase, nRawId, nPartId, dOvmHead) if bAdj12 then if dAng12 < 0 then EgtSurfTmSwapFacets( Proc.Id, 0, 2) + Proc.Face = BL.GetFacetsInfo( Proc, b3Raw) end elseif bAdj20 then if dAng20 < 0 then EgtSurfTmSwapFacets( Proc.Id, 1, 2) + Proc.Face = BL.GetFacetsInfo( Proc, b3Raw) end end -- dati delle facce diff --git a/LuaLibs/ProcessStepJointNotch.lua b/LuaLibs/ProcessStepJointNotch.lua index 8960b37..6cc0035 100644 --- a/LuaLibs/ProcessStepJointNotch.lua +++ b/LuaLibs/ProcessStepJointNotch.lua @@ -11,6 +11,7 @@ local BL = require( 'BeamLib') local Fbs = require( 'FacesBySaw') local DC = require( 'DiceCut') local Cut = require( 'ProcessCut') +local Topology = require( 'FeatureTopology') EgtOutLog( ' ProcessStepJointNotch started', 1) @@ -384,6 +385,8 @@ local function MakeFourFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, nDiffWidt EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id)) -- applico lavorazione local NewProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg} + local b3Raw = EgtGetRawPartBBox( nRawId) + Topology.Classify( NewProc, b3Raw) local bOk, sErr = MakeTwoFaces( NewProc, nPhase, nRawId, nPartId, dOvmHead, nDiffWidth) if not bOk then return bOk, sErr end end From 812397a047ec8741fe78e0db6a4af62b59aff89f Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 5 Jun 2024 09:33:52 +0200 Subject: [PATCH 5/8] - In LapJoint -> MakePocket abilitata Q per forzare massima elevazione --- LuaLibs/ProcessLapJoint.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index fc0851d..15f1ae6 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -3339,7 +3339,11 @@ local function MakePocket( Proc, nPartId, b3Solid, ptPs, tvtN, nFaceRef, sMchFin EgtOutLog( sWarn) end -- imposto elevazione e dichiaro non si generano sfridi per VMill - local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 1) .. ';' + -- eventuale massima elevazione imposta dall'utente + local dMaxElev = EgtGetInfo( Proc.Id, Q_MAX_ELEVATION, 'd') + if dMaxElev and dMaxElev < 1 then dMaxElev = nil end + dMaxElev = dMaxElev or dElev + local sNotes = 'MaxElev=' .. EgtNumToString( dMaxElev, 1) .. ';' sNotes = sNotes .. 'VMRS=0;' if bOpenOutRaw then sNotes = sNotes .. 'OpenOutRaw=1;' From ba432f502906304bd14bb77819a24a88b2cf94f9 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 5 Jun 2024 11:01:47 +0200 Subject: [PATCH 6/8] - piccola correzione a LapJoint --- LuaLibs/ProcessLapJoint.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LuaLibs/ProcessLapJoint.lua b/LuaLibs/ProcessLapJoint.lua index 0d846a6..00cdaf8 100644 --- a/LuaLibs/ProcessLapJoint.lua +++ b/LuaLibs/ProcessLapJoint.lua @@ -7154,7 +7154,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead) -- se lunghezza richiede spezzatura if ( Proc.Box:getDimX() > BD.LONGCUT_MAXLEN) or ( Proc.Box:getDimX() > 0.7 * b3Solid:getDimX() and Proc.Box:getDimX() > BD.LONGCUT_ENDLEN) or - ( nForceUseBladeOnNotContinueFace > 0 and ( Proc.Box:getDimX() > BD.LEN_SHORT_PART or 1000)) then + ( ( nForceUseBladeOnNotContinueFace and nForceUseBladeOnNotContinueFace > 0) and ( Proc.Box:getDimX() > BD.LEN_SHORT_PART or 1000)) then -- una faccia if Proc.Fct == 1 then if bUseBlade then From e9534b4eee833f27bc09c56a00ff0c07ed4130b9 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Thu, 6 Jun 2024 11:31:40 +0200 Subject: [PATCH 7/8] correzioni a ottimizzazione teste --- LuaLibs/MachiningLib.lua | 67 +++++++++++++++------------------------- 1 file changed, 25 insertions(+), 42 deletions(-) diff --git a/LuaLibs/MachiningLib.lua b/LuaLibs/MachiningLib.lua index ed176f6..8ab21d7 100644 --- a/LuaLibs/MachiningLib.lua +++ b/LuaLibs/MachiningLib.lua @@ -74,40 +74,34 @@ local function SetCurrMachineHeadType() end --------------------------------------------------------------------- --- funzione che conferma e rende attivi testa e utensile ipotizzati +-- setta ultimi testa e utensile utilizzati se compatibili con ottimizzazione testa local function ConfirmNextMachining() - -- se non definita testa successiva, esco - if not nNextMachHead or nNextMachHead < 1 or nNextMachHead > 2 then return end - -- altrimenti, la confermo come attiva - nActiveHead = nNextMachHead - if nNextMachHead == 1 then - H1_TOOL = H1_NEXT_TOOL - elseif nNextMachHead == 2 then - H2_TOOL = H2_NEXT_TOOL + -- utensile corrente + local sToolUuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) + local sToolName = EgtTdbGetToolFromUUID( sToolUuid or '') + EgtTdbSetCurrTool( sToolName or '') + -- testa dell'utensile corrente + local sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD) + local nHead = tonumber( sHead:sub( 2, #sHead)) + 0 + + if ( nHead < 10 and nHead >= 30) or vFixedHeads[nHead] then + -- testa che non richiede ottimizzazione + return + elseif nHead >= 20 then + nHead = 2 + elseif nHead >= 10 then + nHead = 1 + end + + -- se la testa richiede ottimizzazione, confermo testa attiva + nActiveHead = nHead + if nActiveHead == 1 then + H1_TOOL = sToolName + elseif nActiveHead == 2 then + H2_TOOL = sToolName end - -- reset prossima testa - nNextMachHead = 0 - H1_NEXT_TOOL = '' - H2_NEXT_TOOL = '' end ---------------------------------------------------------------------- --- funzione che traccia testa e utensile ipotizzati -local function SetNextMachining( sToolName, nHead, bFixed) - if nHead < 1 or nHead > 2 then return end - if bFixed then - nNextMachHead = 0 - H1_NEXT_TOOL = '' - H2_NEXT_TOOL = '' - end - nNextMachHead = nHead - if nHead == 1 then - H1_NEXT_TOOL = sToolName - elseif nHead == 2 then - H2_NEXT_TOOL = sToolName - end -end - --------------------------------------------------------------------- local function SetCurrMachiningAndTool( Machining) EgtMdbSetCurrMachining( Machining.Name) @@ -356,7 +350,7 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead, end if ( BEAM and BEAM.BW) or MachineHeadType == ONE_HEAD or MachineHeadType == TWO_EQUAL_HEADS or ( MachineHeadType == TWO_UP_DOWN_HEADS and not bDownHead) then _, sType = EgtEndsWith( sType, '_H2') - elseif not ( BEAM and BEAM.BW) and MachineHeadType == TWO_UP_DOWN_HEADS and bDownHead then + elseif not ( BEAM and BEAM.BW) and MachineHeadType == TWO_UP_DOWN_HEADS and not bTopHead and bDownHead then if not EgtEndsWith( sType, '_H2') then sType = sType .. '_H2' end @@ -383,18 +377,15 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead, local bOk, ToolParams = VerifyTool( Machining, MachiningType, Params, bH2) if bOk then if MachineHeadUse == ONE_HEAD then - SetNextMachining( sToolName, 1, bFixed) return ReturnParams(MachiningType, Machining.Name, Machining.Type, ToolParams) elseif MachineHeadUse == TWO_EQUAL_HEADS then -- se nessuna testa attiva, prendo la prima lavorazione disponibile if nActiveHead == 0 then - SetNextMachining( sToolName, EgtIf( bH2, 2, 1), bFixed) return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams) -- verifico se posso usare lo stesso utensile della testa attiva elseif ( nActiveHead == 1 and not bH2 and sToolName == H1_TOOL) or ( nActiveHead == 2 and bH2 and sToolName == H2_TOOL) then -- se l'utensile sulla testa attiva è molto più piccolo rispetto a quelli salvati non lo scelgo if ( not sH1Param or not sH1Param.TDiam or sH1Param.TDiam < dBiggerToolTolerance * ToolParams.TDiam) and ( not sH2Param or not sH2Param.TDiam or sH2Param.TDiam < 1.25 * ToolParams.TDiam) then - SetNextMachining( sToolName, nActiveHead, bFixed) return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams) end end @@ -414,10 +405,8 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead, end elseif MachineHeadUse == TWO_UP_DOWN_HEADS then if bTopHead and not bH2 then - SetNextMachining( sToolName, 1, bFixed) return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams) elseif bDownHead and bH2 then - SetNextMachining( sToolName, 2, bFixed) return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams) end end @@ -428,31 +417,25 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead, -- se uno dei due utensili è molto più grande dell'altro scelgo quello senza fare altre analisi if sH1Mach ~= "" and sH1Param.TDiam and sH2Mach ~= "" and sH2Param.TDiam then if sH1Param.TDiam > dBiggerToolTolerance * sH2Param.TDiam then - SetNextMachining( sH1Tool, 1, bFixed) return ReturnParams( MachiningType, sH1Mach, sType, sH1Param) elseif sH2Param.TDiam > dBiggerToolTolerance * sH1Param.TDiam then - SetNextMachining( sH2Tool, 2, bFixed) return ReturnParams( MachiningType, sH2Mach, sType, sH2Param) end end -- verifico se cambiare testa o cambiare utensile su quella corrente if nActiveHead == 1 then if sH2Mach ~= "" then - SetNextMachining( sH2Tool, 2, bFixed) return ReturnParams( MachiningType, sH2Mach, sType, sH2Param) --return sH2Mach, sH2Param.Type, sH2Param.TMaxMat, sH2Param.MaxToolLength, sH2Param.ToolDiam, sH2Param.DiamTh, sH2Param.FreeLen elseif sH1Mach ~= "" then - SetNextMachining( sH1Tool, 1, bFixed) return ReturnParams( MachiningType, sH1Mach, sType, sH1Param) --return sH1Mach, sH1Param.Type, sH1Param.TMaxMat, sH1Param.MaxToolLength, sH1Param.ToolDiam, sH1Param.DiamTh, sH1Param.FreeLen end elseif nActiveHead == 2 then if sH1Mach ~= "" then - SetNextMachining( sH1Tool, 1, bFixed) return ReturnParams( MachiningType, sH1Mach, sType, sH1Param) --return sH1Mach, sH1Param.Type, sH1Param.TMaxMat, sH1Param.MaxToolLength, sH1Param.ToolDiam, sH1Param.DiamTh, sH1Param.FreeLen elseif sH2Mach ~= "" then - SetNextMachining( sH2Tool, 2, bFixed) return ReturnParams( MachiningType, sH2Mach, sType, sH2Param) --return sH2Mach, sH2Param.Type, sH2Param.TMaxMat, sH2Param.MaxToolLength, sH2Param.ToolDiam, sH2Param.DiamTh, sH2Param.FreeLen end From 4eb3b38dd4fa5381c16c3826497c42070755143a Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Thu, 6 Jun 2024 12:31:02 +0200 Subject: [PATCH 8/8] update log e version --- UpdateLog.txt | 7 +++++++ Version.lua | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/UpdateLog.txt b/UpdateLog.txt index 5c46fdc..ef175ca 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,12 @@ ==== Beam Update Log ==== +Versione 2.6f1 (06/06/2024) +- Added : Q04 (tipo longcut) abilitato anche in RidgeLap (T30), se riconducibile a 2 facce +- Modif : migliorie al taglio a cubetti +- Modif : in LapJoint -> MakePocket abilitata Q per forzare massima elevazione +- Fixed : correzione a SCC per lama da sotto con aggregato +- Fixed : correzioni a ottimizzazione teste per macchine con teste sopra/sotto + Versione 2.6e5 (27/05/2024) - Modif : in LapJoint corretto typo in lavorazione lamello che impediva il funzionamento corretto. diff --git a/Version.lua b/Version.lua index a79b9c0..fa97bff 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di Beam NAME = 'Beam' -VERSION = '2.6e5' +VERSION = '2.6f1' MIN_EXE = '2.6e2'