- in MachiningLib.GetTimeToMachineAllStepsWithLeadInOut migliorato calcolo per svuotature (ancora da milgiorare)

- in STR0002 correzioni
- in FACEBYBLADE piccola correzione nel calcolo LeadIn/Out
This commit is contained in:
luca.mazzoleni
2025-05-08 19:01:15 +02:00
parent 3b785a0907
commit e584c90c71
5 changed files with 24 additions and 16 deletions
+6 -4
View File
@@ -190,7 +190,7 @@ function MachiningLib.GetSplitMachinings( Machinings, SplittingPoints, Part)
end
Machinings[nCurrentMachiningIndex].nFeatureSegment = j
Machinings[nCurrentMachiningIndex].dLengthToMachine = Machinings[nCurrentMachiningIndex].dEdgeLength + Machinings[nCurrentMachiningIndex].LeadIn.dStartAddLength + Machinings[nCurrentMachiningIndex].LeadOut.dEndAddLength
Machinings[nCurrentMachiningIndex].dTimeToMachine = MachiningLib.GetTimeToMachineAllStepsWithLeadInOut( Machinings[nCurrentMachiningIndex])
Machinings[nCurrentMachiningIndex].dTimeToMachine = MachiningLib.GetTimeToMachineAllStepsWithLeadInOut( Machinings[nCurrentMachiningIndex], Part)
end
-- anche le lavorazioni non splittate necessitano del segmento assegnato
else
@@ -220,7 +220,7 @@ function MachiningLib.GetSplitMachinings( Machinings, SplittingPoints, Part)
end
end
Machinings[i].dLengthToMachine = Machinings[i].dEdgeLength + Machinings[i].LeadIn.dStartAddLength + Machinings[i].LeadOut.dEndAddLength
Machinings[i].dTimeToMachine = MachiningLib.GetTimeToMachineAllStepsWithLeadInOut( Machinings[i])
Machinings[i].dTimeToMachine = MachiningLib.GetTimeToMachineAllStepsWithLeadInOut( Machinings[i], Part)
end
end
@@ -947,7 +947,7 @@ function MachiningLib.GetToolMRR( Parameters)
end
-------------------------------------------------------------------------------------------------------------
function MachiningLib.GetTimeToMachineAllStepsWithLeadInOut( Machining)
function MachiningLib.GetTimeToMachineAllStepsWithLeadInOut( Machining, Part)
local dLengthToMachineAllStepsWithLeadInOut = 0
local dTimeToMachineTotal = 0
local dToolStartFeed = TOOLS[Machining.nToolIndex].Feeds.dStartFeed
@@ -997,7 +997,9 @@ function MachiningLib.GetTimeToMachineAllStepsWithLeadInOut( Machining)
dTimeToMachineTotal = Machining.CloneStepsLongitudinal.nCount * ( ( 2 * Machining.Steps.nCount - 1) * dTimeToMachineEdge + 2 * 10 / dToolFeed * ( Machining.Steps.nCount - 1) + dTimeToMachineLeadIn + dTimeToMachineLeadOut)
end
elseif Machining.nType == MCH_MY.POCKETING then
local dDepthToMachine = min( Machining.dElevation, ( Machining.dMaxElev or Machining.dElevation)) - ( max( 0, Machining.ToolInfo.dResidualDepth or 0))
-- TODO le chiamate alla pocketing vanno unificate e uniformate
local dFaceElevation = EgtSurfTmFacetElevationInBBox( Machining.Geometry[1][1], Machining.Geometry[1][2], Part.b3Part, true, GDB_ID.ROOT)
local dDepthToMachine = min( dFaceElevation, ( Machining.dMaxElev or dFaceElevation)) - ( max( 0, Machining.dResidualDepth or 0))
local nSteps = ceil( ( dDepthToMachine - 50 * GEO.EPS_SMALL) / TOOLS[Machining.nToolIndex].dStep)
local _, dLongEdgeDimension, dShortEdgeDimension = EgtSurfTmFacetMinAreaRectangle( Machining.Geometry[1][1], Machining.Geometry[1][2], GDB_ID.ROOT)
-- TODO bisogna calcolare correttamente per lati aperti e chiusi (aperti: aggiungi D/2 - Sidestep, chiusi: sottrai - D/2)