DataBeam :
- aggiunto comando ShowSolid - aggiunte tagli antischeggia a LapJoint a U di traverso - piccole migliorie.
This commit is contained in:
+40
-10
@@ -1,4 +1,4 @@
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2019/11/14
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2019/11/24
|
||||
-- Gestione calcolo mezzo-legno per Travi
|
||||
-- 2019/10/08 Agg. gestione OpenPocket.
|
||||
|
||||
@@ -578,9 +578,7 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac,
|
||||
for i = 1, nStep do
|
||||
local dOffs = ( i - 1) * dStep
|
||||
local bOk, sErr = BL.MakeOneFaceBySaw( Proc.Id, nFacAdj, sCutting, dSawDiam, nFaceUse, -0.01, 0, BD.CUT_SIC, dOffs, 0, nil, b3Raw)
|
||||
if not bOk then
|
||||
return bOk, sErr
|
||||
end
|
||||
if not bOk then return bOk, sErr end
|
||||
end
|
||||
-- altrimenti con sega a catena
|
||||
else
|
||||
@@ -664,6 +662,27 @@ local function MakeByChainOrSaw( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac,
|
||||
return true, sWarn
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MakeAntiSplintBySaw( Proc, nFacet, vtN, b3Raw)
|
||||
-- Recupero la lavorazione di lama
|
||||
local sCutting = ML.FindCutting( 'HeadSide')
|
||||
if not sCutting then
|
||||
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' cutting not found in library'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- recupero i dati dell'utensile
|
||||
local dSawDiam = 400
|
||||
if EgtMdbSetCurrMachining( sCutting) then
|
||||
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
|
||||
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
|
||||
dSawDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam
|
||||
end
|
||||
end
|
||||
-- eseguo il taglio
|
||||
return BL.MakeOneFaceBySaw( Proc.Id, nFacet, sCutting, dSawDiam, vtN, nil, 0, BD.CUT_SIC, 0, 0, nil, b3Raw)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId)
|
||||
-- recupero l'ingombro del grezzo di appartenenza
|
||||
@@ -691,16 +710,16 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId)
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- verifico se U
|
||||
local bIsU = ( Proc.Fct == 3 and not TestElleShape3( Proc))
|
||||
-- eventuali tagli preliminari
|
||||
do
|
||||
local bOk, sErr = MakePreCuts( Proc, nPhase, nRawId, nPartId, b3Raw)
|
||||
if not bOk then
|
||||
return false, sErr
|
||||
end
|
||||
if not bOk then return false, sErr end
|
||||
end
|
||||
-- recupero la lavorazione
|
||||
local sMchFind = 'Pocket'
|
||||
if Proc.Fct <= 3 and not TestElleShape3( Proc) then sMchFind = 'OpenPocket' end
|
||||
if Proc.Fct < 3 or bIsU then sMchFind = 'OpenPocket' end
|
||||
local dDiam = min( dH, dV)
|
||||
local dCollSic = 2 * BD.COLL_SIC
|
||||
if abs( vtN:getX()) > 0.996 or abs( vtN:getY()) > 0.996 or abs( vtN:getZ()) > 0.996 then dCollSic = BD.COLL_SIC end
|
||||
@@ -708,9 +727,9 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId)
|
||||
local sPocketing = ML.FindPocketing( sMchFind, dDiam, dFacElev + dCollSic)
|
||||
-- se non trova una svuotatura adatta
|
||||
if not sPocketing then
|
||||
-- verifico se due o tre facce a L con una faccia di terminazione
|
||||
-- verifico se due facce o L con una o due facce di terminazione
|
||||
local bIsL = ( Proc.Fct == 2 or TestElleShape3( Proc) or TestElleShape4( Proc) == 2)
|
||||
-- se due facce o tre a L provo con contornatura
|
||||
-- provo con contornatura
|
||||
if bIsL then
|
||||
return MakeByMill( Proc, nPhase, nRawId, nPartId, nFacInd, rfFac, dH, dV, dFacElev)
|
||||
-- altrimenti provo con la sega a catena o lama
|
||||
@@ -728,6 +747,17 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId)
|
||||
end
|
||||
end
|
||||
end
|
||||
-- se richiesti antischeggia con lama su U trasversale
|
||||
if EgtGetInfo( Proc.Id, 'Q06', 'i') == 1 and bIsU and
|
||||
( Proc.Box:getDimY() > b3Raw:getDimY() - 1 or Proc.Box:getDimZ() > b3Raw:getDimZ() - 1) then
|
||||
-- va eseguito sulle facce diverse dalla principale
|
||||
for nFacet = 0, 2 do
|
||||
if nFacet ~= nFacInd then
|
||||
local bOk, sErr = MakeAntiSplintBySaw( Proc, nFacet, vtN, b3Raw)
|
||||
if not bOk then return false, sErr end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- recupero i dati dell'utensile
|
||||
local dMaxDepth = 0
|
||||
if EgtMdbSetCurrMachining( sPocketing) then
|
||||
|
||||
Reference in New Issue
Block a user