- PreSimulationLib.CheckOutOfStroke rinominata CheckOutOfStrokeFromPoints
- check finecorsa aggiunto a STR0006 (tenone)
This commit is contained in:
@@ -328,7 +328,7 @@ local function TestEngagement( sBladeEngagement, Parameters, OptionalParameters)
|
||||
PreSimulationLib.GetPointOnToolTipCenter( Edge.ptStart + Edge.vtN * ( Edge.dElevation - dDepthToMachine), vtHead, Face.vtN, Edge.vtN, Tool),
|
||||
PreSimulationLib.GetPointOnToolTipCenter( Edge.ptEnd + Edge.vtN * ( Edge.dElevation - dDepthToMachine), vtHead, Face.vtN, Edge.vtN, Tool)
|
||||
}
|
||||
local bOutOfStroke = PreSimulationLib.CheckOutOfStroke( PointsOnToolTipCenter, vtHead, nSCC, Tool)
|
||||
local bOutOfStroke = PreSimulationLib.CheckOutOfStrokeFromPoints( PointsOnToolTipCenter, vtHead, nSCC, Tool)
|
||||
if bOutOfStroke then
|
||||
return false
|
||||
end
|
||||
@@ -349,7 +349,7 @@ local function TestEngagement( sBladeEngagement, Parameters, OptionalParameters)
|
||||
PreSimulationLib.GetPointOnToolTipCenter( PerpendicularLeadInOut.LeadIn.ptPoint, vtHead, Face.vtN, Edge.vtN, Tool),
|
||||
PreSimulationLib.GetPointOnToolTipCenter( PerpendicularLeadInOut.LeadOut.ptPoint, vtHead, Face.vtN, Edge.vtN, Tool)
|
||||
}
|
||||
local bOutOfStrokePerpendicular = PreSimulationLib.CheckOutOfStroke( PointsOnToolTipCenter, vtHead, nSCC, Tool)
|
||||
local bOutOfStrokePerpendicular = PreSimulationLib.CheckOutOfStrokeFromPoints( PointsOnToolTipCenter, vtHead, nSCC, Tool)
|
||||
-- se non è in extracorsa si aggiunge come attacco possibile
|
||||
if not bOutOfStrokePerpendicular then
|
||||
LeadInOut.Perpendicular = PerpendicularLeadInOut
|
||||
@@ -372,7 +372,7 @@ local function TestEngagement( sBladeEngagement, Parameters, OptionalParameters)
|
||||
PreSimulationLib.GetPointOnToolTipCenter( TangentLeadInOut.LeadIn.ptPoint, vtHead, Face.vtN, Edge.vtN, Tool),
|
||||
PreSimulationLib.GetPointOnToolTipCenter( TangentLeadInOut.LeadOut.ptPoint, vtHead, Face.vtN, Edge.vtN, Tool)
|
||||
}
|
||||
local bOutOfStrokeTangent = PreSimulationLib.CheckOutOfStroke( PointsOnToolTipCenter, vtHead, nSCC, Tool)
|
||||
local bOutOfStrokeTangent = PreSimulationLib.CheckOutOfStrokeFromPoints( PointsOnToolTipCenter, vtHead, nSCC, Tool)
|
||||
-- attacco tangenziale non in extracorsa: si verifica se è in collisione
|
||||
if not bOutOfStrokeTangent then
|
||||
local bCollisionFoundTangent, bMoveAfterSplitTangent = PreSimulationLib.CheckCollision( sBladeEngagement, CheckCollisionParameters, CheckCollisionOptionalParameters) -- TODO passare punti custom attacco tangenziale
|
||||
|
||||
@@ -216,8 +216,8 @@ local function CheckOutOfStrokePoint( ptOnToolTipCenter, vtHead, nSCC, Tool)
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- check extracorsa
|
||||
function PreSimulationLib.CheckOutOfStroke( PointsOnToolTipCenter, vtHead, nSCC, Tool)
|
||||
-- check extracorsa da punti sul tip dell'utensile
|
||||
function PreSimulationLib.CheckOutOfStrokeFromPoints( PointsOnToolTipCenter, vtHead, nSCC, Tool)
|
||||
|
||||
-- check collisione sui punti in centro lama su naso mandrino o aggregato. In base a direzione e punto
|
||||
for i = 1, #PointsOnToolTipCenter do
|
||||
@@ -236,6 +236,7 @@ end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- check extracorsa da geometria
|
||||
-- TODO da considerare anche gli attacchi
|
||||
function PreSimulationLib.CheckOutOfStrokeFromGeometry( idGeometry, Proc, nSCC, Tool)
|
||||
|
||||
local b3GeomMaxOffset = EgtGetBBoxGlob( idGeometry, GDB_BB.STANDARD)
|
||||
@@ -259,7 +260,7 @@ function PreSimulationLib.CheckOutOfStrokeFromGeometry( idGeometry, Proc, nSCC,
|
||||
-- Z-
|
||||
table.insert( PointsOnToolTipCenter, Point3d( ptBoxCenter - dBoxDimZ / 2 * Z_AX()))
|
||||
|
||||
local bOutOfStroke = PreSimulationLib.CheckOutOfStroke( PointsOnToolTipCenter, Proc.FeatureInfo.vtTenonN, nSCC, Tool)
|
||||
local bOutOfStroke = PreSimulationLib.CheckOutOfStrokeFromPoints( PointsOnToolTipCenter, Proc.FeatureInfo.vtTenonN, nSCC, Tool)
|
||||
|
||||
return bOutOfStroke
|
||||
end
|
||||
|
||||
@@ -186,7 +186,6 @@ local function GetTenonStrategy( Proc, Part)
|
||||
end
|
||||
|
||||
-- test finecorsa sulla passata più esterna: se extracorsa, la lavorazione non è fattibile
|
||||
-- TODO da considerare anche gli attacchi
|
||||
-- TODO sostituire con applicazione della lavorazione?
|
||||
local idGeomMaxOffset = EgtCopyGlob( Proc.FeatureInfo.idAddAuxGeom, Part.idTempGroup)
|
||||
EgtOffsetCurve( idGeomMaxOffset, Machining.Milling.AuxiliaryData.Clones[1].dRadialOffset + TOOLS[Machining.Milling.ToolInfo.nToolIndex].dDiameter / 2, Part.idTempGroup)
|
||||
|
||||
@@ -8,6 +8,7 @@ local BeamLib = require( 'BeamLib')
|
||||
local BeamData = require( 'BeamDataNew')
|
||||
local MachiningLib = require( 'MachiningLib')
|
||||
local FeatureLib = require( 'FeatureLib')
|
||||
local PreSimulationLib = require( 'PreSimulationLib')
|
||||
-- strategie di base
|
||||
local BladeToWaste = require( 'BLADETOWASTE')
|
||||
|
||||
@@ -159,6 +160,16 @@ local function GetTenonStrategy( Proc, Part)
|
||||
Machining.Milling.AuxiliaryData.Clones[nIndexClones].dRadialOffset = ( i - 1) * dRealSideStep
|
||||
end
|
||||
end
|
||||
|
||||
-- test finecorsa sulla passata più esterna: se extracorsa, la lavorazione non è fattibile
|
||||
-- TODO sostituire con applicazione della lavorazione?
|
||||
local idGeomMaxOffset = EgtCopyGlob( Proc.FeatureInfo.idAddAuxGeom, Part.idTempGroup)
|
||||
EgtOffsetCurve( idGeomMaxOffset, Machining.Milling.AuxiliaryData.Clones[1].dRadialOffset + TOOLS[Machining.Milling.ToolInfo.nToolIndex].dDiameter / 2, Part.idTempGroup)
|
||||
local bOutOfStroke = PreSimulationLib.CheckOutOfStrokeFromGeometry( idGeomMaxOffset, Proc, Machining.Milling.nSCC, TOOLS[Machining.Milling.ToolInfo.nToolIndex])
|
||||
if bOutOfStroke then
|
||||
Machining.Milling.bIsApplicable = false
|
||||
end
|
||||
|
||||
-- tempo di svuotatura
|
||||
Result.Milling.dTimeToMachine = MachiningLib.GetTimeToMachineAllStepsWithLeadInOut( Machining.Milling, Part)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user