DataBeam :

- in taglio con lama, quando doppi da sotto in su aumentata sovrapposizione da BD.CUT_EXTRA_MIN a BD.CUT_EXTRA
- in LapJoint migliorata gestione sega a catena e aggiunta gestione Q10 come massima elevazione (solo in questo caso).
This commit is contained in:
DarioS
2021-11-15 09:59:28 +01:00
parent dc8f6bf951
commit 0d285d54d3
2 changed files with 58 additions and 31 deletions
+56 -29
View File
@@ -1,4 +1,4 @@
-- ProcessLapJoint.lua by Egaltech s.r.l. 2021/11/02
-- ProcessLapJoint.lua by Egaltech s.r.l. 2021/11/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.
@@ -30,6 +30,7 @@
-- 2021/10/21 Migliorato controllo affondamento utensile in U lavorato da 3 parti (anche da sotto).
-- 2021/10/27 Migliorato calcolo asse tunnel o similare.
-- 2021/11/02 In svuotatura con lati aperti diametro fresa non superiore al doppio del lato piccolo.
-- 2021/11/15 Quando si usa sega a catena uso Q10 come massima elevazione.
-- Tabella per definizione modulo
local ProcessLapJoint = {}
@@ -269,7 +270,7 @@ local function GetChainSawInitAngs( vtN, vtO)
end
---------------------------------------------------------------------
local function VerifyChainSaw( Proc, dMinDim, dMaxDim, vtOrtho)
local function VerifyChainSaw( Proc, dMinDim, dMaxDim)
local bUseChainSaw = false
local sMchFind = 'Sawing'
local sSawing = ML.FindSawing(sMchFind)
@@ -739,7 +740,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
-- verifico se può essere fatto con svuotatura
if VerifyPocket( Proc, dDimMin) then
return true, false
elseif VerifyChainSaw( Proc, dDimMin, dDimMax, vtOrtho) then
elseif VerifyChainSaw( Proc, dDimMin, dDimMax) then
return true, false
else
return false
@@ -3062,7 +3063,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
-- altrimenti segacatena di fianco
else
-- verifico se posso farlo con la sega-catena
local bMakeChainSaw, sSawing2, dMaxMat2, dSawCornerRad2, dSawThick2 = VerifyChainSaw( Proc, dDimMin, dDimMax, vtOrtho)
local bMakeChainSaw, sSawing2, dMaxMat2, dSawCornerRad2, dSawThick2 = VerifyChainSaw( Proc, dDimMin, dDimMax)
if bMakeChainSaw then
-- Verifico se necessarie più passate
local nStep = ceil( ( dDimMin - 10 * GEO.EPS_SMALL) / dSawThick2)
@@ -3082,38 +3083,64 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
-- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, nLundIdFace}})
-- imposto uso del lato faccia
-- al momento, dato che la fessura è passante da parte a parte, gestisco solo la lavorazione
-- dall'alto e di fronte (da dietro è disabilitata perchè ho exracorsa con la FAST).
-- Questa feature non è applicata su facce di testa e quindi non controllo l'entrata in X
if abs( vtOrtho:getZ()) >= 0.707 then
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_DOWN)
--elseif abs(vtOrtho:getZ()) < 0.707 and abs(vtOrtho:getY()) > 0.707 then
local nFaceUse
-- se non è un tunnel a 4 facce
if Proc.Fct < 4 then
nFaceUse = BL.GetNearestParalOpposite( rfFac:getVersZ(), vtN)
-- altrimenti vero tunnel (solo sopra-sotto o davanti-dietro)
else
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_BACK)
--elseif abs(vtOrtho:getZ()) <= 0.707 and vtOrtho:getY() < -0.707 then
-- EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_FRONT)
--elseif abs(vtOrtho:getZ()) < 0.707 and vtOrtho:getX() > 0.707 then
-- EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_LEFT)
--else
-- EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_RIGHT)
if abs( vtOrtho:getZ()) >= 0.707 then
nFaceUse = MCH_MILL_FU.PARAL_DOWN
else
nFaceUse = MCH_MILL_FU.PARAL_BACK
end
end
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
-- imposto angolo 3° asse rot
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, GetChainSawBlockedAxis( 1))
EgtSetMachiningParam( MCH_MP.INITANGS, GetChainSawInitAngs( vtN, vtOrtho))
-- imposto offset radiale
local dOffs = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
-- se possibile aumento l'affondamento pari al raggio corner + 1
if dMaxMat2 > (dDepth + dSawCornerRad2 + 1) then
EgtSetMachiningParam( MCH_MP.DEPTH, (dDepth + dSawCornerRad2 + 1))
-- se massimo affondamento supera altezza fessura, uso massimo affondamento
elseif dMaxMat2 > (dDepth + 1) then
EgtSetMachiningParam( MCH_MP.DEPTH, (dMaxMat2 - 1))
-- se massimo affondamento utensile inferiore fessura, setto affondamento ed emetto warning
elseif dMaxMat2 < dDepth then
EgtSetMachiningParam( MCH_MP.DEPTH, dMaxMat2)
sWarn = 'Warning : elevation bigger than max tool depth'
EgtOutLog( sWarn)
-- se non è un tunnel a 4 facce
if Proc.Fct < 4 then
-- imposto sempre massimo affondamento
local dBoxDepth
if nFaceUse == MCH_MILL_FU.PARAL_LEFT or nFaceUse == MCH_MILL_FU.PARAL_RIGHT then
dBoxDepth = Proc.Box:getDimX()
elseif nFaceUse == MCH_MILL_FU.PARAL_FRONT or nFaceUse == MCH_MILL_FU.PARAL_BACK then
dBoxDepth = Proc.Box:getDimY()
else
dBoxDepth = Proc.Box:getDimZ()
end
EgtSetMachiningParam( MCH_MP.DEPTH, dBoxDepth)
if dBoxDepth > dMaxMat2 then
sWarn = 'Warning : elevation bigger than max tool depth'
EgtOutLog( sWarn)
end
-- sistemo inizio e fine
if bOpenStart then EgtSetMachiningParam( MCH_MP.STARTADDLEN, 0) end
if bOpenEnd then EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0) end
-- altrimenti vero tunnel (solo sopra-sotto o davanti-dietro)
else
-- se possibile aumento l'affondamento pari al raggio corner + 1
if dMaxMat2 > (dDepth + dSawCornerRad2 + 1) then
EgtSetMachiningParam( MCH_MP.DEPTH, (dDepth + dSawCornerRad2 + 1))
-- se massimo affondamento supera altezza fessura, uso massimo affondamento
elseif dMaxMat2 > (dDepth + 1) then
EgtSetMachiningParam( MCH_MP.DEPTH, (dMaxMat2 - 1))
-- se massimo affondamento utensile inferiore fessura, setto affondamento ed emetto warning
elseif dMaxMat2 < dDepth then
EgtSetMachiningParam( MCH_MP.DEPTH, dMaxMat2)
sWarn = 'Warning : elevation bigger than max tool depth'
EgtOutLog( sWarn)
end
end
-- recupero massima elevazione da Q10
local dMaxElev = EgtGetInfo( Proc.Id, 'Q10', 'd')
if dMaxElev and dMaxElev > 10 then
local sNotes = 'MaxElev=' .. EgtNumToString( dMaxElev, 1) .. ';'
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
end
-- eseguo
if not EgtApplyMachining( true, false) then
@@ -4396,7 +4423,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
-- Se la svuotatura precedente non è stata fatta e chamfer non è mutuamente esclusivo provo con la sega-catena
if bTryWithBlades and nChamfer < 2 then
-- verifico se posso farlo con la sega-catena
local bMakeChainSaw, sSawing, dMaxMat, dSawCornerRad, dSawThick = VerifyChainSaw( Proc, dDimMin, dDimMax, vtOrtho)
local bMakeChainSaw, sSawing, dMaxMat, dSawCornerRad, dSawThick = VerifyChainSaw( Proc, dDimMin, dDimMax)
if bMakeChainSaw then
-- Verifico se necessarie più passate
local nStep = ceil( ( dDimMin - 10 * GEO.EPS_SMALL) / dSawThick)