DataBeam :
- nell'ordinamento quando si confrontano i box delle feature aggiunta verifica preliminare della loro validità - ulteriore limitazione a GetNzLimDownUp per FAST - migliorato calcolo larghezza DtMortise - in ProcessLapJoint corretta classificazione due facce sotto e modificati criteri assegnazione due facce alla coda.
This commit is contained in:
+18
-10
@@ -1,4 +1,4 @@
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2022/04/28
|
||||
-- ProcessLapJoint.lua by Egaltech s.r.l. 2022/05/04
|
||||
-- Gestione calcolo mezzo-legno per Travi
|
||||
-- 2019/10/08 Agg. gestione OpenPocket.
|
||||
-- 2021/01/24 Con sega a catena ora sempre impostato asse A.
|
||||
@@ -40,6 +40,7 @@
|
||||
-- 2022/03/21 Quando si usa lama uso Q10 come massima elevazione.
|
||||
-- 2022/03/29 Aggiunta gestione antischeggia con Q06 anche su 3/4-033-X.
|
||||
-- 2022/04/28 Lavorazione BH forzata sempre OneWay.
|
||||
-- 2022/05/04 Corretta classificazione due facce sotto. Modificati criteri assegnazione due facce alla coda.
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
local ProcessLapJoint = {}
|
||||
@@ -606,7 +607,7 @@ end
|
||||
function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
|
||||
-- se una sola faccia
|
||||
if Proc.Fct == 1 then
|
||||
local _, vtN0 = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
||||
local vtN0 = EgtSurfTmFacetNormVersor( Proc.Id, 0, GDB_ID.ROOT)
|
||||
if vtN0:getX() < -0.1 then
|
||||
return true
|
||||
end
|
||||
@@ -617,7 +618,6 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
|
||||
local bUseBHSideMill, bHead, bHeadDir = VerifyBHSideMill( Proc)
|
||||
if bUseBHSideMill then
|
||||
Proc.HeadDir = bHeadDir
|
||||
--return not bHead
|
||||
end
|
||||
-- recupero box del pezzo
|
||||
local nPartId = EgtGetParent( EgtGetParent( Proc.Id) or GDB_ID.NULL)
|
||||
@@ -627,8 +627,9 @@ function ProcessLapJoint.IsTailFeature( Proc, b3Raw)
|
||||
if dEndDist > BD.MAX_DIST_HTFEA then
|
||||
return false
|
||||
end
|
||||
-- la sua lunghezza non deve superare il massimo e 60% della lunghezza della trave
|
||||
if Proc.Box:getDimX() > min( BD.MAX_LEN_HTFEA, 0.6 * b3Raw:getDimX()) then
|
||||
-- se lunga come trave, oppure non è trave corta e la sua lunghezza supera il massimo o il 60% della lunghezza della trave
|
||||
if Proc.Box:getDimX() > b3Solid:getDimX() - 1 or
|
||||
( b3Solid:getDimX() > BD.LEN_SHORT_PART and Proc.Box:getDimX() > min( BD.MAX_LEN_HTFEA, 0.6 * b3Solid:getDimX())) then
|
||||
return false
|
||||
end
|
||||
-- se una o due facce e interessa veramente la coda, allora di coda
|
||||
@@ -660,7 +661,7 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
|
||||
-- se 1 faccia
|
||||
if Proc.Fct == 1 then
|
||||
-- dati della faccia
|
||||
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
||||
--local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
||||
-- verifico se è lavorabile solo dal basso
|
||||
--local bDown = ( vtN:getZ() < BD.NZ_MINA)
|
||||
--return true, bDown
|
||||
@@ -673,13 +674,14 @@ function ProcessLapJoint.Classify( Proc, b3Raw)
|
||||
return true, false
|
||||
end
|
||||
-- dati delle facce
|
||||
local ptC = {}
|
||||
local vtN = {}
|
||||
ptC[1], vtN[1] = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
|
||||
ptC[2], vtN[2] = EgtSurfTmFacetCenter( Proc.Id, 1, GDB_ID.ROOT)
|
||||
vtN[1] = EgtSurfTmFacetNormVersor( Proc.Id, 0, GDB_ID.ROOT)
|
||||
vtN[2] = EgtSurfTmFacetNormVersor( Proc.Id, 1, GDB_ID.ROOT)
|
||||
-- verifico se è lavorabile solo dal basso
|
||||
local vtParX = vtN[1] ^ vtN[2] ; vtParX:normalize()
|
||||
local bParX = ( abs( vtParX:getX()) > 0.985)
|
||||
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()))
|
||||
( not ( Proc.Head or Proc.Tail) and bParX 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.5 and ( vtN[2]:getZ() < -0.1 or not bSmall)) or
|
||||
( vtN[2]:getZ() < BD.NZ_MINA and vtN[1]:getZ() < 0.5 and ( vtN[1]:getZ() < -0.1 or not bSmall))
|
||||
@@ -4395,6 +4397,12 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, bSinglePa
|
||||
bClosedOrthoFaces = false -- non setto come tunnel
|
||||
end
|
||||
end
|
||||
-- se proviene da divisione in parti lungo X ed è un tunnel non è fattibile
|
||||
if not bSinglePart and bClosedOrthoFaces then
|
||||
local sErr = 'Error : long splitted tunnel not feasible'
|
||||
EgtOutLog( sErr)
|
||||
return false, sErr
|
||||
end
|
||||
-- verifico se sono presenti i parametri Q per la profondità smusso e
|
||||
-- per eseguire in esclusiva solo lo smusso
|
||||
local nChamfer, dDepthCham, sErrCham, bForceUseBlade = EvaluateQParam( Proc)
|
||||
|
||||
Reference in New Issue
Block a user