- in BLADETOWASTE taglio singolo funzionante, da completare
This commit is contained in:
+1
-1
@@ -428,7 +428,7 @@ function DiceCut.GetDice( Part, Face1, Face2, OptionalParameters)
|
||||
-- distanza tra piani paralleli e piani di taglio (era sempre 0, serve???)
|
||||
local dTolerance = OptionalParameters.dTolerance or 0
|
||||
-- inclinazione limite per taglio da sotto
|
||||
local dNzLimDownUp = OptionalParameters.dNzLimDownUp BeamLib.GetNzLimDownUp( b3BoxDicing)
|
||||
local dNzLimDownUp = OptionalParameters.dNzLimDownUp or BeamLib.GetNzLimDownUp( b3BoxDicing)
|
||||
|
||||
--Ricavo le altezze dei BoundingBox contenente feature e estremi del grezzo
|
||||
local TBoxPoint = CalcolaPuntiEstremiBox( b3BoxDicing)
|
||||
|
||||
@@ -116,6 +116,7 @@ function STR0005.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
Blade.Result = {}
|
||||
local Cutting = {}
|
||||
local dMRRBlade = 0
|
||||
local dCompletionPercentage = 0
|
||||
|
||||
-- estensione oltre la coda
|
||||
local dExtendAfterTail = Strategy.Parameters.dExtendAfterTail or max( Part.dDistanceToNextPiece - BeamData.CUT_EXTRA, 0)
|
||||
@@ -194,7 +195,7 @@ function STR0005.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
local dMRRBlade2 = MachiningLib.GetToolMRR( MRRParameters2)
|
||||
dMRRBlade = ( dMRRBlade1 + dMRRBlade2) / 2
|
||||
|
||||
Cutting = Cutting2
|
||||
dCompletionPercentage = Cutting2.dCompletionPercentage
|
||||
|
||||
-- se la lavorazione con codolo fallisce o non è possibile si proseguirà a quella con cubetti
|
||||
end
|
||||
@@ -202,9 +203,11 @@ function STR0005.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
-- lavorazione a cubetti / taglio singolo
|
||||
if #Blade.Result == 0 and not bLeaveWasteAttached then
|
||||
local bDropWholeWaste = Strategy.Parameters.sCuttingStrategy == 'DROP_WHOLE_WASTE'
|
||||
local OptionalParameters = { bDropWholeWaste = bDropWholeWaste}
|
||||
local OptionalParameters = { bDropWholeWaste = bDropWholeWaste, dMaxWasteVolume = Strategy.Parameters.dMaxWasteVolume, dMaxWasteLength = Strategy.Parameters.dMaxWasteLength}
|
||||
Blade.Result.Sorted = BladeToWaste.Make( Proc, Part, OptionalParameters)
|
||||
|
||||
-- TODO la BladeToWaste dovrà restituire la dCompletionPercentage
|
||||
dCompletionPercentage = Blade.Result.Sorted[#Blade.Result.Sorted].dCompletionPercentage
|
||||
end
|
||||
|
||||
-- aggiunta lavorazioni
|
||||
@@ -225,12 +228,12 @@ function STR0005.Make( bAddMachining, Proc, Part, CustomParameters)
|
||||
end
|
||||
-- TODO calcolo migliore area lavorata; se ho il codolo ha senso l'incompleta? se incompleta con codolo faccio i cubetti??
|
||||
if nIsApplicableCount > 0 then
|
||||
if Cutting.dCompletionPercentage > 100 - 10 * GEO.EPS_SMALL then
|
||||
if dCompletionPercentage > 100 - 10 * GEO.EPS_SMALL then
|
||||
Strategy.Result.sStatus = 'Completed'
|
||||
else
|
||||
Strategy.Result.sStatus = 'Not-Completed'
|
||||
-- TODO al momento si assume che la percentuale di completamento dell'ultima lavorazione sia quella rilevante
|
||||
dFinalCompletionPercentage = Cutting.dCompletionPercentage
|
||||
dFinalCompletionPercentage = dCompletionPercentage
|
||||
end
|
||||
else
|
||||
Strategy.Result.sStatus = 'Not-Applicable'
|
||||
|
||||
@@ -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