- in FACEBYBLADE piccola correzione
This commit is contained in:
@@ -136,14 +136,14 @@ local function GetBestBlade( Proc, Part, Face, OptionalParameters)
|
||||
end
|
||||
|
||||
|
||||
local function GetEdgeToMachine( Edges, nToolIndex)
|
||||
local function GetEdgeToMachine( Edges, bIsBottomBlade)
|
||||
local EdgeToMachine = {}
|
||||
local EdgesSorted = {}
|
||||
|
||||
for i = 1, #Edges do
|
||||
table.insert( EdgesSorted, Edges[i])
|
||||
end
|
||||
if TOOLS[nToolIndex].SetupInfo.HeadType.bBottom then
|
||||
if bIsBottomBlade then
|
||||
table.sort( EdgesSorted, CompareEdgesBottomHead)
|
||||
else
|
||||
table.sort( EdgesSorted, CompareEdgesTopHead)
|
||||
@@ -218,6 +218,10 @@ function BLADETOWASTE.Make( ProcOrId, Part, OptionalParameters)
|
||||
local Cutting = {}
|
||||
local EdgeToMachine = {}
|
||||
local dDepthToMachine = 0
|
||||
-- scelta lato da lavorare per testa sopra e sotto - si prevede perchè l'utensile non è ancora stato scelto
|
||||
local EdgeToMachineBottomBlade = GetEdgeToMachine( Proc.Faces[1].Edges, true)
|
||||
local EdgeToMachineTopBlade = GetEdgeToMachine( Proc.Faces[1].Edges, false)
|
||||
dDepthToMachine = EdgeToMachine.dElevation + BeamData.CUT_EXTRA
|
||||
-- ricerca utensile
|
||||
if not nToolIndex then
|
||||
-- scelta lama da sopra o da sotto
|
||||
@@ -226,9 +230,6 @@ function BLADETOWASTE.Make( ProcOrId, Part, OptionalParameters)
|
||||
nToolIndex = GetBestBlade( Proc, Part, Proc.Faces[1], OptionalParameters)
|
||||
end
|
||||
end
|
||||
-- scelta lato da lavorare
|
||||
EdgeToMachine = GetEdgeToMachine( Proc.Faces[1].Edges, nToolIndex)
|
||||
dDepthToMachine = EdgeToMachine.dElevation + BeamData.CUT_EXTRA
|
||||
local dResidualDepth = dDepthToMachine - TOOLS[nToolIndex].dMaxMaterial
|
||||
|
||||
-- TODO qui gestire il caso in cui si può tagliare da due lati (inizialmente solo se vtN:Y è ~= 0?)
|
||||
|
||||
Reference in New Issue
Block a user