DataBeam :

- modifiche per favorire la lama rispetto alla sega a catena.
This commit is contained in:
Dario Sassi
2021-02-16 08:37:14 +00:00
parent bad243ea6a
commit fbd018fd34
+15 -8
View File
@@ -1,4 +1,4 @@
-- ProcessLapJoint.lua by Egaltech s.r.l. 2021/02/08
-- ProcessLapJoint.lua by Egaltech s.r.l. 2021/02/15
-- Gestione calcolo mezzo-legno per Travi
-- 2019/10/08 Agg. gestione OpenPocket.
-- 2021/01/24 Con sega a catena ora sempre impostato asse A.
@@ -124,8 +124,13 @@ local function EvaluateQParam( Proc)
end
end
-- verifico se devo usare lama invece della sega-catena
-- 2020-03-20 forzata abilitazione uso lama se parametro Q non è presente
-- xxxx-xx-xx tolta la preferenza alla lama in favore della sega-catena per un caso particolare
-- 2021-02-15 re-introdotta la preferenza alla lama se non c'è il parametro Q. Rimane da
-- implementare un ulteriore parametro per poter scegliere di prediligere la sega-catena o no al fine di continuare
-- a cambiare il codice per gestire il caso particolare
local bForceUseBlade = false
if #Q_FORCE_BLADE > 0 and EgtGetInfo( Proc.Id, Q_FORCE_BLADE, 'i') == 1 then
if #Q_FORCE_BLADE == 0 or EgtGetInfo( Proc.Id, Q_FORCE_BLADE, 'i') == 1 then
bForceUseBlade = true
end
@@ -3430,8 +3435,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
sPocketing = sMyPocketing
end
end
-- se forzata lama e forma ad U, annulla la svuotatura
if bForceUseBlade and Proc.Fct == 3 and bIsU then
-- se feature 16 o 17 e forzata lama e forma ad U, annulla la svuotatura
if ( Proc.Prc == 16 or Proc.Prc == 17) and bForceUseBlade and Proc.Fct == 3 and bIsU then
sPocketing = nil
end
-- se non trova una svuotatura adatta
@@ -3446,8 +3451,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
else
local bTryWithBlades = true
local nOk, bOk, sStat, sErr, dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, bOrthoFaces
-- se forzata lama provo prima con questa e poi con la fresa
if bForceUseBlade then
-- se feature 16 o 17 e se forzata lama provo prima con questa e poi con la fresa
if ( Proc.Prc == 16 or Proc.Prc == 17) and bForceUseBlade then
-- Se la svuotatura precedente non è stata fatta e smusso non è esclusivo, provo con le lame
if bTryWithBlades and nChamfer < 2 then
bOk, sWarn, sStat = MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
@@ -3581,9 +3586,11 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
end
-- se richiesti antischeggia con lama su U trasversale e smusso non esclusivo
-- rimane da gestire: se da eseguire con fresa o se richiesto lama ma impossibile utilizzarla, si utilizza fresa
-- 15.02.2021 esegue antischeggia di lama se forma U o L ma con numero lati verificati oppure forma U o L ma con feature passante in Y o Z
local bMadeASbyBld = false
if nChamfer < 2 and EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') == 1 and ( bIsU or bIsL) and
( Proc.Box:getDimY() > b3Raw:getDimY() - 1 or Proc.Box:getDimZ() > b3Raw:getDimZ() - 1) then
local bPassThrou = ( Proc.Box:getDimY() > b3Raw:getDimY() - 1 or Proc.Box:getDimZ() > b3Raw:getDimZ() - 1)
if nChamfer < 2 and EgtGetInfo( Proc.Id, Q_ANTISPLINT_TYPE, 'i') == 1 and
( ( ( Proc.Fct == 3 and bIsU) or ( Proc.Fct == 2 and bIsL)) or ( ( bIsU or bIsL) and bPassThrou)) then
local nNumFac = EgtIf( bIsU, 2, 1)
local nPrefSide = 1 -- di preferenza il motore è meglio tenerlo sinistra
-- se a U cerco di ottimizzare il lato di lavoro della lama