Skip to content

Commit c4c9e83

Browse files
[FXC-5651] fix: filter out MirroredSurface in compute_obb()
SurfaceSelector expansion can return MirroredSurface entities which lack private_attribute_sub_components and have no tessellation data. Now filters to Surface instances only before collecting face IDs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ed456b3 commit c4c9e83

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • flow360/component/simulation/draft_context

flow360/component/simulation/draft_context/context.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,17 @@ class _MockEntityList:
420420
else:
421421
surface_list = entities
422422

423+
# Filter to Surface only (selector expansion may include MirroredSurface
424+
# which lacks sub_components and has no tessellation data)
425+
non_surface = [s for s in surface_list if not isinstance(s, Surface)]
426+
if non_surface:
427+
names = [s.name for s in non_surface]
428+
log.warning(
429+
f"compute_obb(): skipping {len(non_surface)} non-Surface entity(ies) "
430+
f"(e.g. MirroredSurface) — not yet supported: {names}"
431+
)
432+
surface_list = [s for s in surface_list if isinstance(s, Surface)]
433+
423434
# Collect face IDs from surface sub-components
424435
face_ids = []
425436
for surface in surface_list:

0 commit comments

Comments
 (0)