DataBeam :

- migliorie varie.
This commit is contained in:
Dario Sassi
2019-08-07 18:30:58 +00:00
parent e865cc6726
commit 0bf374a53f
5 changed files with 46 additions and 19 deletions
+20 -8
View File
@@ -1,4 +1,4 @@
-- ProcessLapJoint.lua by Egaltech s.r.l. 2019/07/30
-- ProcessLapJoint.lua by Egaltech s.r.l. 2019/08/07
-- Gestione calcolo mezzo-legno per Travi
-- Tabella per definizione modulo
@@ -225,16 +225,28 @@ local function MakeTwoFacesByMill( Proc, nPhase, nRawId, nPartId)
end
-- scelta faccia da lavorare
local nFacInd
-- se entrambe possibili, scelgo quella con la normale più perpendicolare all'asse trave (se uguali, quella verso X+)
-- se entrambe possibili
if bFaceOk[0] and bFaceOk[1] then
if abs( abs( vtN[0]:getX()) - abs( vtN[1]:getX())) < GEO.EPS_SMALL then
if ptM:getX() > b3Raw:getCenter():getX() then
nFacInd = EgtIf( vtN[0]:getX() > vtN[1]:getX(), 0, 1)
-- se in testa o coda, scelgo quella con la normale più parallela all'asse trave
if Proc.Head or Proc.Tail then
if vtN[0]:getZ() < BD.NZ_MINA then
nFacInd = 1
elseif vtN[1]:getZ() < BD.NZ_MINA then
nFacInd = 0
else
nFacInd = EgtIf( vtN[0]:getX() < vtN[1]:getX(), 0, 1)
nFacInd = EgtIf( abs( vtN[0]:getX()) > abs( vtN[1]:getX()), 0, 1)
end
-- altrimenti, scelgo quella con la normale più perpendicolare all'asse trave (se uguali, quella verso X+)
else
nFacInd = EgtIf( abs( vtN[0]:getX()) < abs( vtN[1]:getX()), 0, 1)
if abs( abs( vtN[0]:getX()) - abs( vtN[1]:getX())) < GEO.EPS_SMALL then
if ptM:getX() > b3Raw:getCenter():getX() then
nFacInd = EgtIf( vtN[0]:getX() > vtN[1]:getX(), 0, 1)
else
nFacInd = EgtIf( vtN[0]:getX() < vtN[1]:getX(), 0, 1)
end
else
nFacInd = EgtIf( abs( vtN[0]:getX()) < abs( vtN[1]:getX()), 0, 1)
end
end
elseif bFaceOk[0] then
nFacInd = 0
@@ -476,7 +488,7 @@ local function MakeMoreFaces( Proc, nPhase, nRawId, nPartId)
assert( ( Proc.Fct > 2), 'Error : MakeMoreFaces in LapJoint with ' .. tostring( Proc.Fct) .. ' faces')
-- recupero la faccia con il maggior numero di adiacenze e l'elevazione relativa
local nFacInd, dFacElev, nFacInd2, dFacElev2 = BL.GetFaceWithMostAdj( Proc.Id)
assert( nFacInd, 'Error : MakeMoreFaces could not find reference face')
assert( ( nFacInd and nFacInd >= 0), 'Error : MakeMoreFaces could not find reference face')
-- dati della faccia
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd, GDB_ID.ROOT)
-- se orientata verso il basso, verifico l'alternativa