DataBeam :

- piccole modifiche ai fori per testa da sotto
- correzione ai LapJoint per tagli con sega a catena passanti (variabili non inizializzate)
- in forature corretta gestione Invert con testa da sotto e migliorato calcolo ingombro portautensile
- in mortase a coda di rondine migliorata scelta lavorazione in presenza di testa da sotto
- in lapjoint correzioni ribasso a U con testa da sotto
- a FindMilling e FindPocketing aggiunto parametro opzionale dMaxTotLen
- in LapJoint aggiunta gestione massima lunghezza fresa da sotto su svuotature.
This commit is contained in:
DarioS
2021-04-20 09:26:01 +02:00
parent e0681d9b95
commit e0d802d07d
4 changed files with 96 additions and 50 deletions
+31 -23
View File
@@ -1,4 +1,4 @@
-- ProcessLapJoint.lua by Egaltech s.r.l. 2021/03/22
-- ProcessLapJoint.lua by Egaltech s.r.l. 2021/04/14
-- Gestione calcolo mezzo-legno per Travi
-- 2019/10/08 Agg. gestione OpenPocket.
-- 2021/01/24 Con sega a catena ora sempre impostato asse A.
@@ -7,6 +7,9 @@
-- 2021/03/04 Due facce con testa da sotto.
-- 2021/03/20 Piccole correzioni.
-- 2021/03/22 Modificata gestione caso due facce lunghe come la trave con trave corta.
-- 2021/04/13 Modificata gestione fessura U con sega a catena (corta ora ok, lunga ancora da correggere).
-- 2021/04/14 Correzioni ribasso a U con fresa da sotto.
-- 2021/04/15 Aggiunta gestione massima lunghezza fresa da sotto su svuotature.
-- Tabella per definizione modulo
local ProcessLapJoint = {}
@@ -742,27 +745,25 @@ local function MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId, bDownHead)
end
-- verifico il numero di facce della tacca
assert( ( Proc.Fct == 2), 'Error : MakeTwoFacesByMill in LapJoint with ' .. tostring( Proc.Fct) .. ' faces')
-- predispongo lavorazione
local sMilling
-- verifico il parametro Q per uso fresa
-- recupero il parametro Q per uso fresa
local nUseRM = EgtGetInfo( Proc.Id, Q_USE_MILL, 'i')
-- recupero la lavorazione
local sMilling
if nUseRM and nUseRM == 1 then
sMilling = ML.FindMilling( 'LongSmallCut' .. EgtIf( bDownHead, '_H2', ''))
else
sMilling = ML.FindMilling( 'BirdsMouth' .. EgtIf( bDownHead, '_H2', ''))
end
-- recupero la lavorazione
local dTDiam = 0
if not sMilling then
local sErr = 'Error : LongSmallCut & BirdsMouth not found in library'
EgtOutLog( sErr)
return false, sErr
else
-- recupero i dati dell'utensile
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiam
end
end
-- recupero i dati dell'utensile
local dTDiam = 0
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiam
end
-- dati delle facce
local ptC = {}
@@ -1959,8 +1960,8 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd,
end
if bOrthoFaces then
-- ottengo le dimensioni del tunnel
_, _, _, vtOrtho, _, nSurfInt = GetTunnelDimension( Proc, nPartId)
-- ottengo le dimensioni del tunnel
dDimMin, dDimMax, dDepth, vtOrtho, nLundIdFace, nSurfInt = GetTunnelDimension( Proc, nPartId)
-- verifico la direzione
-- se devo inserire il chamfer
if nChamfer > 0 then
@@ -2715,15 +2716,17 @@ local function CheckPocketTool( sMchFind, dDiam, dElev)
end
---------------------------------------------------------------------
local function CheckToolDiamByFaces( Proc, nFacInd, dH, dV, bIsU, bIsL, dElev, nUseRoughTool)
local function CheckToolDiamByFaces( Proc, nFacInd, bFaceDown, dH, dV, bIsU, bIsL, dElev, nUseRoughTool)
local dMaxDimFace = max( dH, dV)
-- verifico che diametro utensile prende con la openpocket con la massima dimensione faccia
local bUseMaxTool, dMaxDiam
-- classe di lavorazione
local sMach = 'OpenPocket' .. EgtIf( bFaceDown, '_H2', '')
-- se è forzato l'uso del truciolatore non passo l'altezza di elevazione
if nUseRoughTool and nUseRoughTool == 1 then
bUseMaxTool, dMaxDiam = CheckPocketTool( 'OpenPocket', dMaxDimFace)
bUseMaxTool, dMaxDiam = CheckPocketTool( sMach, dMaxDimFace)
else
bUseMaxTool, dMaxDiam = CheckPocketTool( 'OpenPocket', dMaxDimFace, dElev)
bUseMaxTool, dMaxDiam = CheckPocketTool( sMach, dMaxDimFace, dElev)
end
-- se non trovato utensile esco
if not bUseMaxTool then
@@ -3437,6 +3440,9 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
elseif abs( vtN:getX()) > 0.707 or abs( vtN:getY()) > 0.707 or abs( vtN:getZ()) > 0.707 then
dCollSic = 5 * BD.COLL_SIC
end
-- abilitazione lavorazione da sotto
local bMillUp = ( BD.DOWN_HEAD and vtN:getZ() > -0.259)
local bMillDown = ( BD.DOWN_HEAD and vtN:getZ() < 0.342)
-- settaggio voluto da Alessandro
local sMchFind = EgtIf( bSinglePart, 'Pocket', 'OpenPocket')
sMchFindBackUp = sMchFind
@@ -3480,7 +3486,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
if ( Proc.Fct == 3 and bIsU and bSinglePart) or ( Proc.Fct == 2 and bIsL) or Proc.Fct == 1 then
sMchFindBackUp = sMchFind
--ottengo un diametro utensile opportuno
dDiam, sMchFind, nUseRoughTool, dDiamMax = CheckToolDiamByFaces( Proc, nFacInd, dH, dV, bIsU, bIsL, ( dFacElev + dCollSic), nUseRoughTool)
dDiam, sMchFind, nUseRoughTool, dDiamMax = CheckToolDiamByFaces( Proc, nFacInd, bMillDown, dH, dV, bIsU, bIsL, ( dFacElev + dCollSic), nUseRoughTool)
if not dDiam then
sMchFind = sMchFindBackUp
--if nUseRoughTool == 0 then
@@ -3499,15 +3505,17 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
end
end
end
-- abilitazione lavorazione da sotto
local bMillUp = ( BD.DOWN_HEAD and vtN:getZ() > -0.259)
local bMillDown = ( BD.DOWN_HEAD and vtN:getZ() < 0.342)
--EgtOutLog( 'Mortise Find Diam =' .. EgtNumToString( dDiam))
-- se da sotto, imposto massima lunghezza secondo la direzione
local dMaxTotLen
if bMillDown and BD.GetBottomToolMaxTotLen then
dMaxTotLen = BD.GetBottomToolMaxTotLen( vtN)
end
-- ricerca lavorazione
local sPocketing
local sMyPocketing, dMyTDiam, dMyTMaxDepth = ML.FindPocketing( sMchFind .. EgtIf( bMillDown, '_H2', ''), dDiam, dFacElev + dCollSic)
local sMyPocketing, dMyTDiam, dMyTMaxDepth = ML.FindPocketing( sMchFind .. EgtIf( bMillDown, '_H2', ''), dDiam, dFacElev + dCollSic, dMaxTotLen)
if not sMyPocketing then
sMyPocketing, dMyTDiam, dMyTMaxDepth = ML.FindPocketing( sMchFind .. EgtIf( bMillDown, '_H2', ''), dDiam)
sMyPocketing, dMyTDiam, dMyTMaxDepth = ML.FindPocketing( sMchFind .. EgtIf( bMillDown, '_H2', ''), dDiam, nil, dMaxTotLen)
end
if not sMyPocketing and bMillUp then
sMyPocketing, dMyTDiam, dMyTMaxDepth = ML.FindPocketing( sMchFind, dDiam, dFacElev + dCollSic)