DataBeam :
- in travi con scarico a caduta migliorata gestione di taglio parziale obliquo - in travi con scarico a caduta aggiunta gestione in anticipo di profili qunado fatti con solo smusso.
This commit is contained in:
+13
-11
@@ -1,4 +1,4 @@
|
||||
-- ProcessCut.lua by Egaltech s.r.l. 2022/01/26
|
||||
-- ProcessCut.lua by Egaltech s.r.l. 2022/02/02
|
||||
-- Gestione calcolo singoli tagli di lama per Travi
|
||||
-- 2021/05/18 I due tagli con testa da sotto di un cubetto sono fatti di seguito.
|
||||
-- 2021/06/06 Correzioni per tagli con testa da sotto.
|
||||
@@ -6,6 +6,7 @@
|
||||
-- 2021/09/19 Tagli da sotto non sbiechi favorita posizione da sopra di testa.
|
||||
-- 2021/10/06 Piccola correzione a tagli di cubetti con testa da sotto.
|
||||
-- 2022/01/26 Taglio da sotto orizzontale deve avere direzione di riferimento ortogonale -Z.
|
||||
-- 2022/02/02 Modifiche per tagli di coda spostati avanti come lavorazione su pezzi a caduta.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessCut = {}
|
||||
@@ -237,7 +238,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
||||
if not BD.C_SIMM and abs( vtN:getX()) < 0.5 then dNzLimDwnUp = -0.707 end
|
||||
local bDownCut = ( vtN:getZ() <= dNzLimDwnUp)
|
||||
if bFromBottom == nil then
|
||||
bFromBottom = ( vtN:getZ() > 0.25 and ( b3Solid:getDimX() < BD.LEN_SHORT_PART and vtN:getX() < 0))
|
||||
bFromBottom = ( vtN:getZ() > 0.25 and b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail and vtN:getX() < 0)
|
||||
end
|
||||
-- verifico se da considerare taglio lungo ( non da sotto, inclinato non più di 30deg, largo come la trave e abbastanza lungo)
|
||||
local bLongCut = ( not bDownCut and vtN:getZ() > 0.865 and
|
||||
@@ -317,7 +318,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
||||
-- verifico se necessari tagli supplementari
|
||||
EgtOutLog( string.format( 'MaxDepth=%.1f MaxVertDepth=%.1f CutH=%.1f CutV=%.1f', dMaxDepth, dMaxVertDepth, dCutH, dCutV), 3)
|
||||
local vCuts = {}
|
||||
if not Proc.AdvTail and dCutH > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or dCutV > dMaxVertDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC then
|
||||
if not Proc.AdvTail and ( dCutH > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or dCutV > dMaxVertDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC) then
|
||||
local ptExtra, vtExtra
|
||||
local bAutoCalcSurf = true
|
||||
if bFillAreaPiece or bFillTail then
|
||||
@@ -455,9 +456,10 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
||||
local vtOrthoO
|
||||
if bFromBottom and dCutV < dMaxVertDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then
|
||||
vtOrthoO = -Z_AX()
|
||||
elseif bHorizCut and ( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or vtN:getX() > 0) then
|
||||
elseif bHorizCut and ( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or vtN:getX() > 0) then
|
||||
vtOrthoO = Z_AX()
|
||||
elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and abs( vtN:getY()) > 0.259 and vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail and abs( vtN:getY()) > 0.259 and
|
||||
vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
if Proc.Head then
|
||||
vtOrthoO = X_AX()
|
||||
else
|
||||
@@ -479,7 +481,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
|
||||
local dCutExtra = BD.CUT_EXTRA
|
||||
if Proc.AdvTail then
|
||||
dVzLimDwnUp = 0
|
||||
dCutExtra = -10
|
||||
dCutExtra = -BD.ADVANCE_TAIL_OFFS
|
||||
end
|
||||
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
||||
if not bOk then
|
||||
@@ -526,11 +528,11 @@ local function MakeFromDown( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
local dMaxVertDepth = dMaxDepth
|
||||
-- determino la direzione di taglio preferenziale
|
||||
local _, dCutH, dCutV = BL.GetFaceHvRefDim( Proc.Id, 0)
|
||||
local bHorizCut = ( dCutV < dMaxVertDepth - BD.CUT_EXTRA)
|
||||
local bHorizCut = ( dCutV < dMaxVertDepth - BD.CUT_EXTRA) or Proc.AdvTail
|
||||
-- verifico se necessari tagli supplementari
|
||||
EgtOutLog( string.format( 'MaxDepth=%.1f MaxVertDepth=%.1f CutH=%.1f CutV=%.1f', dMaxDepth, dMaxVertDepth, dCutH, dCutV), 3)
|
||||
local vCuts = {}
|
||||
if not Proc.AdvTail and dCutH > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or dCutV > dMaxVertDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC then
|
||||
if not Proc.AdvTail and ( dCutH > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or dCutV > dMaxVertDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC) then
|
||||
local ptExtra, vtExtra
|
||||
local bAutoCalcSurf = true
|
||||
if bFillAreaPiece or bFillTail then
|
||||
@@ -643,9 +645,9 @@ local function MakeFromDown( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
else
|
||||
-- lavoro la faccia
|
||||
local vtOrthoO
|
||||
if bHorizCut and ( b3Solid:getDimX() > BD.LEN_SHORT_PART or vtN:getX() > 0) then
|
||||
if bHorizCut and ( b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or vtN:getX() > 0) then
|
||||
vtOrthoO = -Z_AX()
|
||||
elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and abs( vtN:getY()) > 0.259 and vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail and abs( vtN:getY()) > 0.259 and vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
if Proc.Head then
|
||||
vtOrthoO = X_AX()
|
||||
else
|
||||
@@ -673,7 +675,7 @@ local function MakeFromDown( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- taglio (limite Vz Down Up messo a -2 per non farlo mai intervenire)
|
||||
local dCutExtra = BD.CUT_EXTRA
|
||||
if Proc.AdvTail then
|
||||
dCutExtra = -10
|
||||
dCutExtra = min( -BD.ADVANCE_TAIL_OFFS, dMaxVertDepth - dCutV)
|
||||
end
|
||||
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, vtOrthoO, -2, dCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
|
||||
if not bOk then
|
||||
|
||||
Reference in New Issue
Block a user