ProcessLongDoubleCut, migliorata casistica pezzo da lavorare con testa 2

This commit is contained in:
daniele.nicoli
2026-03-02 16:38:08 +01:00
parent 261ce7992d
commit 1729e57dbf
+29 -25
View File
@@ -1151,7 +1151,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
end
-- recupero la lavorazione
local sMilling
local bDownHead = ( nSide == -1 and BD.DOWN_HEAD)
local bDownHead = ( BD.DOWN_HEAD and ( nSide == -1 or AreSameVectorApprox( vtN[vOrd[1]], -Z_AX())))
sMilling = ML.FindMilling( 'Long2Cut', dElev, nil, nil, nil, not bDownHead, bDownHead)
if not sMilling then
@@ -1277,31 +1277,35 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
local dLimitAngle = -0.5 - 20 * GEO.EPS_SMALL
-- se facce ortogonali (concave), mantengo la lavorazione di testa sulla faccia più grande purchè non superi di 30 gradi il sottosquadra
if bOrtho then
local vtN1 = vtN[vOrd[1]]
local vtN2 = vtN[vOrd[2]]
if vtN1:getZ() > 0.001 and vtN2:getZ() > 0.001 then
if vtN1:getZ() >= vtN2:getZ() then
nFin = 1
else
nIni = 2
end
if bDownHead and AreSameVectorApprox( vtN[vOrd[1]], -Z_AX()) then
nFin = 1
else
if vtN1:getZ() < dLimitAngle then
nIni = 2
elseif vtN2:getZ() < dLimitAngle then
nFin = 1
else
local vtN1 = vtN[vOrd[1]]
local vtN2 = vtN[vOrd[2]]
if vtN1:getZ() > 0.001 and vtN2:getZ() > 0.001 then
if vtN1:getZ() >= vtN2:getZ() then
if vtN1:getZ() < dLimitAngle then
nIni = 2
else
nFin = 1
end
nFin = 1
else
if vtN1:getZ() < dLimitAngle then
nIni = 2
nIni = 2
end
else
if vtN1:getZ() < dLimitAngle then
nIni = 2
elseif vtN2:getZ() < dLimitAngle then
nFin = 1
else
if vtN1:getZ() >= vtN2:getZ() then
if vtN1:getZ() < dLimitAngle then
nIni = 2
else
nFin = 1
end
else
nFin = 1
if vtN1:getZ() < dLimitAngle then
nIni = 2
else
nFin = 1
end
end
end
end
@@ -1325,7 +1329,7 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
-- valore sovrapposizione tra passate con fresa di fianco
local dOverLapExtend = 2
-- Verifico se da fare di fianco perchè normale troppo verso il basso (minore di -30deg)
local bSide = ( vtN[vOrd[i]]:getZ() < dLimitAngle and not ( nSide == -1 and ( BD.DOWN_HEAD or BD.TURN)))
local bSide = ( vtN[vOrd[i]]:getZ() < dLimitAngle and not ( bDownHead or ( nSide == -1 and ( BD.DOWN_HEAD or BD.TURN))))
-- Limitazioni della lavorazione
local nPos = EgtIf( i == 1, j, nC - j + 1)
local dSal = EgtIf( nPos == 1, - EgtIf( i == nIni, dStartDist, dEndDist), - EgtIf( i == nIni, dStartAccDist, dEndAccDist) - ( nPos - 2) * dC + EgtIf( bSide, dOverLapExtend, 0))
@@ -1503,8 +1507,8 @@ function ProcessLong2Cut.Make( Proc, nPhase, nRawId, nPartId, bForcedBladeMaster
sMilling = ML.FindMilling( sMchType)
sPrefix = 'L2CS_'
nExtendMach = nUseMillOnSide
if nUseMillOnSide == 2 then
bRemoveToolRadius = true
if nUseMillOnSide == 2 then
bRemoveToolRadius = true
end
-- se testa da sotto
if nSide ~= 1 and BD.DOWN_HEAD then