modifiche ulteriori al calcolo dell'affondamento

This commit is contained in:
luca.mazzoleni
2022-07-04 18:03:40 +02:00
parent 007453337a
commit 57dba9b76c
+7 -5
View File
@@ -394,7 +394,8 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- aggiusto l'affondamento
local sMyWarn
local dMaxElev = dLen
local dMaxElev = dDepth
local dToolAddLength = 0
-- se c'è un taglio precedente di testa o coda posso impostare MaxElev per allungare il percorso
-- considero solo i fori "entranti" in testa o coda
if ( Proc.MachineAfterHeadCutId and vtExtr:getX() > 0) or ( Proc.MachineAfterTailCutId and vtExtr:getX() < 0) then
@@ -408,14 +409,15 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
elseif dHoleToCutDistance < 0 then
dMaxElev = -dHoleToCutDistance
end
dToolAddLength = dLen - dMaxElev
end
end
local dToolAddLength = dLen - dMaxElev
if dDepth - dToolAddLength > dMaxDepth + 10 * GEO.EPS_SMALL then
sMyWarn = 'Warning in drill : depth (' .. EgtNumToString( dDepth - dToolAddLength, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
if dMaxDepth == 0 then
dDepth = 0
else
if dMaxDepth == 0 or dToolAddLength == 0 then
dDepth = dMaxDepth
dMaxElev = dDepth
elseif abs( dMaxElev - dDepth) > GEO.EPS_SMALL then
dDepth = dLen
end
EgtOutLog( sMyWarn)