From 2e289e192158e89aea0be7f0b6c0b80880f3e9d0 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 21 Jul 2026 17:50:03 +0200 Subject: [PATCH 1/3] - commenti --- LuaLibs/PreSimulationLib.lua | 9 +++++---- StrategyLibs/BLADETOWASTE.lua | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/LuaLibs/PreSimulationLib.lua b/LuaLibs/PreSimulationLib.lua index 6e41ad7..c3bf666 100644 --- a/LuaLibs/PreSimulationLib.lua +++ b/LuaLibs/PreSimulationLib.lua @@ -356,11 +356,11 @@ local function CheckCollisionPoint( sAxis, ptOnToolTipCenter, vtHead, vtAux, Par end end - -- se trovata collisione con pezzo è inutile procedere con il grezzo - if bCollisionFoundPiece then + -- se trovata collisione con pezzo è inutile procedere con il grezzo + if bCollisionFoundPiece then - return true - end + return true + end -- check collisione con grezzo restante, se con il pezzo non c'è collisione e non è un taglio di testa o coda local bCollisionFoundRestLength = false @@ -443,6 +443,7 @@ local function CheckCollisionWithAxis( sAxis, MachiningParameters, OptionalParam idAddedCollisionSurfTm = EgtSurfTmByRegionExtrusion( Part.idTempGroup, idFlangeCurve, vtExtrusion, 0.05, GDB_RT.GLOB) end + -- TODO raggruppare parametri opzionali! local bCollisionFoundPiece, bCollisionFoundRestLength = CheckCollisionPoint( sAxis, PointsOnToolTipCenter[i], vtHead, vtAux, Part, bCannotSplitRestLength, sRestLengthSideForPreSimulation, idCheckCollisionTm, idAddedCollisionSurfTm) -- se trovata collisione con pezzo è inutile controllare gli altri punti diff --git a/StrategyLibs/BLADETOWASTE.lua b/StrategyLibs/BLADETOWASTE.lua index 2afb658..b8bb894 100644 --- a/StrategyLibs/BLADETOWASTE.lua +++ b/StrategyLibs/BLADETOWASTE.lua @@ -782,6 +782,8 @@ local function CutWholeWaste( Proc, Part, OptionalParameters) end +-- TODO da rivedere!! Si devono creare trimesh estruse nelle direzioni normali alle due facce, unirle e poi sottrarle al solido +-- nel modo attuale funziona solo se i cubetti sono orientati come le direzioni principali local function UpdateDiceRaw( idRaw, idParallelTm, idPerpendicularTm, Part, MainFace, OtherFace) -- frame solidale alla feature From 06ed12b1fee1a16ab5e67a6ef716c66cdd068736 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 22 Jul 2026 10:37:56 +0200 Subject: [PATCH 2/3] - in STR0015 gestito correttamente lato di lavoro per FreeContour; aggiunta vtHead --- Strategies/Standard/STR0015/STR0015.lua | 32 ++++++++++++++++++------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/Strategies/Standard/STR0015/STR0015.lua b/Strategies/Standard/STR0015/STR0015.lua index 8eb4334..65dc4d6 100644 --- a/Strategies/Standard/STR0015/STR0015.lua +++ b/Strategies/Standard/STR0015/STR0015.lua @@ -858,24 +858,38 @@ function STR0015.Make( bAddMachining, Proc, Part, CustomParameters) CurrentMachining.LeadInForSplit.nType = MCH_MILL_LI.LINEAR CurrentMachining.LeadOutForSplit.nType = MCH_MILL_LI.LINEAR CurrentMachining.LeadInForSplit.dTangentDistance = 0 - CurrentMachining.LeadInForSplit.dPerpDistance = TOOLS[CurrentMachining.ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC CurrentMachining.LeadOutForSplit.dTangentDistance = 0 - CurrentMachining.LeadOutForSplit.dPerpDistance = TOOLS[CurrentMachining.ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC + if not ID.IsFreeContour( Proc) then + CurrentMachining.LeadInForSplit.dPerpDistance = TOOLS[CurrentMachining.ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC + CurrentMachining.LeadOutForSplit.dPerpDistance = TOOLS[CurrentMachining.ToolInfo.nToolIndex].dDiameter / 2 + BeamData.COLL_SIC + end - -- sistemo il lato e la direzione di lavoro - if CurrentMachining.bOtherDirection then - CurrentMachining.bToolInvert = true - CurrentMachining.bInvert = EgtIf( TOOLS[CurrentMachining.ToolInfo.nToolIndex].bIsCCW, true, false) - CurrentMachining.nWorkside = EgtIf( TOOLS[CurrentMachining.ToolInfo.nToolIndex].bIsCCW, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT) + -- sistemo il lato e la direzione di lavoro; se FreeContour il lato è determinato dalla Feature, altrimenti dalla concordanza + if ID.IsFreeContour( Proc) then + CurrentMachining.bInvert = false + if Proc.nGrp == 0 then + CurrentMachining.nWorkside = MCH_MILL_WS.CENTER + elseif Proc.nGrp == 3 then + CurrentMachining.nWorkside = MCH_MILL_WS.LEFT + elseif Proc.nGrp == 4 then + CurrentMachining.nWorkside = MCH_MILL_WS.RIGHT + end else - CurrentMachining.bInvert = EgtIf( TOOLS[CurrentMachining.ToolInfo.nToolIndex].bIsCCW, false, true) - CurrentMachining.nWorkside = EgtIf( TOOLS[CurrentMachining.ToolInfo.nToolIndex].bIsCCW, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT) + if CurrentMachining.bOtherDirection then + CurrentMachining.bToolInvert = true + CurrentMachining.bInvert = EgtIf( TOOLS[CurrentMachining.ToolInfo.nToolIndex].bIsCCW, true, false) + CurrentMachining.nWorkside = EgtIf( TOOLS[CurrentMachining.ToolInfo.nToolIndex].bIsCCW, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT) + else + CurrentMachining.bInvert = EgtIf( TOOLS[CurrentMachining.ToolInfo.nToolIndex].bIsCCW, false, true) + CurrentMachining.nWorkside = EgtIf( TOOLS[CurrentMachining.ToolInfo.nToolIndex].bIsCCW, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT) + end end CurrentMachining.ptEdge1 = EgtSP( Proc.idAddAuxGeom, GDB_ID.ROOT) CurrentMachining.ptEdge2 = EgtEP( Proc.idAddAuxGeom, GDB_ID.ROOT) CurrentMachining.dEdgeLength = EgtCurveLength( Proc.idAddAuxGeom) CurrentMachining.vtEdgeDirection = EgtSV( Proc.idAddAuxGeom, GDB_ID.ROOT) + EgtMV( Proc.idAddAuxGeom, GDB_ID.ROOT) + EgtEV( Proc.idAddAuxGeom, GDB_ID.ROOT) CurrentMachining.dLengthOnX = Proc.b3Box:getDimX() + CurrentMachining.vtHead = CurrentMachining.vtToolDirection local MachiningToSplit = {} table.insert( MachiningToSplit, CurrentMachining) From d769b603bdd763ecd465b7444d1c6c546a1b900e Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Wed, 22 Jul 2026 10:38:31 +0200 Subject: [PATCH 3/3] update version --- Version.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Version.lua b/Version.lua index d33b32d..0fefa93 100644 --- a/Version.lua +++ b/Version.lua @@ -2,5 +2,5 @@ -- Gestione della versione di BeamNT NAME = 'BeamNT' -VERSION = '3.1g2' -MIN_EXE = '3.1g1' +VERSION = '3.1g3' +MIN_EXE = '3.1g3'