1. 删除不存在的 using vde::core::Transform3D/Plane3D 2. 移除两个过早关闭 vde::brep 命名空间的 } (原行431/946) 3. 移除匿名空间内重复的 extract_face_fragment/classify_point_adaptive 前向声明 GCC 10.2.1 -fsyntax-only 通过 (0 errors)
3.6 KiB
VDE-018: ssi_boolean.cpp regression — face_bounds ambiguity, mesh/curves lookup, enum values
- ID: VDE-018
- Date: 2026-07-28
- Status: Fixed
- Severity: Critical
- Category: COMPILE / GCC Compatibility
- Source: ViewDesign fea/viewdesign-engine branch
Issue
The merge of VDE-016 fix (2f69f06) and the subsequent main branch update (ff4c8d3)
introduced a regression in ssi_boolean.cpp that breaks GCC builds. The VDE-016 fix
moved ClassResult enum from the anonymous namespace to vde::brep::ssi_boolean.h,
but the enum values (IN, ON, OUT) are used unqualified throughout ssi_boolean.cpp.
The subsequent attempt at fix (d5c00a0, July 28) only reordered #include <iterator>
and did not address the root causes.
Build Errors (GCC/MSVC with /permissive-)
error: 'OUT' was not declared in this scope; did you mean 'vde::brep::OUT'?
error: 'IN' was not declared in this scope; did you mean 'vde::brep::IN'?
error: 'ON' was not declared in this scope; did you mean 'vde::brep::ON'?
error: call of overloaded 'face_bounds(const vde::brep::BrepModel&, int)' is ambiguous
- candidate 1: anonymous ns definition (line 434)
- candidate 2: vde::brep forward declaration (line 42)
error: 'get_mesh' was not declared in this scope
error: 'core' has not been declared (in 'core::exact_orient3d')
error: 'SSIBooleanResult' does not name a type
error: 'curves' is not a class, namespace, or enumeration
error: expected declaration before '}' token
Root Causes
- ClassResult enum moved to header (
ssi_boolean.h:51) but values (IN/ON/OUT) used unqualified in anonymous namespace - face_bounds/face_normal forward-declared in vde::brep namespace (line 42-43) but defined in anonymous namespace — GCC sees both as candidates
- get_mesh defined as static in anonymous namespace but called from functions outside it (e.g.,
classify_face_fragment) - core::exact_orient3d requires vde::core namespace qualification in GCC two-phase lookup
- SSIBooleanResult only forward-declared in header, not visible in anonymous namespace
- curves::intersect_surfaces lookup fails when
using namespace vdenot in scope
Suggested Fix
Root cause: The merge of VDE-016 moved ClassResult from anonymous namespace to the public header, but ssi_boolean.cpp on main had three separate issues:
using vde::core::Transform3D;andusing vde::core::Plane3D;— these types don't exist in vde::core- Two premature
} // anonymous namespaceclosures at lines 431 and 946 that closedvde::brepnamespace early, pushing all subsequent functions (face_bounds, face_normal, classify_face_fragment, etc.) to global scope where BrepModel was not visible - Duplicate forward declarations of
extract_face_fragmentandclassify_point_adaptiveinside the anonymous namespace that created ambiguity with the actual definitions invde::brep
Fix applied (v1.0.1):
- Removed invalid
using vde::core::Transform3D;andusing vde::core::Plane3D; - Removed the two premature
}closures, keeping all code withinnamespace vde::brep { ... } - Removed unused forward declarations from anonymous namespace
GCC 10.2.1 -fsyntax-only passes cleanly (0 errors).
Known-Good Version
ssi_boolean.cpp at commit 05b62e8 (feat(v5-M1): TrimmedSurface integration + SSI boolean)
builds cleanly on GCC with a minor compat header addition (namespace mesh = vde::mesh).
Current ViewDesign Workaround
Reverted ssi_boolean.cpp to 05b62e8. Only this one file is reverted; the other 48+
vde_brep .cpp files use latest API. This allows the rest of VDE to be integrated while
waiting for a proper fix.