- aggiunta funzione per pulire l'outloop di un part creato come edge.

This commit is contained in:
Daniele Bariletti
2025-02-27 14:30:00 +01:00
parent 89b6b80260
commit ebe2f0dd22
+22
View File
@@ -130,6 +130,28 @@ local function FindEdges(nLay, tbInfo)
return tbId
end
function TOOL.ReorganizeEdges()
if not TOOL.nId or TOOL.nId == GDB_ID.NULL then return end
local tbLayer = TOOL.FindLayers(TOOL.nId)
local tbEdges = {}
local nEdgeId = EgtGetFirstInGroup(tbLayer["OutLoop"])
while nEdgeId and nEdgeId ~= GDB_ID.NULL do
table.insert(tbEdges, nEdgeId)
nEdgeId = EgtGetNext(nEdgeId)
end
local nLoop = EgtCurveCompoByChain(tbLayer["OutLoop"], tbEdges, EgtSP(tbEdges[1], GDB_RT.GLOB), true, GDB_RT.GLOB)
TOOL.ExplodeAndNameEdges(nLoop, false)
-- se trovo compo nel layer outloop le cancello
nEdgeId = EgtGetFirstInGroup(tbLayer["OutLoop"])
local nNextEdge = nEdgeId
while nNextEdge and nNextEdge ~= GDB_ID.NULL do
nNextEdge = EgtGetNext(nEdgeId)
if EgtGetType(nEdgeId) == GDB_TY.CRV_COMPO then EgtErase(nEdgeId) end
nEdgeId = nNextEdge
end
end
local function FillInfoTable()
if TOOL.nId then TOOL.tbInfo.nId = TOOL.nId end
if TOOL.nEdgeId then TOOL.tbInfo.nEdgeId = TOOL.nEdgeId end