feat(v4.2): shared topology + precise tolerance system
CI / Build & Test (push) Failing after 1m36s
CI / Release Build (push) Failing after 35s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled

- make_box: shared 8 vertices + edge dedup (was 24 vertices, now 8)
- ToleranceConfig: per-operation tolerances, global config
- fuzzy_equal/zero/gt/lt/gte/lte with absolute+relative tolerance
- fuzzy vector/point/parallel/perpendicular helpers
- adaptive_tolerance: scales with model size
- 14 tolerance tests
This commit is contained in:
茂之钳
2026-07-25 04:07:24 +00:00
parent 2e004fda6d
commit d9b0c6af77
6 changed files with 274 additions and 1 deletions
+1
View File
@@ -153,6 +153,7 @@ add_library(vde_brep STATIC
brep/incremental_update.cpp
brep/large_assembly.cpp
brep/format_io.cpp
brep/tolerance.cpp
brep/modeling.cpp
brep/brep_drawing.cpp
brep/step_export.cpp
+25
View File
@@ -0,0 +1,25 @@
#include "vde/brep/tolerance.h"
#include "vde/brep/brep.h"
namespace vde::brep {
// Global tolerance config
static ToleranceConfig g_global_tolerance;
const ToleranceConfig& ToleranceConfig::global() {
return g_global_tolerance;
}
void ToleranceConfig::set_global(const ToleranceConfig& cfg) {
g_global_tolerance = cfg;
}
double model_tolerance(const BrepModel& body) {
auto bb = body.bounds();
if (bb.min().x() > bb.max().x()) return 1e-6;
double extent = bb.extent().norm();
return adaptive_tolerance(extent);
}
} // namespace vde::brep