Merge branch 'master' into develop

This commit is contained in:
luca.mazzoleni
2022-07-07 12:33:59 +02:00
+12 -10
View File
@@ -1,4 +1,4 @@
-- ProcessLapJoint.lua by Egaltech s.r.l. 2022/07/03
-- ProcessLapJoint.lua by Egaltech s.r.l. 2022/07/05
-- Gestione calcolo mezzo-legno per Travi
-- 2019/10/08 Agg. gestione OpenPocket.
-- 2021/01/24 Con sega a catena ora sempre impostato asse A.
@@ -47,6 +47,7 @@
-- 2022/06/16 Implemento lavorazioni con fresatura di lato per L30 (al momento solo passanti) se parametro Q03=2. Modificate funzioni Make, MakeMoreFaces, Classify.
-- 2022/06/21 Implemento di lavorazioni non passanti con fresatura di lato per L30 se parametro Q03=2. Modificate funzioni MakeMoreFaces, Classify.
-- 2022/06/29 Migliorate lavorazioni con fresatura di lato per L30 se parametro Q03=2. Ora con 4 facce / 3 facce a L può entrare una fresa grande fino al doppio dell'altezza della tasca / doppio della dimensione minima.
-- 2022/07/05 Modifiche per sega a catena di testa e relativa MaxElev.
-- Tabella per definizione modulo
local ProcessLapJoint = {}
@@ -2793,14 +2794,15 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
rfFac, dH, dV, dElev, bForceUseBlade,
dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace,
bOrthoFacesMaster, nBottomFace, nChamfer, nAddGrpId, b3Solid,
dDepthCham, nSurfInt, bIs3Faces)
dDepthCham, nSurfInt)
local sWarn
-- ingombro del grezzo
local b3Raw = EgtGetRawPartBBox( nRawId)
-- ottengo la distanza tra la fine del pezzo e il pezzo successivo
local dDistToNextPiece = EgtGetInfo( nRawId, 'BDST', 'd') or 5.4
-- verifico e fessura con 3 facce o tunnel
-- verifico se fessura con 3 facce o tunnel
local bOrthoFaces
local bIs3Faces = ( Proc.Fct == 3)
if bIs3Faces then
-- recupero la faccia con il maggior numero di adiacenze e l'elevazione relativa
local nFacInd1, dFacElev1, nFacInd2, dFacElev2 = BL.GetFaceWithMostAdj( Proc.Id, nPartId, bIs3Faces)
@@ -3039,14 +3041,14 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
-- imposto offset radiale
local dOffs = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
-- se necessario, limito l'affondamento
-- se necessario, avverto limitazioneo dell'affondamento
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
sWarn = 'Warning in LapJoint : elevation (' .. EgtNumToString( dElev, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
dDepth = dMaxDepth - dElev
EgtOutLog( sWarn)
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH '..EgtNumToString( dDepth, 1))
--local dDepth = dMaxDepth - dElev
--EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH '..EgtNumToString( dDepth, 1))
end
-- imposto elevazione
-- imposto massima elevazione
local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 2) .. ';'
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
-- eseguo
@@ -3071,7 +3073,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
return false, sWarn
end
end
-- altrimenti segacatena di fianco
-- altrimenti sega a catena di fianco
else
-- verifico se posso farlo con la sega-catena
local bMakeChainSaw, sSawing2, dMaxMat2, dSawCornerRad2, dSawThick2 = VerifyChainSaw( Proc, dDimMin, dDimMax)
@@ -3120,7 +3122,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
EgtOutLog( sWarn)
end
-- considero estremi inizio/fine chiusi
-- recupero massima elevazione da utente
-- imposto massima elevazione
local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 1) .. ';'
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
-- eseguo
@@ -5038,7 +5040,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
rfFac, dH, dV, dFacElev, bForceUseBlade,
dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace,
bOrthoFaces, nBottomFace, nChamfer, nAddGrpId, b3Solid,
dDepthCham, nSurfInt, true)
dDepthCham, nSurfInt)
if not bOk then
-- in base al flag interno e al numero di facce e se ha forma ad U: provo prima la svuotatura sul fianco e
-- se non è possibile allora provo in seguito con lama o segacatena