- in MachiningLib.GetSplitMachinings aggiunta lettura di LeadInForSplit e LeadOutForSplit dal Machining, per customizzare approcci e retrazioni in caso di split

This commit is contained in:
luca.mazzoleni
2025-04-08 18:50:21 +02:00
parent 36f1ae5513
commit bec6ef3ea3
+14
View File
@@ -120,6 +120,8 @@ function MachiningLib.GetSplitMachinings( Machinings, SplittingPoints, Part )
local dOriginalStartAddLength = Machinings[i].LeadIn.dStartAddLength
local dOriginalEndAddLength = Machinings[i].LeadOut.dEndAddLength
local sOriginalStage = Machinings[i].sStage
local LeadInForSplit = Machinings[i].LeadInForSplit
local LeadOutForSplit = Machinings[i].LeadOutForSplit
if FeatureLib.IsMachiningLong( Machinings[i].dLengthOnX, Part) then
local nCurrentMachiningIndex = i
-- lo spezzone attivo è quello precedente al punto di spezzatura corrente
@@ -142,13 +144,25 @@ function MachiningLib.GetSplitMachinings( Machinings, SplittingPoints, Part )
end
if j == 1 then
dEndAddLength = - ( SplittingPoints[j]:getX() - dEdgeMinX) + BeamData.MILL_OVERLAP
if LeadOutForSplit then
Machinings[nCurrentMachiningIndex].LeadOut = LeadOutForSplit
end
Machinings[nCurrentMachiningIndex].ptCenter = Point3d( SplittingPoints[j]:getX() + ( dEdgeMaxX - SplittingPoints[j]:getX()) / 2, 0, 0)
elseif j == nParts then
dStartAddLength = - ( dEdgeMaxX - SplittingPoints[j - 1]:getX()) + BeamData.MILL_OVERLAP
if LeadInForSplit then
Machinings[nCurrentMachiningIndex].LeadIn = LeadInForSplit
end
Machinings[nCurrentMachiningIndex].ptCenter = Point3d( dEdgeMinX + ( SplittingPoints[j - 1]:getX() - dEdgeMinX) / 2, 0, 0)
else
dStartAddLength = - ( dEdgeMaxX - SplittingPoints[j - 1]:getX()) + BeamData.MILL_OVERLAP
dEndAddLength = - ( SplittingPoints[j]:getX() - dEdgeMinX) + BeamData.MILL_OVERLAP
if LeadInForSplit then
Machinings[nCurrentMachiningIndex].LeadIn = LeadInForSplit
end
if LeadOutForSplit then
Machinings[nCurrentMachiningIndex].LeadOut = LeadOutForSplit
end
Machinings[nCurrentMachiningIndex].ptCenter = Point3d( SplittingPoints[j]:getX() + ( SplittingPoints[j - 1]:getX() - SplittingPoints[j]:getX()) / 2, 0, 0)
end
if MachiningLib.StartsLeftSide( Machinings[nCurrentMachiningIndex]) then