DataBeam :

- correzioni varie per FAST.
This commit is contained in:
Dario Sassi
2021-03-20 18:45:28 +00:00
parent 681d9f0f71
commit 91dd924536
2 changed files with 25 additions and 16 deletions
+23 -14
View File
@@ -1,10 +1,11 @@
-- ProcessLapJoint.lua by Egaltech s.r.l. 2021/03/19
-- ProcessLapJoint.lua by Egaltech s.r.l. 2021/03/20
-- Gestione calcolo mezzo-legno per Travi
-- 2019/10/08 Agg. gestione OpenPocket.
-- 2021/01/24 Con sega a catena ora sempre impostato asse A.
-- 2021/02/03 Corretto riconoscimento feature di coda.
-- 2021/02/04 Razionalizzata gestione forzatura lama. Corretta gestione diametro minimo utensile per svuotatura.
-- 2021/03/04 Due facce con testa da sotto.
-- 2021/03/20 Piccole correzioni.
-- Tabella per definizione modulo
local ProcessLapJoint = {}
@@ -2859,7 +2860,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
dMachDepth = dMaxMat - (dDepth / 2)
dElev = dMaxMat
-- se sono in questo caso verifico la direzione, se le componenti x,y e z deviano molto
-- allora considero la lavorazione no idonea perchè potrebbe avere anche delle collisioni
-- allora considero la lavorazione non idonea perchè potrebbe avere anche delle collisioni
if abs(vtOrtho:getX()) > 0.5 or abs(vtOrtho:getY()) > 0.5 or abs(vtOrtho:getZ()) > 0.5 then
bBadMach = true
end
@@ -2893,19 +2894,19 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
bInvertMach = true
end
-- imposto posizione braccio porta testa
local nSCC
if vtOrtho:getY() < GEO.EPS_SMALL then
if bInvertMach then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
else
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
end
nSCC = EgtIf( bInvertMach, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
else
if bInvertMach then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
if abs( vtOrtho:getX()) > 0.1 then
nSCC = EgtIf( bInvertMach, MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP)
else
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
local bNearTail = ( Proc.Box:getCenter():getX() < b3Solid:getCenter():getX() and Proc.Box:getCenter():getX() - b3Solid:getMin():getX() < 1000)
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
nSCC = EgtIf( BL.IsPartFinalPhase( nPhase) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
end
end
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- se tasca aperta, imposto opportuno attacco
if sMchFind == 'OpenPocket' then
EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALIN)
@@ -2951,11 +2952,19 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
-- imposto direzione utensile opposta
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
-- imposto posizione braccio porta testa
local nSCC
if vtOrtho:getY() < GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
nSCC = MCH_SCC.ADIR_YP
else
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
if abs( vtOrtho:getX()) > 0.1 then
nSCC = MCH_SCC.ADIR_YM
else
local bNearTail = ( Proc.Box:getCenter():getX() < b3Solid:getCenter():getX() and Proc.Box:getCenter():getX() - b3Solid:getMin():getX() < 1000)
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
nSCC = EgtIf( BL.IsPartFinalPhase( nPhase) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
end
end
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- se tasca aperta, imposto opportuno attacco
if sMchFind == 'OpenPocket' then
EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALIN)
@@ -3389,9 +3398,10 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
-- se non ho scambiato la faccia
if not bUseOtherFace then
if nFacInd2 then
ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd2, GDB_ID.ROOT)
nFacInd, nFacInd2 = nFacInd2, nFacInd
dFacElev, dFacElev2 = dFacElev2, dFacElev
ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd, GDB_ID.ROOT)
rfFac, dH, dV = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFacInd, GDB_ID.ROOT)
-- altrimenti cerco la faccia secondaria per adiacenza alla principale
else
-- Cerco una faccia adiacente alla principale sul lato lungo
@@ -3917,7 +3927,6 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
else
return MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- altrimenti lavorazione unica
else
-- una faccia