Octree(src/spatial/octree.cpp): - 根因:subdivide() 在 nodes.reserve() 之前取 OctreeNode& 引用,扩容后 node.children[i] 写入悬垂内存 → InsertMultiple SEGFAULT;subdivide_recursive / insert_recursive 同样持引用跨扩容。 - 修复:改为快照 + 按索引 append,不在 vector 扩容期间持有引用;子节点改默认 构造后 children.fill(-1)(避免聚合初始化把 children 置 0 造成"每个子节点都像 内部节点"的无限递归);remove_from_node 改为无引用实现;根包围盒扩张语义 文档化并补回归(越界项保留在节点、仍可查询/删除)。 - 新增回归:多级细分查询、根扩张后插入可查询。 ThreadSafeObjectPool(include/vde/core/object_pool.h): - 根因:static thread_local 池被所有实例共享且生命周期长于实例;release() 会把 任意来源指针塞进当前线程池,实例销毁后仍留下悬垂指针 → 下次 acquire 返回已 释放内存(0xc0000374 堆破坏)。 - 修复:改为每实例 mutex + 私有 ObjectPool + 原子计数(不再跨实例/跨线程混用 指针),API 保持兼容;单线程 ObjectPool 语义不变。 - 新增回归:双实例隔离、同线程重复创建销毁 200 轮、跨线程 release。
Build system: fix VDE_BUILD_TYPE, MinGW big-obj, cross-platform temp dir Core fixes: Matrix4D inverse, ExactPredicates sign, GJK overflow, VdeFormat weights, VRML/Collada IO Test fixes: ObjectPool, Transaction paths, /tmp replacement, Matrix4D expectations Result: 292/295 fast tests pass (99%)
M1 — Memory Pool (内存池): - ObjectPool<T>: O(1) acquire/release with free-list, chunk-based expansion - ThreadSafeObjectPool<T>: per-thread local pools with global fallback - CowPtr<T>: copy-on-write smart pointer with shallow/deep copy - 10 tests: single/multi-thread, CoW detach, reuse rate M2 — Parallel Boolean (并行布尔): - parallel_face_face_intersection(): OpenMP face-pair dispatch with AABB culling - parallel_classify_faces(): thread-safe ray casting classification - parallel_mesh_union/intersection/difference + B-Rep variants - Thread count management API - 12 tests: coverage, empty cases, identity operations M3 — Parallel Marching Cubes (并行MC): - parallel_marching_cubes(): Z-slice parallel voxel processing - parallel_adaptive_mc(): octree-based adaptive resolution - Complete 256-entry edge table + Möller-Trumbore interpolation - 5 tests: sphere basic/high-res/empty/adaptive/threaded M4 — Parallel Surface Intersection (并行求交): - parallel_curve_intersections(): per-pair parallel dispatch - parallel_surface_intersection(): recursive subdivision + Newton refinement - AABB broad-phase culling before narrow-phase - 4 tests: curve pairs, surface batch M5 — GMP Exact Predicates (精确谓词): - exact_orient2d/3d: adaptive precision (double → GMP fallback) - exact_in_sphere: circumsphere test with degenerate handling - exact_point_in_polygon/polyhedron: robust ray casting - PrecisionMode: Fast/Adaptive/Exact with global toggle - 12 tests: all orientations, boundary cases, mode switching 21 files, +2263 lines