DataBeam :
- correzioni varie.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- ProcessTenon.lua by Egaltech s.r.l. 2020/12/30
|
||||
-- ProcessTenon.lua by Egaltech s.r.l. 2021/01/20
|
||||
-- Gestione calcolo tenone per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -119,6 +119,7 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
local bShortPart = ( b3Solid:getDimX() < BD.LEN_SHORT_PART)
|
||||
-- recupero e verifico l'entità curva
|
||||
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
|
||||
if AuxId then AuxId = AuxId + Proc.Id end
|
||||
@@ -153,7 +154,7 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
-- abilitazione lavorazione da sotto
|
||||
local bMillDown = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.1)
|
||||
-- porto inizio curva il più possibile sul bordo
|
||||
BL.PutStartNearestToEdge( AuxId, b3Solid, bMillDown)
|
||||
BL.PutStartNearestToEdge( AuxId, b3Solid, bMillDown and not bShortPart)
|
||||
-- se vero tenone inclinato o non esattamente alle estremità, necessario taglio di lama sulla testa
|
||||
if Proc.Prc ~= 52 and
|
||||
( not AreSameOrOppositeVectorApprox( vtN, X_AX()) or
|
||||
@@ -171,8 +172,8 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
if AddId then
|
||||
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
|
||||
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
|
||||
-- se pezzo piccolo, in coda e piano inclinato attorno a Z applico svuotatura
|
||||
if b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getX() < 0 and abs( vtExtr:getX()) < 0.985 then
|
||||
-- se pezzo piccolo, in coda, con piano inclinato verso il basso e macchina con testa da sotto applico svuotatura
|
||||
if bShortPart and vtExtr:getX() < 0 and vtExtr:getZ() < -0.09 and BD.DOWN_HEAD then
|
||||
local sPockType = EgtIf( bMillDown, 'OpenPocket_H2', 'OpenPocket')
|
||||
local sPocketing = ML.FindPocketing( sPockType)
|
||||
local dMaxDepth = 100
|
||||
@@ -218,7 +219,7 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
local b3Cut = EgtGetBBoxGlob( AddId or GDB_ID.NULL, GDB_BB.STANDARD)
|
||||
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Cut, Fct = 1, Flg = Proc.Flg,
|
||||
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
|
||||
local bFromBottom = ( b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getZ() > 0.25)
|
||||
local bFromBottom = ( bShortPart and vtExtr:getZ() > 0.25)
|
||||
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
|
||||
if not bOk then return bOk, sErr end
|
||||
end
|
||||
@@ -307,8 +308,9 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
if abs( vtN:getY()) < 0.1 and vtN:getZ() > 0.5 then
|
||||
dOffs = 0.5 * dOffs
|
||||
end
|
||||
if b3Solid:getDimX() < BD.LEN_SHORT_PART and b3Raw:getDimZ() < BD.VICE_MINH and abs( vtN:getZ()) > 0.575 then
|
||||
dOffs = 0.2 * dOffs
|
||||
if bShortPart and b3Raw:getDimZ() < BD.VICE_MINH and abs( vtN:getZ()) > 0.575 then
|
||||
local b3Base = EgtSurfTmGetFacetBBoxGlob( Proc.Id, 0, GDB_BB.STANDARD)
|
||||
dOffs = dOffs - 0.825 * b3Base:getDimX()
|
||||
end
|
||||
BL.UpdateHCING( nRawId, dOffs)
|
||||
elseif Proc.Tail then
|
||||
|
||||
Reference in New Issue
Block a user