- in FACEBYBLADE modifiche e refactoring per contemplare nuova gestione DownUp
This commit is contained in:
+21
-20
@@ -218,12 +218,7 @@ end
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
function FaceData.IsFaceRectangular( Face)
|
||||
-- recupero gruppo per geometrie temporanee
|
||||
local bIsTempGroupToDelete = false
|
||||
local idTempGroup = BeamLib.GetTempGroup()
|
||||
if not idTempGroup then
|
||||
idTempGroup = BeamLib.CreateTempGroup()
|
||||
bIsTempGroupToDelete = true
|
||||
end
|
||||
|
||||
local nContourId, nContourCnt = EgtExtractSurfTmFacetLoops( Face.idTrimesh, Face.id, idTempGroup)
|
||||
if nContourCnt > 1 then
|
||||
@@ -232,23 +227,13 @@ function FaceData.IsFaceRectangular( Face)
|
||||
|
||||
local bIsRectangular = EgtCurveIsARectangle( nContourId)
|
||||
|
||||
-- se necessario, elimino il gruppo temporaneo
|
||||
if bIsTempGroupToDelete then
|
||||
EgtErase( idTempGroup)
|
||||
end
|
||||
|
||||
return bIsRectangular
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
function FaceData.IsFaceRhomboid( Face)
|
||||
-- recupero gruppo per geometrie temporanee
|
||||
local bIsTempGroupToDelete = false
|
||||
local idTempGroup = BeamLib.GetTempGroup()
|
||||
if not idTempGroup then
|
||||
idTempGroup = BeamLib.CreateTempGroup()
|
||||
bIsTempGroupToDelete = true
|
||||
end
|
||||
|
||||
local nContourId, nContourCnt = EgtExtractSurfTmFacetLoops( Face.idTrimesh, Face.id, idTempGroup)
|
||||
if nContourCnt > 1 then
|
||||
@@ -265,14 +250,30 @@ function FaceData.IsFaceRhomboid( Face)
|
||||
bIsRhomboid = true
|
||||
end
|
||||
|
||||
-- se necessario, elimino il gruppo temporaneo
|
||||
if bIsTempGroupToDelete then
|
||||
EgtErase( idTempGroup)
|
||||
end
|
||||
|
||||
return bIsRhomboid
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- calcola l'elevazione di un lato rispetto al box passato
|
||||
function FaceData.GetEdgeElevationInBBox( Face, Edge, b3Raw )
|
||||
-- recupero gruppo per geometrie temporanee
|
||||
local idTempGroup = BeamLib.GetTempGroup()
|
||||
|
||||
-- costruzione trimesh rettangolare centrata sul lato
|
||||
-- TODO sostituire EgtSurfTmFacetOppositeSide con punti direttamente in Edge
|
||||
local ptEdge1, _, ptEdge2 = EgtSurfTmFacetOppositeSide( Face.idTrimesh, Face.id, -Edge.vtN, GDB_ID.ROOT)
|
||||
local vtEdge = ptEdge2 - ptEdge1
|
||||
local vtMove = ( Edge.vtN ^ vtEdge)
|
||||
local ptRectangleVertex1 = ptEdge1 + vtMove * 100 * GEO.EPS_SMALL
|
||||
local ptRectangleVertex2 = ptEdge2 + vtMove * 100 * GEO.EPS_SMALL
|
||||
local ptRectangleVertex3 = ptEdge1 - vtMove * 100 * GEO.EPS_SMALL
|
||||
local idEdgeTrimesh = EgtSurfTmRectangle( idTempGroup, ptRectangleVertex1, ptRectangleVertex2, ptRectangleVertex3, GDB_RT.GLOB)
|
||||
|
||||
local dElevation = EgtSurfTmFacetElevationInBBox( idEdgeTrimesh, 0, b3Raw, true, GDB_ID.ROOT)
|
||||
|
||||
return dElevation
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
local function CompareEdgesBottomFace( EdgeA, EdgeB)
|
||||
-- prima i lati con facce adiacenti
|
||||
|
||||
Reference in New Issue
Block a user