- in BatchProcessNew e BeamExec, dove si salva il Box del Part si salva anche idBoxTm, id della trimesh del box
- in BeamLib rimosse funzioni GetPlaneOrientation e IsEdgeOnBox, non usate - in MachiningLib rivista completamente GetBladeEngagement e aggiunta Check2DBladeCollision
This commit is contained in:
@@ -276,15 +276,12 @@ function FACEBYBLADE.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPar
|
||||
-- ricerca utensile
|
||||
if nToolIndex then
|
||||
Cutting.nToolIndex = nToolIndex
|
||||
local dDownUpElevation = dDepthToMachine
|
||||
|
||||
-- si determina se il taglio è fattibile e il modo di lavorare della lama
|
||||
Cutting.bIsApplicable, Cutting.sBladeEngagement, dDownUpElevation = MachiningLib.GetBladeEngagement( FaceToMachine, EdgeToMachine, Part.b3Raw, TOOLS[nToolIndex], dDepthToMachine, bAvoidCollisionCheckForStandardCut)
|
||||
Cutting.bIsApplicable, Cutting.sBladeEngagement = MachiningLib.GetBladeEngagement( FaceToMachine, EdgeToMachine, Part, TOOLS[nToolIndex], dDepthToMachine, bAvoidCollisionCheckForStandardCut)
|
||||
|
||||
-- orientamento non raggiungibile o elevazione eccessiva per DownUp: non applicabile
|
||||
if not Cutting.bIsApplicable
|
||||
or ( Cutting.sBladeEngagement == 'DownUp'
|
||||
and ( dDownUpElevation - ( EdgeToMachine.dElevation - dDepthToMachine)) > TOOLS[nToolIndex].dMaxMaterial - 10 * GEO.EPS_SMALL) then
|
||||
if not Cutting.bIsApplicable then
|
||||
|
||||
Cutting.sMessage = 'Orientation not reachable'
|
||||
EgtOutLog( Cutting.sMessage)
|
||||
@@ -300,7 +297,7 @@ function FACEBYBLADE.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPar
|
||||
ToolSearchParameters.bForceLongcutBlade = bForceLongcutBlade
|
||||
ToolSearchParameters.FaceToMachine = FaceToMachine
|
||||
ToolSearchParameters.EdgeToMachine = EdgeToMachine
|
||||
ToolSearchParameters.b3Part = Part.b3Part
|
||||
ToolSearchParameters.Part = Part
|
||||
|
||||
local ToolInfo = MachiningLib.FindBlade( Proc, ToolSearchParameters)
|
||||
Cutting.nToolIndex = ToolInfo.nToolIndex
|
||||
@@ -360,19 +357,15 @@ function FACEBYBLADE.Make( Proc, Part, FaceToMachine, EdgeToMachine, OptionalPar
|
||||
|
||||
-- si attiva OppositeToolDirection solo se il taglio è fattibile anche in direzione opposta
|
||||
local EdgeToMachineOpposite = BeamLib.FindEdgeBestOrientedAsDirection( FaceToMachine.Edges, -Cutting.vtToolDirection)
|
||||
local bIsApplicableOpposite, sBladeEngagementOpposite, dDownUpElevationOpposite = MachiningLib.GetBladeEngagement( FaceToMachine, EdgeToMachineOpposite, Part.b3Raw, TOOLS[nToolIndex], dDepthToMachine, bAvoidCollisionCheckForStandardCut)
|
||||
local bIsApplicableOpposite, sBladeEngagementOpposite = MachiningLib.GetBladeEngagement( FaceToMachine, EdgeToMachineOpposite, Part, TOOLS[nToolIndex], dDepthToMachine, bAvoidCollisionCheckForStandardCut)
|
||||
|
||||
if bIsApplicableOpposite and ( sBladeEngagementOpposite == Cutting.sBladeEngagement) then
|
||||
|
||||
if sBladeEngagementOpposite ~= 'DownUp'
|
||||
or ( ( dDownUpElevationOpposite - ( EdgeToMachine.dElevation - dDepthToMachine)) > TOOLS[nToolIndex].dMaxMaterial - 10 * GEO.EPS_SMALL) then
|
||||
|
||||
OppositeToolDirectionMode = 'Enabled'
|
||||
Cutting.sBladeEngagement = sBladeEngagementOpposite
|
||||
Cutting.vtToolDirection = -EdgeToMachine.vtN
|
||||
Cutting.ptEdge1, _, Cutting.ptEdge2 = EgtSurfTmFacetOppositeSide( Proc.id, FaceToMachine.id, -Cutting.vtToolDirection, GDB_ID.ROOT)
|
||||
Cutting.bInvert = not Cutting.bInvert
|
||||
end
|
||||
|
||||
-- se non possibile taglio opposto, si setta per tagliare verso l'alto
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user