DataBeam :

- piccole migliorie.
This commit is contained in:
Dario Sassi
2019-08-07 10:05:40 +00:00
parent ca0630ad2a
commit e865cc6726
3 changed files with 15 additions and 7 deletions
+6 -3
View File
@@ -389,9 +389,9 @@ local function OrderFeatures( vProc, b3Raw)
return B1.Head
end
-- confronto standard
if abs( B1.Box:getCenter():getX() - B2.Box:getCenter():getX()) > 0.5 * ( B1.Box:getDimX() + B2.Box:getDimX()) then
if abs( B1.Box:getCenter():getX() - B2.Box:getCenter():getX()) > 0.4 * ( B1.Box:getDimX() + B2.Box:getDimX()) then
return B1.Box:getCenter():getX() > B2.Box:getCenter():getX()
elseif abs( B1.Box:getCenter():getY() - B2.Box:getCenter():getY()) > 0.5 * ( B1.Box:getDimY() + B2.Box:getDimY()) then
elseif abs( B1.Box:getCenter():getY() - B2.Box:getCenter():getY()) > 0.4 * ( B1.Box:getDimY() + B2.Box:getDimY()) then
return B1.Box:getCenter():getY() > B2.Box:getCenter():getY()
else
return B1.Box:getCenter():getZ() > B2.Box:getCenter():getZ()
@@ -408,7 +408,10 @@ local function OrderFeatures( vProc, b3Raw)
if ProcJ.Prc == 40 and ProcJ.Head == ProcI.Head and ProcJ.Tail == ProcI.Tail and
abs( ProcJ.Diam - ProcI.Diam) < 1.0 and abs( ProcJ.Box:getCenter():getX() - ProcI.Box:getCenter():getX()) < 600.0 then
if j > i + 1 then
table.insert( vProc, i + 1, table.remove( vProc, j))
local ProcK = vProc[i+1]
if ProcK.Prc ~= 40 or abs( ProcK.Diam - ProcJ.Diam) > 1.0 or ProcJ.Box:getCenter():getX() < ProcK.Box:getCenter():getX() then
table.insert( vProc, i + 1, table.remove( vProc, j))
end
end
break
end