DataBeam :

- correzione per Tagli (1/2-010-X) da trattare come tagli lunghi.
This commit is contained in:
Dario Sassi
2021-02-05 19:08:02 +00:00
parent 5114ec29fb
commit 7f7801e180
+11 -15
View File
@@ -1,4 +1,4 @@
-- ProcessCut.lua by Egaltech s.r.l. 2021/02/02
-- ProcessCut.lua by Egaltech s.r.l. 2021/02/05
-- Gestione calcolo singoli tagli di lama per Travi
-- Tabella per definizione modulo
@@ -212,6 +212,14 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom,
if Proc.CutFront then
return true
end
-- verifico se da considerare taglio lungo ( non da sotto, inclinato meno di 21.56deg, largo come la trave e abbastanza lungo)
local bLongCut = ( not bDownCut and vtN:getZ() > 0.93 and
Proc.Box:getDimY() > b3Solid:getDimY() - 10 * GEO.EPS_SMALL and
( Proc.Box:getDimX() > 0.75 * b3Solid:getDimX() or Proc.Box:getDimX() > 1500.000))
-- se taglio lungo e Q04 = 1 allora lancio il processo dell'L10
if bLongCut and EgtGetInfo( Proc.Id, 'Q04', 'i') == 1 then
return LongCut.Make( Proc, nPhase, nRawId, nPartId, true)
end
-- se pezzo ancora attaccato alla trave, per non rovinare quello successivo
local bFillAreaPiece
local bFillTail
@@ -223,15 +231,8 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom,
if not bFillAreaPiece then
-- se poco inclinata ( inclinazione inferiore a 21.56 deg)
if vtN:getZ() > 0.93 then
-- se la faccia occupa tutta la trave in X e Y o occupa sicuramente la faccia in Y e almeno 3/4 della lunghezza in X e sborda in X e non interessa la faccia inferiore,
-- si possono far partire i tagli a cubetti dalla testa o lasciare il cordoncino centrale
if ( ( abs( Proc.Box:getMin():getX() - b3Solid:getMin():getX()) < 10*GEO.EPS_SMALL and abs( Proc.Box:getMax():getX() - b3Solid:getMax():getX()) < 10*GEO.EPS_SMALL) or
( ( abs( Proc.Box:getMin():getX() - b3Solid:getMin():getX()) < 10*GEO.EPS_SMALL or abs( Proc.Box:getMax():getX() - b3Solid:getMax():getX()) < 10*GEO.EPS_SMALL) and
( Proc.Box:getDimX() > 0.75 * b3Solid:getDimX() or Proc.Box:getDimX() > 1500.000))) and
abs( Proc.Box:getMin():getY() - b3Solid:getMin():getY()) < 10*GEO.EPS_SMALL and abs( Proc.Box:getMax():getY() - b3Solid:getMax():getY()) < 10*GEO.EPS_SMALL and
b3Solid:getMin():getZ() < Proc.Box:getMin():getZ() - 100 * GEO.EPS_SMALL then
bFillAreaPiece = true
end
-- si possono far partire i tagli a cubetti dalla testa
bFillAreaPiece = bLongCut
-- se praticamente verticale di fianco ( inclinazione inferiore a 21.56deg)
elseif abs( vtN:getY()) > 0.93 then
-- se la faccia occupa tutta la trave in X e Z o occupa sicuramente la faccia in Z e almeno 3/4 della faccia in X e sborda in X,
@@ -264,11 +265,6 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom,
end
end
end
-- se ho il parametro Q04 = 1 e il taglio copre la lunghezza della trave allora lancio il processo dell'L10
local nAsLongCut = EgtGetInfo( Proc.Id, 'Q04', 'i') or 0
if nAsLongCut == 1 and bFillAreaPiece then
return LongCut.Make( Proc, nPhase, nRawId, nPartId, true)
end
-- se vero taglio, eventuale inserimento smussi
if Proc.Prc == 10 then
local bOkc, sErrC = MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)