From 604a2676ced78b32f219537ac5bce23151ac2ea4 Mon Sep 17 00:00:00 2001 From: "luca.mazzoleni" Date: Tue, 16 Dec 2025 15:18:07 +0100 Subject: [PATCH] - correzioni in FaceData e MachiningLib --- LuaLibs/FaceData.lua | 3 +++ LuaLibs/MachiningLib.lua | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/LuaLibs/FaceData.lua b/LuaLibs/FaceData.lua index 11b4926..d488119 100644 --- a/LuaLibs/FaceData.lua +++ b/LuaLibs/FaceData.lua @@ -422,6 +422,7 @@ local function GetBottomFaces( Proc) CurrentEdge.ptStart = BottomFaces[1].Edges[i].ptStart CurrentEdge.ptEnd = BottomFaces[1].Edges[i].ptEnd CurrentEdge.vtEdge = BottomFaces[1].Edges[i].vtEdge + CurrentEdge.id = BottomFaces[1].Edges[i].id if nFirstLongEdgeIndex then if i == nFirstLongEdgeIndex then @@ -520,6 +521,7 @@ local function GetLongFaces( Proc, MainFaces) CurrentEdge.ptStart = LongFaces[i].Edges[j].ptStart CurrentEdge.ptEnd = LongFaces[i].Edges[j].ptEnd CurrentEdge.vtEdge = LongFaces[i].Edges[j].vtEdge + CurrentEdge.id = LongFaces[i].Edges[j].id if Proc.Topology.sFamily == 'Tunnel' then if CurrentEdge.idAdjacentFace > -1 then @@ -619,6 +621,7 @@ local function GetSideFaces( Proc, MainFaces) CurrentEdge.ptStart = SideFaces[i].Edges[j].ptStart CurrentEdge.ptEnd = SideFaces[i].Edges[j].ptEnd CurrentEdge.vtEdge = SideFaces[i].Edges[j].vtEdge + CurrentEdge.id = SideFaces[i].Edges[j].id if Proc.Topology.sFamily == 'Tunnel' then if CurrentEdge.idAdjacentFace > -1 then diff --git a/LuaLibs/MachiningLib.lua b/LuaLibs/MachiningLib.lua index a4b8bf3..4f53bf9 100644 --- a/LuaLibs/MachiningLib.lua +++ b/LuaLibs/MachiningLib.lua @@ -584,6 +584,7 @@ function MachiningLib.FindBlade( Proc, ToolSearchParameters) end -- se dati sufficienti, si determina se con questo utensile il taglio è fattibile e il modo di lavorare della lama + -- TODO corretto il calcolo della dDepthToMachine? è comunque inutile calcolare per una profondità che so già andrà in collisione if bIsToolCompatible then if FaceToMachine and EdgeToMachine and Part and dElevation then local bIsBladeOk = false @@ -592,7 +593,7 @@ function MachiningLib.FindBlade( Proc, ToolSearchParameters) Edge = EdgeToMachine, Part = Part, Tool = TOOLS[i], - dDepthToMachine = dElevation + dDepthToMachine = min( dElevation, TOOLS[i].dMaxDepth) } local BladeEngagementOptionalParameters = { bIsDicing = bIsDicing