|
|
|
@@ -260,6 +260,7 @@ local function GetBestBlade( Proc, Part, Face, OptionalParameters)
|
|
|
|
|
local dShortPartLength = OptionalParameters.dShortPartLength or BeamData.LEN_SHORT_PART
|
|
|
|
|
local EdgeToMachineTop = OptionalParameters.EdgeToMachineTop
|
|
|
|
|
local EdgeToMachineBottom = OptionalParameters.EdgeToMachineBottom
|
|
|
|
|
local bIsDicing = OptionalParameters.bIsDicing
|
|
|
|
|
local sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation
|
|
|
|
|
local bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength
|
|
|
|
|
-- TODO qui sarebbe meglio avere dExtra come OptionalParameter???
|
|
|
|
@@ -288,6 +289,7 @@ local function GetBestBlade( Proc, Part, Face, OptionalParameters)
|
|
|
|
|
FaceToMachine = Face,
|
|
|
|
|
EdgeToMachine = EdgeToMachineTop,
|
|
|
|
|
Part = Part,
|
|
|
|
|
bIsDicing = bIsDicing,
|
|
|
|
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
|
|
|
|
bCannotSplitRestLength = bCannotSplitRestLength
|
|
|
|
|
})
|
|
|
|
@@ -302,6 +304,7 @@ local function GetBestBlade( Proc, Part, Face, OptionalParameters)
|
|
|
|
|
FaceToMachine = Face,
|
|
|
|
|
EdgeToMachine = EdgeToMachineBottom,
|
|
|
|
|
Part = Part,
|
|
|
|
|
bIsDicing = bIsDicing,
|
|
|
|
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
|
|
|
|
bCannotSplitRestLength = bCannotSplitRestLength
|
|
|
|
|
})
|
|
|
|
@@ -368,6 +371,7 @@ local function GetSingleCutStrategy( Proc, Part, OptionalParameters)
|
|
|
|
|
local bReduceBladePath = OptionalParameters.bReduceBladePath or false
|
|
|
|
|
local bAllowFastCuts = OptionalParameters.bAllowFastCuts or false
|
|
|
|
|
local FaceToMachine = Proc.Faces[OptionalParameters.nFaceToMachineIndex or 1]
|
|
|
|
|
local bIsDicing = OptionalParameters.bIsDicing or false
|
|
|
|
|
local sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation or 'Tail'
|
|
|
|
|
local bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength or false
|
|
|
|
|
-- lati da lavorare in base al tipo di lama
|
|
|
|
@@ -386,6 +390,7 @@ local function GetSingleCutStrategy( Proc, Part, OptionalParameters)
|
|
|
|
|
EdgeToMachineTop = EdgeToMachineList.Top,
|
|
|
|
|
EdgeToMachineBottom = EdgeToMachineList.Bottom,
|
|
|
|
|
nToolIndex = nToolIndex,
|
|
|
|
|
bIsDicing = bIsDicing,
|
|
|
|
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
|
|
|
|
bCannotSplitRestLength = bCannotSplitRestLength
|
|
|
|
|
}
|
|
|
|
@@ -437,6 +442,7 @@ local function GetSingleCutStrategy( Proc, Part, OptionalParameters)
|
|
|
|
|
FaceToMachine = FaceToMachine,
|
|
|
|
|
EdgeToMachine = EdgeToMachineList.TopGuillotine,
|
|
|
|
|
Part = Part,
|
|
|
|
|
bIsDicing = bIsDicing,
|
|
|
|
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
|
|
|
|
bCannotSplitRestLength = bCannotSplitRestLength
|
|
|
|
|
})
|
|
|
|
@@ -469,6 +475,7 @@ local function GetDualSideCutStrategy( Proc, Part, OptionalParameters)
|
|
|
|
|
OptionalParameters = OptionalParameters or {}
|
|
|
|
|
local nToolIndex = OptionalParameters.nToolIndex
|
|
|
|
|
local FaceToMachine = Proc.Faces[OptionalParameters.nFaceToMachineIndex or 1]
|
|
|
|
|
local bIsDicing = OptionalParameters.bIsDicing or false
|
|
|
|
|
local sRestLengthSideForPreSimulation = OptionalParameters.sRestLengthSideForPreSimulation or 'Tail'
|
|
|
|
|
local bCannotSplitRestLength = OptionalParameters.bCannotSplitRestLength or false
|
|
|
|
|
|
|
|
|
@@ -492,6 +499,7 @@ local function GetDualSideCutStrategy( Proc, Part, OptionalParameters)
|
|
|
|
|
FaceToMachine = FaceToMachine,
|
|
|
|
|
EdgeToMachine = EdgeToMachine,
|
|
|
|
|
Part = Part,
|
|
|
|
|
bIsDicing = bIsDicing,
|
|
|
|
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
|
|
|
|
bCannotSplitRestLength = bCannotSplitRestLength
|
|
|
|
|
})
|
|
|
|
@@ -504,6 +512,7 @@ local function GetDualSideCutStrategy( Proc, Part, OptionalParameters)
|
|
|
|
|
FaceToMachine = FaceToMachine,
|
|
|
|
|
EdgeToMachine = BeamLib.FindEdgeBestOrientedAsDirection( FaceToMachine.Edges, -EdgeToMachine.vtN),
|
|
|
|
|
Part = Part,
|
|
|
|
|
bIsDicing = bIsDicing,
|
|
|
|
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
|
|
|
|
bCannotSplitRestLength = bCannotSplitRestLength
|
|
|
|
|
})
|
|
|
|
@@ -525,6 +534,7 @@ local function GetDualSideCutStrategy( Proc, Part, OptionalParameters)
|
|
|
|
|
FaceToMachine = FaceToMachine,
|
|
|
|
|
EdgeToMachine = BeamLib.FindEdgeBestOrientedAsDirection( FaceToMachine.Edges, -EdgeToMachine.vtN),
|
|
|
|
|
Part = Part,
|
|
|
|
|
bIsDicing = bIsDicing,
|
|
|
|
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
|
|
|
|
bCannotSplitRestLength = bCannotSplitRestLength
|
|
|
|
|
})
|
|
|
|
@@ -543,6 +553,7 @@ local function GetDualSideCutStrategy( Proc, Part, OptionalParameters)
|
|
|
|
|
FaceToMachine = FaceToMachine,
|
|
|
|
|
EdgeToMachine = EdgeToMachine,
|
|
|
|
|
Part = Part,
|
|
|
|
|
bIsDicing = bIsDicing,
|
|
|
|
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
|
|
|
|
bCannotSplitRestLength = bCannotSplitRestLength
|
|
|
|
|
})
|
|
|
|
@@ -578,6 +589,7 @@ local function GetDualSideCutStrategy( Proc, Part, OptionalParameters)
|
|
|
|
|
FaceToMachine = FaceToMachine,
|
|
|
|
|
EdgeToMachine = EdgeToMachine,
|
|
|
|
|
Part = Part,
|
|
|
|
|
bIsDicing = bIsDicing,
|
|
|
|
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
|
|
|
|
bCannotSplitRestLength = bCannotSplitRestLength
|
|
|
|
|
})
|
|
|
|
@@ -595,6 +607,7 @@ local function GetDualSideCutStrategy( Proc, Part, OptionalParameters)
|
|
|
|
|
dDepthToMachine = dDepthToMachine
|
|
|
|
|
}
|
|
|
|
|
local BladeEngagementOptionalParameters = {
|
|
|
|
|
bIsDicing = bIsDicing,
|
|
|
|
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
|
|
|
|
bCannotSplitRestLength = bCannotSplitRestLength
|
|
|
|
|
}
|
|
|
|
@@ -790,8 +803,7 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|
|
|
|
SetDiceFaceInfo( Proc, vCuts[i][j])
|
|
|
|
|
if ( i % 2) == 1 then
|
|
|
|
|
local vtO = EgtSurfTmFacetNormVersor( vCuts[i][j], 0, GDB_ID.ROOT)
|
|
|
|
|
if ( MainFace.vtN:getY() > 0.766 and vtO:getY() < -0.05) or
|
|
|
|
|
( MainFace.vtN:getY() < -0.766 and vtO:getY() > 0.05) then
|
|
|
|
|
if MachiningLib.IsFaceZOutOfRange( vtO, Tool) then
|
|
|
|
|
EgtInvertSurf( vCuts[i][j])
|
|
|
|
|
bAreOrthogonalCutsInverted = true
|
|
|
|
|
end
|
|
|
|
@@ -836,6 +848,7 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|
|
|
|
end
|
|
|
|
|
-- calcolo lavorazione della singola faccia
|
|
|
|
|
-- per tagli paralleli e faccia aperta si prova a tagliare come se fosse una faccia singola, accorpando i tagli
|
|
|
|
|
-- TODO bIsDicing è da mettere a true?
|
|
|
|
|
local bCanMergeParallelCuts = ( ( i % 2) == 0) and ( Proc.nFct == 1)
|
|
|
|
|
local bIsDicingOk = true
|
|
|
|
|
if bCanMergeParallelCuts then
|
|
|
|
@@ -847,6 +860,7 @@ local function CalculateDiceMachinings( vCuts, Parameters)
|
|
|
|
|
nToolIndex = Tool.nIndex,
|
|
|
|
|
dExtendAfterTail = dExtendAfterTail,
|
|
|
|
|
bReduceBladePath = bReduceBladePath,
|
|
|
|
|
bIsDicing = false,
|
|
|
|
|
sRestLengthSideForPreSimulation = sRestLengthSideForPreSimulation,
|
|
|
|
|
bCannotSplitRestLength = bCannotSplitRestLength
|
|
|
|
|
}
|
|
|
|
|