- in MachiningLib.TestEngagement, PreSimulationLib e LeadInOutLib predisposte funzioni per calcolo extracorsa
This commit is contained in:
@@ -318,14 +318,25 @@ local function TestEngagement( sBladeEngagement, Parameters, OptionalParameters)
|
||||
dDepthToMachine = dDepthToMachine
|
||||
}
|
||||
|
||||
local CheckCollisionOptionalParameters = BeamLib.TableCopyDeep( OptionalParameters or {})
|
||||
|
||||
local CheckOutOfStrokeParameters = {
|
||||
Edge = Edge,
|
||||
vtNFace = Face.vtN,
|
||||
vtHead = vtHead,
|
||||
Tool = Tool
|
||||
}
|
||||
|
||||
local CheckOutOfStrokeOptionalParameters = {}
|
||||
|
||||
-- check punti lavorazione
|
||||
-- lavorazione oltre le corse: non fattibile
|
||||
local bOutOfStroke = PreSimulationLib.CheckOutOfStroke()
|
||||
local bOutOfStroke = PreSimulationLib.CheckOutOfStroke( CheckOutOfStrokeParameters)
|
||||
if bOutOfStroke then
|
||||
return false
|
||||
end
|
||||
-- lavorazione in collisione con il pezzo: non fattibile
|
||||
local bCollisionFound, bMoveAfterSplit = PreSimulationLib.CheckCollision( sBladeEngagement, CheckCollisionParameters, OptionalParameters)
|
||||
local bCollisionFound, bMoveAfterSplit = PreSimulationLib.CheckCollision( sBladeEngagement, CheckCollisionParameters, CheckCollisionOptionalParameters)
|
||||
if bCollisionFound then
|
||||
return false
|
||||
end
|
||||
@@ -335,7 +346,9 @@ local function TestEngagement( sBladeEngagement, Parameters, OptionalParameters)
|
||||
|
||||
-- attacco perpendicolare
|
||||
local PerpendicularLeadInOut = LeadInOutLib.CalculateLeadInOut( 'Perpendicular', Parameters)
|
||||
local bOutOfStrokePerpendicular = PreSimulationLib.CheckOutOfStroke() -- TODO passare punti custom attacco perpendicolare
|
||||
-- check finecorsa nei punti di attacco
|
||||
CheckOutOfStrokeOptionalParameters.PointsToCheck = { PerpendicularLeadInOut.LeadIn.ptPoint, PerpendicularLeadInOut.LeadOut.ptPoint}
|
||||
local bOutOfStrokePerpendicular = PreSimulationLib.CheckOutOfStroke( CheckOutOfStrokeParameters, CheckOutOfStrokeOptionalParameters)
|
||||
-- se non è in finecorsa si aggiunge come attacco possibile
|
||||
if not bOutOfStrokePerpendicular then
|
||||
LeadInOut.Perpendicular = PerpendicularLeadInOut
|
||||
@@ -353,10 +366,12 @@ local function TestEngagement( sBladeEngagement, Parameters, OptionalParameters)
|
||||
|
||||
-- attacco tangenziale
|
||||
local TangentLeadInOut = LeadInOutLib.CalculateLeadInOut( 'Tangent', Parameters)
|
||||
local bOutOfStrokeTangent = PreSimulationLib.CheckOutOfStroke() -- TODO passare punti custom attacco tangenziale
|
||||
-- check finecorsa nei punti di attacco
|
||||
CheckOutOfStrokeOptionalParameters.PointsToCheck = { TangentLeadInOut.LeadIn.ptPoint, TangentLeadInOut.LeadOut.ptPoint}
|
||||
local bOutOfStrokeTangent = PreSimulationLib.CheckOutOfStroke( CheckOutOfStrokeParameters, CheckOutOfStrokeOptionalParameters)
|
||||
-- attacco tangenziale non in finecorsa: si verifica se è in collisione
|
||||
if not bOutOfStrokeTangent then
|
||||
local bCollisionFoundTangent, bMoveAfterSplitTangent = PreSimulationLib.CheckCollision( sBladeEngagement, CheckCollisionParameters, OptionalParameters) -- TODO passare punti custom attacco tangenziale
|
||||
local bCollisionFoundTangent, bMoveAfterSplitTangent = PreSimulationLib.CheckCollision( sBladeEngagement, CheckCollisionParameters, CheckCollisionOptionalParameters) -- TODO passare punti custom attacco tangenziale
|
||||
-- attacco tangenziale possibile
|
||||
if not bCollisionFoundTangent then
|
||||
LeadInOut.Tangent = TangentLeadInOut
|
||||
|
||||
Reference in New Issue
Block a user