- in STR0010 corretta scelta lato nel caso 2 facce

This commit is contained in:
luca.mazzoleni
2026-01-13 09:24:13 +01:00
parent 9f6a89d5ae
commit 1e4e75115c
2 changed files with 17 additions and 18 deletions
+17 -17
View File
@@ -112,31 +112,31 @@ local function IsPositionOK( Proc, Part)
end
-------------------------------------------------------------------------------------------------------------
-- TODO da sistemare
local function GetBottomFaceEdge( Proc, nIndexFace)
-- contemplate max 2 facce
local function GetBottomFaceEdge( Proc, Face)
local Edge = {}
-- si lavora la bottom longitudinalmente
if Proc.nFct == 1 or Proc.Topology.sFamily == 'DoubleBevel' then
local BottomEdgesSorted = {}
for i = 1, #Proc.MainFaces.BottomFaces[nIndexFace].Edges do
table.insert( BottomEdgesSorted, Proc.MainFaces.BottomFaces[nIndexFace].Edges[i])
for i = 1, #Face.Edges do
table.insert( BottomEdgesSorted, Face.Edges[i])
end
table.sort( BottomEdgesSorted, CompareEdges)
Edge = BottomEdgesSorted[1]
-- edge in comune tra le due facce
elseif Proc.nFct == 2 then
if nIndexFace == 1 then
Edge = Proc.MainFaces.BottomFaces[nIndexFace].MainEdges.LongEdges[1]
elseif nIndexFace == 2 then
Edge = Proc.MainFaces.BottomFaces[nIndexFace].MainEdges.BottomEdge
end
-- si lavora il lato in comune tra le due facce
else
if nIndexFace == 1 then
Edge = Proc.MainFaces.BottomFaces[nIndexFace].MainEdges.LongEdges[1]
elseif nIndexFace == 2 then
Edge = Proc.MainFaces.BottomFaces[nIndexFace].MainEdges.BottomEdge
-- ricerca lato in comune
local nCommonEdge
for i = 1, #Face.Edges do
if Face.Edges[i].idAdjacentFace > -1 then
nCommonEdge = i
end
end
Edge = Face.Edges[nCommonEdge]
end
return Edge
@@ -208,7 +208,7 @@ function STR0010.Make( bAddMachining, Proc, Part, CustomParameters)
local bAreAllMachiningsAdded = true
local Milling = {}
local OptionalParametersFaceByMill = { nStepType = MCH_MILL_ST.ONEWAY, bIsSplitFeature = bIsSplitFeature, dExtendAfterTail = dExtendAfterTail}
local EdgeToMachine = GetBottomFaceEdge( Proc, 1)
local EdgeToMachine = GetBottomFaceEdge( Proc, Proc.MainFaces.BottomFaces[1])
if EdgeToMachine.bIsOpen then
OptionalParametersFaceByMill.dDepthToMachine = EdgeToMachine.dElevation + BeamData.CUT_EXTRA
end
@@ -224,7 +224,7 @@ function STR0010.Make( bAddMachining, Proc, Part, CustomParameters)
if dAngleBetweenFaces >= -91 then
Milling = {}
OptionalParametersFaceByMill = { nStepType = MCH_MILL_ST.ONEWAY, bIsSplitFeature = bIsSplitFeature, dExtendAfterTail = dExtendAfterTail}
EdgeToMachine = GetBottomFaceEdge( Proc, 2)
EdgeToMachine = GetBottomFaceEdge( Proc, Proc.MainFaces.BottomFaces[2])
if EdgeToMachine.bIsOpen then
OptionalParametersFaceByMill.dDepthToMachine = EdgeToMachine.dElevation + BeamData.CUT_EXTRA
end
-1
View File
@@ -121,7 +121,6 @@ end
function BLADEKEEPWASTE.Make( Proc, Part, OptionalParameters)
-- TODO verificare funzionamento con lama da sotto
-- TODO scelta utensile è corretto lasciarla a FaceByBlade?
-- attenzione perchè se l'inclinazione della faccia la fa finire oltre lo spigolo questo riduce il massimo (come calcolare????)
local Result = {}
local Machinings = {}