DataBeam :

- Ulteriori correzioni a CompareFeature.
This commit is contained in:
DarioS
2021-12-21 05:26:13 +01:00
parent 725d993256
commit 83b43872de
+14 -7
View File
@@ -1,4 +1,4 @@
-- BeamExec.lua by Egaltech s.r.l. 2021/12/15
-- BeamExec.lua by Egaltech s.r.l. 2021/12/20
-- Libreria esecuzione lavorazioni per Travi
-- 2019/07/11 Aggiunta gestione stato rotazione di feature per TS3.
-- 2019/09/04 Corretto controllo feature di testa e coda con sovramateriale di testa elevato.
@@ -24,6 +24,7 @@
-- 2021/07/13 Aggiunta gestione posizionamento pezzo TR/BR per macchine con carico a destra e scarico a sinistra.
-- 2021/11/27 House mortise sempre prima di (dt)mortise, house tenon sempre dopo (dt)tenon.
-- 2021/12/15 Corretta CompareFeature (risultato deve essere simmetrico scambiando le feature).
-- 2021/12/20 Ulteriore correzione a CompareFeature (caso con entrambe senza geometria).
-- Tabella per definizione modulo
local BeamExec = {}
@@ -461,6 +462,10 @@ local function OrderFeatures( vProc, b3Raw)
if B2.Flg == 0 and B1.Flg ~= 0 then
return true
end
-- se entrambi disabilitati seguo l'Id
if B1.Flg == 0 and B2.Flg == 0 then
return ( B1.Id < B2.Id)
end
-- se primo è intestazione va sempre prima
if Hcut.Identify( B1) then
return true
@@ -493,7 +498,7 @@ local function OrderFeatures( vProc, b3Raw)
not ( LapJoint.Identify( B2) or Mortise.Identify( B2) or DtMortise.Identify( B2)) then
return false
end
-- se entrambi di testa e secondo è scasso o mortasa va lasciato dopo
-- se entrambi di testa e secondo è scasso o mortasa e primo no va lasciato dopo
if B1.Head and B2.Head and ( LapJoint.Identify( B2) or Mortise.Identify( B2) or DtMortise.Identify( B2)) and
not ( LapJoint.Identify( B1) or Mortise.Identify( B1) or DtMortise.Identify( B1)) then
return true
@@ -506,12 +511,14 @@ local function OrderFeatures( vProc, b3Raw)
if B2.Tail and ( Split.Identify( B1) or not B1.Tail) then
return true
end
-- se primo è scasso o mortasa di coda, sempre dopo tutto
if B1.Tail and ( LapJoint.Identify( B1) or Mortise.Identify( B1) or DtMortise.Identify( B1)) then
-- se primo è scasso o mortasa di coda e secondo no, sempre dopo
if B1.Tail and ( LapJoint.Identify( B1) or Mortise.Identify( B1) or DtMortise.Identify( B1)) and
not ( B2.Tail and ( LapJoint.Identify( B2) or Mortise.Identify( B2) or DtMortise.Identify( B2))) then
return false
end
-- se secondo è scasso o mortasa di coda, sempre dopo tutto
if B2.Tail and ( LapJoint.Identify( B2) or Mortise.Identify( B2) or DtMortise.Identify( B2)) then
-- se secondo è scasso o mortasa di coda e primo no, va lasciato dopo
if B2.Tail and ( LapJoint.Identify( B2) or Mortise.Identify( B2) or DtMortise.Identify( B2)) and
not ( B1.Tail and ( LapJoint.Identify( B1) or Mortise.Identify( B1) or DtMortise.Identify( B1))) then
return true
end
-- se primo è taglio longitudinale completo o altra lav. lunga, dopo tutte le altre feature non di coda
@@ -567,7 +574,7 @@ local function OrderFeatures( vProc, b3Raw)
elseif abs( B1.Box:getCenter():getZ() - B2.Box:getCenter():getZ()) > 0.1 * ( B1.Box:getDimZ() + B2.Box:getDimZ()) then
return B1.Box:getCenter():getZ() > B2.Box:getCenter():getZ()
else
return B1.Box:getCenter():getX() > B2.Box:getCenter():getX()
return ( B1.Id < B2.Id)
end
end