This commit is contained in:
2026-05-06 14:37:36 +08:00
parent aa3b4b93f6
commit 2a25f21ee5
7 changed files with 23 additions and 23 deletions
+4 -4
View File
@@ -71,14 +71,14 @@ class ShapeGraphBuilder:
from OCC.Core.BRepBndLib import brepbndlib_Add
from OCC.Core.TopTools import TopTools_IndexedDataMapOfShapeListOfShape
from OCC.Core.TopExp import topexp_MapShapesAndAncestors
from OCC.Core.TopoDS import TopoDS_Face, TopoDS_Edge
from OCC.Core.TopoDS import TopoDS_Face, TopoDS_Edge, topods
faces = []
face_features = []
explorer = TopExp_Explorer(shape, TopAbs_FACE)
while explorer.More():
face = TopoDS_Face(explorer.Current())
face = topods.Face(explorer.Current())
features = self._extract_face_features(face)
if features is not None:
faces.append(face)
@@ -98,13 +98,13 @@ class ShapeGraphBuilder:
edge_features_list = []
for i in range(1, edge_map.Extent() + 1):
edge = TopoDS_Edge(edge_map.FindKey(i))
edge = topods.Edge(edge_map.FindKey(i))
face_list = edge_map.FindFromIndex(i)
connected_faces = []
it = face_list.begin()
while it != face_list.end():
f = TopoDS_Face(it.Value())
f = topods.Face(it.Value())
try:
idx = faces.index(f)
connected_faces.append(idx)