Piccole modifiche dopo test

This commit is contained in:
andrea.villa
2025-07-18 16:59:38 +02:00
parent 967df73f43
commit acf53145b4
+8 -6
View File
@@ -40,6 +40,8 @@ local function GetDrillingWithMillStrategy( Proc, Part)
ToolSearchParameters.sType = 'MILL_STD'
ToolSearchParameters.sMillShape = 'STANDARD'
Milling2.vtToolDirection = -Proc.FeatureInfo.vtDrillExtrusion
Milling2.bInvert = true
Milling2.bToolInvert = true
Milling2.ToolInfo = MachiningLib.FindMill( Proc, ToolSearchParameters)
end
@@ -83,12 +85,12 @@ local function GetDrillingWithMillStrategy( Proc, Part)
-- aggiunta lavorazioni a lista
-- se foro doppio
if bDouble then
dResidual = Milling.ToolInfo.dResidualDepth + Milling2.ToolInfo.dResidualDepth
dResidual = Milling.ToolInfo.dResidualDepth + Milling2.ToolInfo.dResidualDepth - Proc.FeatureInfo.dDrillLen
Strategy.Result.dMRR = ( MachiningLib.GetToolMRR( Milling.ToolInfo) + MachiningLib.GetToolMRR( Milling2.ToolInfo)) / 2
local dExtraDrill = ( Proc.FeatureInfo.dDrillLen - BeamData.MILL_OVERLAP - ( Milling.ToolInfo.dResidualDepth + Milling2.ToolInfo.dResidualDepth)) / 2
Milling.sDepth = Proc.FeatureInfo.dDrillLen - Drilling.ToolInfo.dResidualDepth - dExtraDrill
Milling.sDepth = Proc.FeatureInfo.dDrillLen - Milling.ToolInfo.dResidualDepth - dExtraDrill
table.insert( Machining, Milling)
Milling2.sDepth = Proc.FeatureInfo.dDrillLen - Drilling.ToolInfo.dResidualDepth - dExtraDrill
Milling2.sDepth = Proc.FeatureInfo.dDrillLen - Milling2.ToolInfo.dResidualDepth - dExtraDrill
table.insert( Machining, Milling2)
-- altrimenti singolo
else
@@ -161,8 +163,8 @@ function STR0013.Make( bAddMachining, Proc, Part, CustomParameters)
for j = 1, #Strategy.Machinings do
local MachiningToAdd
local nIndexTool = Strategy.Machinings[j].ToolInfo.nToolIndex
-- se fresa più grande del diametro foro si fa foratura con fresa (se ammesso)
if TOOLS[nIndexTool].dDiameter >= Proc.FeatureInfo.dDrillDiam and Strategy.Parameters.bUseMillAsDrill then
-- se diametro fresa differisce al massimo della tolleranza si fa foratura con fresa (se ammesso)
if abs( TOOLS[nIndexTool].dDiameter - Proc.FeatureInfo.dDrillDiam) < Strategy.Parameters.dDiameterTolerance and Strategy.Parameters.bUseMillAsDrill then
MachiningToAdd = MachiningLib.InitMachiningParameters( MCH_MY.DRILLING)
MachiningToAdd = BeamLib.MergeTables( MachiningToAdd, Strategy.Machinings[j])
MachiningToAdd.Steps.dStep = TOOLS[nIndexTool].dStep / 3
@@ -172,7 +174,7 @@ function STR0013.Make( bAddMachining, Proc, Part, CustomParameters)
MachiningToAdd = BeamLib.MergeTables( MachiningToAdd, Strategy.Machinings[j])
-- il diametro deve essere almeno 1mm più grande del foro, altrimenti la macchina non riesce ad interpolare
MachiningToAdd.dRadialOffset = min( 0, Proc.FeatureInfo.dDrillDiam - ( TOOLS[nIndexTool].dDiameter + 1))
MachiningToAdd.nSubType = MCH_MILL_ST.SPIRAL
MachiningToAdd.Steps.nStepType = MCH_MILL_ST.SPIRAL
MachiningToAdd.Steps.dStep = TOOLS[nIndexTool].dStep
-- se diametro foro più grande del doppio del diametro fresa, si fa svuotatura
else