DataBeam :

- nei tagli di lama aggiunta gestione massima profondità di taglio verticale diversa da orizzontale con BD.DECR_VERT_CUT per PF.
This commit is contained in:
Dario Sassi
2020-11-14 08:27:25 +00:00
parent 15649573c4
commit 0c0ebfa762
+6 -5
View File
@@ -1,4 +1,4 @@
-- ProcessCut.lua by Egaltech s.r.l. 2020/11/07
-- ProcessCut.lua by Egaltech s.r.l. 2020/11/13
-- Gestione calcolo singoli tagli di lama per Travi
-- Tabella per definizione modulo
@@ -232,13 +232,14 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
end
end
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
-- determino la direzione di taglio preferenziale
local _, dCutH, dCutV = BL.GetFaceHvRefDim( Proc.Id, 0)
local bHorizCut = (( dCutV < dMaxDepth - BD.CUT_EXTRA and dCutH > dMaxDepth - BD.CUT_EXTRA) and not bDownCut)
local bHorizCut = (( dCutV < dMaxVertDepth - BD.CUT_EXTRA and dCutH > dMaxDepth - BD.CUT_EXTRA) and not bDownCut)
-- verifico se necessari tagli supplementari
EgtOutLog( string.format( 'MaxDepth=%.1f CutH=%.1f CutV=%.1f', dMaxDepth, dCutH, dCutV), 3)
EgtOutLog( string.format( 'MaxDepth=%.1f MaxVertDepth=%.1f CutH=%.1f CutV=%.1f', dMaxDepth, dMaxVertDepth, dCutH, dCutV), 3)
local vCuts = {}
if dCutH > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or dCutV > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC then
if dCutH > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or dCutV > dMaxVertDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC then
vCuts = DC.GetDice( EgtGetParent( Proc.Id), b3Solid, ptC, vtN, true, nil, nil, dMaxDepth - BD.CUT_EXTRA)
end
--DC.PrintOrderCut( vCuts)
@@ -358,7 +359,7 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
if abs( vtN:getX()) < 0.5 then dNzLimDwnUp = -0.707 end
-- lavoro la faccia
local vtOrthoO
if bFromBottom and dCutV < dMaxDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then
if bFromBottom and dCutV < dMaxVertDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then
vtOrthoO = -Z_AX()
elseif bHorizCut then
vtOrthoO = Z_AX()