- in FaceData GetEdgesInfo accetta anche l'id della trimesh

- in BLADETOWASTE varie modifiche per tagli a cubetti e tagli singoli
This commit is contained in:
luca.mazzoleni
2025-03-07 17:42:21 +01:00
parent ab2a381808
commit 0ccfb2bfe6
2 changed files with 109 additions and 56 deletions
+13 -2
View File
@@ -98,8 +98,19 @@ function FaceData.GetFacesByAdjacencyNumber( Proc)
end
-------------------------------------------------------------------------------------------------------------
local function GetEdgesInfo( Proc, idFace )
function FaceData.GetEdgesInfo( ProcOrId, idFace )
local Edges = {}
-- disambiguazione feature vs id trimesh
local Proc = {}
if type( ProcOrId) == "table" then
Proc = ProcOrId
elseif type( ProcOrId) == "number" then
Proc.id = ProcOrId
else
error( 'GetEdgesInfo : Only feature or trimesh supported')
end
local nFaceType, EdgesEgt = EgtSurfTmGetFacetOutlineInfo( Proc.id, idFace, GDB_ID.ROOT)
for i = 1, #EdgesEgt do
@@ -165,7 +176,7 @@ function FaceData.GetFacesInfo( Proc, Part)
local _, dLongEdgeDimension, dShortEdgeDimension = EgtSurfTmFacetMinAreaRectangle( Proc.id, i - 1, GDB_ID.ROOT)
Faces[i].dArea = dShortEdgeDimension * dLongEdgeDimension
local nFaceType, Edges = GetEdgesInfo( Proc, i - 1)
local nFaceType, Edges = FaceData.GetEdgesInfo( Proc, i - 1)
Faces[i].bIsOkForMachining = nFaceType < 1
Faces[i].Edges = Edges