BIM: Fix duplicate vertices in Wavefront OBJ export

Fixes: #13151.

The vertices derived from a face's outerwire could contain duplicates.

Fixed by switching to:
`f.OuterWire.OrderedVertexes`

(cherry picked from commit b865c4625d)
This commit is contained in:
Roy-043
2025-12-01 17:54:29 +01:00
committed by Max Wilfinger
parent 12438b1999
commit 2b5213863b
+4 -5
View File
@@ -150,13 +150,12 @@ def getIndices(obj, shape, offsetv, offsetvn):
flist.append(fi)
else:
fi = ""
edges = f.OuterWire.OrderedEdges
verts = f.OuterWire.OrderedVertexes
# Avoid flipped normals:
if f.Orientation == "Reversed":
edges.reverse()
for e in edges:
v = e.Vertexes[0 if e.Orientation == "Forward" else 1]
ind = findVert(v, shape.Vertexes)
verts.reverse()
for vert in verts:
ind = findVert(vert, shape.Vertexes)
if ind is None:
return None, None, None, None
fi += " " + str(ind + offsetv)