- in BLADETOWASTE taglio singolo funzionante, da completare
This commit is contained in:
@@ -24,11 +24,13 @@ function BLADETOWASTE.Make( Proc, Part, OptionalParameters)
|
||||
-- parametri opzionali e default
|
||||
local nToolIndex = OptionalParameters.nToolIndex
|
||||
local bDropWholeWaste = OptionalParameters.bDropWholeWaste or false
|
||||
local dMaxWasteVolume = OptionalParameters.dMaxWasteVolume or 0
|
||||
local dMaxWasteLength = OptionalParameters.dMaxWasteLength or 0
|
||||
|
||||
local dFeatureVolume = FeatureLib.GetFeatureVolume( Proc, Part)
|
||||
local dFeatureMaxDimension = max( Proc.b3Box:getDimX(), Proc.b3Box:getDimY())
|
||||
local bIsFeatureSmall = dFeatureVolume < StrategyParameters.dMaxWasteVolume + 10 * GEO.EPS_SMALL
|
||||
and dFeatureMaxDimension < StrategyParameters.dMaxWasteLength + 10 * GEO.EPS_SMALL
|
||||
local bIsFeatureSmall = dFeatureVolume < dMaxWasteVolume + 10 * GEO.EPS_SMALL
|
||||
and dFeatureMaxDimension < dMaxWasteLength + 10 * GEO.EPS_SMALL
|
||||
|
||||
if Proc.nFct == 1 and ( bIsFeatureSmall or bDropWholeWaste) then
|
||||
local EdgeToMachine = {}
|
||||
@@ -36,7 +38,7 @@ function BLADETOWASTE.Make( Proc, Part, OptionalParameters)
|
||||
if not nToolIndex then
|
||||
local ToolSearchParameters = {}
|
||||
for i = 1, #Proc.Faces[1].Edges do
|
||||
if Proc.Faces[1].Edges[i].dElevation < EdgeToMachine.dElevation - 10 * GEO.EPS_SMALL then
|
||||
if ( i == 1) or Proc.Faces[1].Edges[i].dElevation < EdgeToMachine.dElevation - 10 * GEO.EPS_SMALL then
|
||||
EdgeToMachine = Proc.Faces[1].Edges[i]
|
||||
end
|
||||
end
|
||||
@@ -50,7 +52,8 @@ function BLADETOWASTE.Make( Proc, Part, OptionalParameters)
|
||||
nToolIndex = ToolInfo.nToolIndex
|
||||
end
|
||||
|
||||
local Cutting = FaceByBlade.Make( Proc, Part, Proc.Faces[1], EdgeToMachine)
|
||||
local OptionalParametersFaceByBlade = { dDepthToMachine = EdgeToMachine.dElevation + BeamData.CUT_EXTRA}
|
||||
local Cutting = FaceByBlade.Make( Proc, Part, Proc.Faces[1], EdgeToMachine, OptionalParametersFaceByBlade)
|
||||
table.insert( Result, Cutting)
|
||||
|
||||
-- restituire tabella contenente lavorazioni, già con cloni se necessari
|
||||
|
||||
Reference in New Issue
Block a user