- altri piccoli miglioramenti legati al riconoscimento topologia

This commit is contained in:
luca.mazzoleni
2023-07-07 18:07:11 +02:00
parent 51e1425921
commit 3ca0ab1692
3 changed files with 39 additions and 26 deletions
+23 -19
View File
@@ -402,27 +402,31 @@ end
-------------------------------------------------------------------------------------------------------------
-- restituisce le facce del grezzo interessate dalla feature Proc
function WallLib.GetProcessAffectedFaces( Proc, nPartId)
local b3Part = EgtGetBBoxGlob( nPartId, GDB_BB.STANDARD)
function WallLib.GetProcessAffectedFaces( Proc)
local nBoxSolidId = EgtGetFirstNameInGroup( Proc.PartId or GDB_ID.NULL, 'Box')
local b3Part = EgtGetBBoxGlob( nBoxSolidId, GDB_BB.STANDARD)
local vtFacesAffected = { Bottom = false, Back = false, Top = false, Front = false, Left = false, Right = false}
if Proc.Box:getMin():getZ() < b3Part:getMin():getZ() + 10 * GEO.EPS_SMALL then
vtFacesAffected.Bottom = true
end
if Proc.Box:getMax():getY() > b3Part:getMax():getY() - 10 * GEO.EPS_SMALL then
vtFacesAffected.Back = true
end
if Proc.Box:getMax():getZ() > b3Part:getMax():getZ() - 10 * GEO.EPS_SMALL then
vtFacesAffected.Top = true
end
if Proc.Box:getMin():getY() < b3Part:getMin():getY() + 10 * GEO.EPS_SMALL then
vtFacesAffected.Front = true
end
if Proc.Box:getMin():getX() < b3Part:getMin():getX() + 10 * GEO.EPS_SMALL then
vtFacesAffected.Left = true
end
if Proc.Box:getMax():getX() > b3Part:getMax():getX() - 10 * GEO.EPS_SMALL then
vtFacesAffected.Right = true
if Proc.Box and not Proc.Box:isEmpty() then
if Proc.Box:getMin():getZ() < b3Part:getMin():getZ() + 10 * GEO.EPS_SMALL then
vtFacesAffected.Bottom = true
end
if Proc.Box:getMax():getY() > b3Part:getMax():getY() - 10 * GEO.EPS_SMALL then
vtFacesAffected.Back = true
end
if Proc.Box:getMax():getZ() > b3Part:getMax():getZ() - 10 * GEO.EPS_SMALL then
vtFacesAffected.Top = true
end
if Proc.Box:getMin():getY() < b3Part:getMin():getY() + 10 * GEO.EPS_SMALL then
vtFacesAffected.Front = true
end
if Proc.Box:getMin():getX() < b3Part:getMin():getX() + 10 * GEO.EPS_SMALL then
vtFacesAffected.Left = true
end
if Proc.Box:getMax():getX() > b3Part:getMax():getX() - 10 * GEO.EPS_SMALL then
vtFacesAffected.Right = true
end
end
return vtFacesAffected
end