- 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:
+13
-2
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user