DataBeam :
- aggiunta gestione feature Dovetail (1/2/3/4-138-X) - correzioni e migliorie varie.
This commit is contained in:
+10
-10
@@ -1,4 +1,4 @@
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2020/04/20
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2020/04/24
|
||||
-- Gestione calcolo mezzo-legno per Travi
|
||||
-- 2019/10/08 Agg. gestione OpenPocket.
|
||||
|
||||
@@ -417,7 +417,7 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Classificazione della feature
|
||||
function ProcessLapJoint.Classify( Proc)
|
||||
function ProcessLapJoint.Classify( Proc, b3Raw)
|
||||
-- se 1 faccia
|
||||
if Proc.Fct == 1 then
|
||||
-- dati della faccia
|
||||
@@ -434,8 +434,8 @@ function ProcessLapJoint.Classify( Proc)
|
||||
ptC[1], vtN[1] = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
||||
ptC[2], vtN[2] = EgtSurfTmFacetCenter( Proc.Id, 1, GDB_ID.ROOT)
|
||||
-- verifico se è lavorabile solo dal basso
|
||||
local bSmall = ( ( Proc.Head or Proc.Tail) and Proc.Box:getDimX() < BD.MAX_LEN_RIDGELAP_FROM_BOTTOM) or
|
||||
( not ( Proc.Head or Proc.Tail) and Proc.Box:getDimY() < BD.MAX_LEN_RIDGELAP_FROM_BOTTOM)
|
||||
local bSmall = ( ( Proc.Head or Proc.Tail) and Proc.Box:getDimX() <= BD.GetMaxLenRidgeLapFromBottom( b3Raw:getDimZ())) or
|
||||
( not ( Proc.Head or Proc.Tail) and Proc.Box:getDimY() <= BD.GetMaxLenRidgeLapFromBottom( b3Raw:getDimZ()))
|
||||
local bDown = ( vtN[1]:getZ() < BD.NZ_MINB and vtN[2]:getZ() < BD.NZ_MINB) or
|
||||
( vtN[1]:getZ() < BD.NZ_MINA and ( vtN[2]:getZ() < -0.1 or not bSmall)) or
|
||||
( vtN[2]:getZ() < BD.NZ_MINA and ( vtN[1]:getZ() < -0.1 or not bSmall))
|
||||
@@ -523,7 +523,7 @@ function ProcessLapJoint.Classify( Proc)
|
||||
if bDown then
|
||||
if nFacInd2 and dElev2 < 2 * dElev then
|
||||
local ptC2, vtN2 = EgtSurfTmFacetCenter( Proc.Id, nFacInd2, GDB_ID.ROOT)
|
||||
bDown = ( vtN2:getZ() < BD.NZ_MINA)
|
||||
bDown = ( vtN2:getZ() < BD.NZ_MINB)
|
||||
end
|
||||
end
|
||||
return true, bDown
|
||||
@@ -2719,7 +2719,7 @@ local function MakeByPockets( Proc, nPhase, nRawId, nPartId, nChamfer, dDepthCha
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId)
|
||||
local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, bSinglePart)
|
||||
local sWarn
|
||||
-- recupero l'ingombro del grezzo di appartenenza
|
||||
local b3Raw = EgtGetRawPartBBox( nRawId)
|
||||
@@ -3062,8 +3062,8 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId)
|
||||
-- recupero la lavorazione
|
||||
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 = 0 end
|
||||
local sMchFind = 'Pocket'
|
||||
local nUseRoughTool = 0
|
||||
local sMchFind = EgtIf( bSinglePart, 'Pocket', 'OpenPocket')
|
||||
local nUseRoughTool = EgtIf( bSinglePart, 0, 1)
|
||||
local dDiam = min( dH, dV)
|
||||
-- verifico dalla forma se non posso prendere utensile grande
|
||||
if ( Proc.Fct == 3 and bIsU) or ( Proc.Fct == 2 and bIsL) or Proc.Fct == 1 then
|
||||
@@ -3246,7 +3246,7 @@ local function MakeLongMoreFaces( Proc, nPhase, nRawId, nPartId)
|
||||
local b3Box = EgtGetBBoxGlob( vAddId[i], GDB_BB.STANDARD)
|
||||
local nFct = EgtSurfTmFacetCount( vAddId[i])
|
||||
local AddProc = { Id = vAddId[i], Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Box, Fct = nFct, Flg = Proc.Flg}
|
||||
local bOk, sMyWarn = MakeMoreFaces( AddProc, nPhase, nRawId, nPartId)
|
||||
local bOk, sMyWarn = MakeMoreFaces( AddProc, nPhase, nRawId, nPartId, false)
|
||||
if not sWarn then sWarn = sMyWarn end
|
||||
if not bOk then return bOk, sWarn end
|
||||
end
|
||||
@@ -3316,7 +3316,7 @@ function ProcessLapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
|
||||
end
|
||||
-- tre o più facce
|
||||
else
|
||||
return MakeMoreFaces( Proc, nPhase, nRawId, nPartId)
|
||||
return MakeMoreFaces( Proc, nPhase, nRawId, nPartId, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user