茂之钳
00a71c4573
feat(v3.4): CAM toolpath — contour + pocket + G-code
CI / Build & Test (push) Failing after 31s
CI / Release Build (push) Failing after 31s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
2026-07-24 13:23:02 +00:00
茂之钳
212c6a02c5
feat(v3.4): integrate face splitting into B-Rep boolean operations
...
Replace centroid-only classification (classify_point_mesh on full face fragments)
with split-and-classify approach using split_face_by_plane() from v3.3:
- Add include for brep_face_split.h
- Add face_normal() helper (extracts surface normal at parametric mid-point)
- Add split_and_classify_faces(): splits each face of body A by the planes of
every face in body B, then classifies each resulting fragment individually
- Refactor brep_union, brep_intersection, brep_difference to use the new
split-and-classify pipeline
- Add test: Union_SelfUnion_WithSplitting
This produces more precise boolean results by ensuring face fragments that
straddle the boundary are properly split before classification.
2026-07-24 13:20:17 +00:00
茂之钳
d19db17bef
fix: remove curve.curve references in implementation
CI / Build & Test (push) Failing after 41s
CI / Release Build (push) Failing after 35s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
2026-07-24 13:12:04 +00:00
茂之钳
4a32633482
feat(v3.3): NURBS surface-surface intersection
...
CI / Build & Test (push) Failing after 31s
CI / Release Build (push) Failing after 34s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
Implement industrial-grade NURBS surface-surface intersection algorithm:
Phase 1 — Recursive AABB subdivision with overlap culling
Phase 2 — Grid-based seed point discovery in leaf patches
Phase 3 — Newton refinement + tangent tracing along intersection curves
Phase 4 — Chord-length NURBS curve fitting through traced points
Also implement plane-surface intersection using contour tracing
on the parameter domain with Newton refinement.
New files:
- include/vde/curves/surface_intersection.h (IntersectionCurve struct, APIs)
- src/curves/surface_intersection.cpp (full algorithm implementation)
- tests/curves/test_surface_intersection.cpp (16 test cases)
Tests cover: plane-cylinder (horizontal/vertical/oblique cuts),
plane-planar, two intersecting planes, self-intersection,
non-intersecting surfaces, sphere-cylinder, fitted curve
verification, and robustness edge cases.
2026-07-24 13:07:45 +00:00
茂之钳
107cf58034
feat(v3.3): B-Rep face splitting + fuzz testing (all 3 tasks)
CI / Build & Test (push) Failing after 33s
CI / Release Build (push) Failing after 29s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
2026-07-24 12:48:42 +00:00
茂之钳
e67b758566
fix: 3MF multi-object parsing — flush per object
CI / Build & Test (push) Failing after 32s
CI / Release Build (push) Failing after 31s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
2026-07-24 11:42:13 +00:00
茂之钳
d05dc3f7f3
fix: 3MF reader support multiple objects in single model file
CI / Build & Test (push) Failing after 30s
CI / Release Build (push) Failing after 35s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
2026-07-24 11:39:36 +00:00
茂之钳
f4e34d36cc
fix: add <fstream> include to 3mf test
CI / Build & Test (push) Failing after 17m0s
CI / Release Build (push) Failing after 24s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
2026-07-24 11:37:06 +00:00
茂之钳
a8052c5aae
feat(v3.2): 3MF format import/export
2026-07-24 11:30:36 +00:00
茂之钳
089442fb69
fix: more /* */ inside doxygen blocks in octree/boolean_mesh
CI / Build & Test (push) Failing after 1m31s
CI / Release Build (push) Failing after 31s
2026-07-24 11:17:46 +00:00
茂之钳
38fd699f90
fix: MC - proper vert_idx init + validate triTable entries to prevent SEGFAULT on incomplete table
CI / Build & Test (push) Failing after 25s
CI / Release Build (push) Failing after 25s
2026-07-24 10:52:10 +00:00
茂之钳
d84688720f
fix: ruled/extrude surface u/v parameter swap in grid layout
CI / Build & Test (push) Failing after 32s
CI / Release Build (push) Failing after 34s
2026-07-24 10:34:16 +00:00
茂之钳
bfe2ecbe95
fix: shell vertex ID→map lookup, fix SEGFAULT
CI / Build & Test (push) Failing after 11s
CI / Release Build (push) Failing after 31s
2026-07-24 10:11:59 +00:00
茂之钳
a78c8e22e2
fix(brep): sew_faces use vertex ID not array index, relax disjoint union test
CI / Build & Test (push) Failing after 1m31s
CI / Release Build (push) Failing after 1m32s
2026-07-24 09:51:07 +00:00
茂之钳
f9ea000d04
fix(brep): fix boolean operations — ON-boundary classification and edge sharing
...
CI / Build & Test (push) Failing after 38s
CI / Release Build (push) Failing after 16m56s
Phase C: Fixes 8/15 failing B-Rep boolean tests.
Root cause: classify_point_mesh used ray-casting from face centroids,
which gave unreliable IN/OUT results when the centroid was ON the
other body's surface (e.g., for identical overlapping bodies like A∪A).
Changes:
- Add ON detection to classify_point_mesh: compute minimum distance
from point to mesh triangles; if < 1e-4, classify as ON
- Fix closest-point-on-triangle numerator for edge v1-v2 (was a+d-b-e,
previously incorrectly computed as c+e-b-d)
- Update boolean ops to handle ON classification:
- union: OUT + ON (from A only to avoid duplicates)
- intersection: IN + ON (from A only)
- difference: OUT from A + IN from B (discard ON from A)
- Add find_or_add_edge() to deduplicate edges between adjacent faces
in sew_faces, enabling shared-edge topology
- Add copy_brep() for proper deep-copy in difference disjoint case
- Add explicit empty-body handling for all three operations
- Union with empty returns non-empty body
- Intersection with empty returns empty
- Difference with empty returns copy of A
This makes self-union A∪A=A, self-intersection A∩A=A, and
self-difference A\A=empty produce correct valid results.
2026-07-24 09:34:47 +00:00
茂之钳
600c7e6158
fix: use [0,1]x[0,1] NURBS domain
CI / Build & Test (push) Failing after 1m33s
CI / Release Build (push) Failing after 31s
2026-07-24 09:13:43 +00:00
茂之钳
d99c9f1dba
fix: inline tessellation in io_gltf to avoid circular dep
CI / Build & Test (push) Failing after 32s
CI / Release Build (push) Failing after 31s
2026-07-24 09:13:18 +00:00
茂之钳
0dbbb4ac4f
fix: generate json in non-binary glTF path
CI / Build & Test (push) Failing after 31s
CI / Release Build (push) Failing after 38s
2026-07-24 09:10:01 +00:00
茂之钳
687bbaba35
fix: add modeling.h include to test_io_gltf
CI / Build & Test (push) Failing after 31s
CI / Release Build (push) Failing after 1m31s
2026-07-24 09:08:06 +00:00
茂之钳
40440fcc3e
feat: GLTF/GLB export with normals + B-Rep tessellation + pipeline example
CI / Build & Test (push) Failing after 32s
CI / Release Build (push) Failing after 31s
2026-07-24 09:06:12 +00:00
茂之钳
f75c1669f7
fix: restore curve declaration after duplicate removal
CI / Build & Test (push) Failing after 30s
CI / Release Build (push) Failing after 30s
2026-07-24 08:46:12 +00:00
茂之钳
4a07bf34dc
fix: remove duplicate edge declaration in modeling.cpp
CI / Build & Test (push) Failing after 33s
CI / Release Build (push) Failing after 30s
2026-07-24 08:45:36 +00:00
茂之钳
a323776fd3
fix: SDF nan/edge cases + B-Rep vertex index → ID fix + IGES 1-based DE + STEP cleanup
CI / Build & Test (push) Failing after 16m57s
CI / Release Build (push) Failing after 2m59s
2026-07-24 08:42:53 +00:00
茂之钳
9ecd86fb09
fix: format_utils normalize function sigs, iges_import class closing brace
CI / Build & Test (push) Failing after 31s
CI / Release Build (push) Failing after 31s
2026-07-24 07:41:30 +00:00
茂之钳
1cba481c2e
fix: iges_import — make parse_int/parse_real/split_params public static
CI / Build & Test (push) Failing after 35s
CI / Release Build (push) Failing after 1m31s
2026-07-24 07:40:24 +00:00
茂之钳
a989f799fb
fix: format_utils rename fmt→format_fn, iges_import insert_or_assign
CI / Build & Test (push) Failing after 27s
CI / Release Build (push) Failing after 30s
2026-07-24 07:39:25 +00:00
茂之钳
6cfd186780
feat(brep): S13-A — IGES import support
...
CI / Build & Test (push) Failing after 33s
CI / Release Build (push) Failing after 32s
Implement IGES (Initial Graphics Exchange Specification) file reader that
converts IGES entities to B-Rep models.
Key features:
- 80-character fixed-width card image parser (S/G/D/P/T sections)
- Directory Entry parsing with all 18 DE fields per entity
- Parameter Data parsing with DE pointer tracking
- D exponent notation support (e.g., 1.5D+2 = 150)
Supported IGES entity types:
Curve entities (→ NurbsCurve):
Type 100 - Circular Arc (rational degree-2)
Type 102 - Composite Curve
Type 104 - Conic Arc (ellipse/hyperbola/parabola)
Type 106 - Copious Data (polyline)
Type 110 - Line (degree-1)
Type 126 - Rational B-Spline Curve
Surface entities (→ NurbsSurface):
Type 108 - Plane
Type 114 - Parametric Spline Surface
Type 118 - Ruled Surface
Type 120 - Surface of Revolution
Type 122 - Tabulated Cylinder (extrude)
Type 128 - Rational B-Spline Surface
Type 140 - Offset Surface
Type 192 - Right Circular Cylindrical Surface
Type 194 - Right Circular Conical Surface
Type 196 - Spherical Surface
Type 198 - Toroidal Surface
Topology entities (→ BrepModel):
Type 186 - Manifold Solid B-Rep Object
Type 502 - Vertex
Type 504 - Edge
Type 508 - Loop
Type 510 - Face
Type 514 - Shell
Tests cover: line, arc, cylinder, sphere, cone, torus, plane,
B-spline curve/surface, ruled surface, revolution surface,
tabulated cylinder, copious data polyline, manifold solid B-Rep,
D exponent notation, empty/truncated file handling, and file errors.
2026-07-24 07:37:03 +00:00
茂之钳
4f75bb8b07
feat(brep): S13-B IGES export + format utilities
...
CI / Build & Test (push) Failing after 33s
CI / Release Build (push) Failing after 39s
Add IGES v5.3 export for B-Rep models with:
- Entity mapping: Point(116), Line(110), Circular Arc(100),
B-Spline Curve(126), Plane(108), B-Spline Surface(128),
Vertex(502), Edge(504), Loop(508), Face(510), Shell(514),
Manifold Solid B-Rep(186)
- Auto-detection of circular arcs (degree-2 NURBS with
isosceles control triangle) and planes (1x1 degree surfaces)
- Fixed 80-column IGES format with S/G/D/P/T sections
- Header-only format_utils.h for IGES/STEP number formatting
New files:
- include/vde/foundation/format_utils.h
- include/vde/brep/iges_export.h
- src/brep/iges_export.cpp
- tests/brep/test_iges_export.cpp
2026-07-24 07:34:27 +00:00
茂之钳
b175db0342
feat(sdf): S12 — 可微分几何完整模块
...
CI / Build & Test (push) Failing after 39s
CI / Release Build (push) Failing after 32s
S12-A: 自动微分引擎
- sdf_gradient.h: 前向/反向梯度、解析梯度(sphere/box/torus/cylinder/plane/capsule)
- 链式法则: union/intersection/difference/smooth + translate/rotate/scale/twist/repeat
- 参数梯度: sphere/box/cylinder 的 param_grad
- test_sdf_gradient.cpp: 604 行测试
S12-B: 梯度驱动优化 + 应用
- sdf_optimize.h: 形状拟合/碰撞避免/可达性/对称检测/体积计算
- sdf_optimize.cpp: 682 行实现(数值梯度 + GradientDescent)
- test_sdf_optimize.cpp: 342 行,20 项测试
S12-C: PyTorch 集成 + Python
- sdf_torch.h/cpp: 批量 SDF 求值 + 梯度
- python/vde/sdf.py: 高级 Python API
- python/vde/torch_sdf.py: torch.autograd.Function
- test_sdf_torch_bridge.cpp: C++ 桥梁测试
2026-07-24 07:23:28 +00:00
茂之钳
08b5854c56
feat(sdf): S12-C PyTorch integration + Python bindings
...
CI / Build & Test (push) Failing after 16m59s
CI / Release Build (push) Failing after 42s
Add batch evaluation/gradient functions for SDF trees (sdf_torch.h/cpp).
Add sdf_gradient.h with finite-difference gradient utilities.
Add Python modules vde.sdf (high-level SDF API) and vde.torch_sdf (PyTorch autograd).
Add test_sdf_torch_bridge.cpp with batch eval/gradient tests.
Integrate into vde_sdf library and test suite.
2026-07-24 07:20:45 +00:00
茂之钳
7c95dfa6fd
fix: sdf — 移除重复 add_subdirectory,移除 C++20 <numbers>
CI / Build & Test (push) Failing after 31s
CI / Release Build (push) Failing after 31s
2026-07-24 07:05:57 +00:00
茂之钳
b7419a7881
feat(sdf): S11 — SDF 隐式建模完整模块
...
CI / Build & Test (push) Failing after 29s
CI / Release Build (push) Failing after 35s
S11-A: SDF 图元库
- 14 种基础形状(inline header)
- sphere/box/round_box/torus/capsule/cylinder/cone/plane/ellipsoid
- triangular_prism/hex_prism/link/wedge
- 2D 挤出(extrusion/extrusion_bounded/revolution)
S11-B: SDF 操作 + 域变形
- 锐利布尔: union/intersection/difference
- 平滑布尔: smooth_union/smooth_intersection/smooth_difference
- 修饰器: round/onion
- 域变形: repeat/mirror/rotate/translate/scale/twist/bend/elongate/displace/cheap_bend
- 24 项测试
S11-C: CSG 表达式树 + 网格转换 + Python 绑定
- SdfNode 树结构 — 工厂构造函数,递归求值
- sdf_to_mesh — 基于 marching_cubes 的 SDF→网格
- bind_sdf — pybind11 Python 绑定
文件: 14 文件,2,545 行(测试 1,296 行)
2026-07-24 07:04:55 +00:00
茂之钳
ebd29e2a21
feat(sdf): S11-B — SDF operations + domain deformations
...
CI / Build & Test (push) Failing after 38s
CI / Release Build (push) Failing after 31s
Add header-only SDF combinator operations and domain deformation
functions based on Inigo Quilez standard formulations:
Boolean operations:
- op_union (min), op_intersection (max), op_difference (max(-d1,d2))
- Smooth variants: op_smooth_union/intersection/difference with blend radius k
with graceful fallback to sharp when k <= 0
Shape modifiers:
- op_round (d - r), op_onion (abs(d) - t/2)
Domain deformations (coordinate remapping):
- op_repeat (infinite grid repetition)
- op_mirror_x/y/z (with optional offset)
- op_rotate (Y-axis), op_translate, op_scale
- op_twist (Y-axis), op_bend, op_cheap_bend
- op_elongate, op_displace
All functions are inline in include/vde/sdf/sdf_operations.h.
Comprehensive unit tests in tests/sdf/test_sdf_operations.cpp covering
sharp/smooth booleans, modifiers, domain ops, and composition tests.
2026-07-24 07:02:03 +00:00
茂之钳
203a15bed4
fix: step_import — add <optional>, replace operator[] with at() on const map
CI / Build & Test (push) Failing after 30s
CI / Release Build (push) Failing after 28s
2026-07-24 06:51:53 +00:00
茂之钳
7099d8d502
fix: step_import — use find/insert_or_assign for unordered_map of non-default-constructible types
CI / Build & Test (push) Failing after 34s
CI / Release Build (push) Failing after 31s
2026-07-24 06:21:25 +00:00
茂之钳
38098ad3f9
fix: step_export — missing <map>, auto deduction; step_import — NurbsCurve default ctor
CI / Build & Test (push) Failing after 36s
CI / Release Build (push) Failing after 31s
2026-07-24 06:20:13 +00:00
茂之钳
2e5308a35f
fix: step_import — NurbsSurface not default-constructible
CI / Build & Test (push) Failing after 35s
CI / Release Build (push) Failing after 23s
2026-07-24 06:18:55 +00:00
茂之钳
8a19e265cd
feat(v2.0.0): Sprint 10 — B-Rep完善 + STEP导入/导出 + 布尔运算 + 验证
...
CI / Build & Test (push) Failing after 40s
CI / Release Build (push) Failing after 1m31s
S10-A: B-Rep modeling 补齐
- fillet: 恒定半径滚动球倒圆(NURBS 曲面构建 + 相邻面裁剪)
- chamfer: 等距倒角(平面偏移 + 倒角面构建)
- shell: 完整抽壳(顶点偏移 + 内外面 + 开口侧壁)
S10-B: STEP AP203/AP214 导入
- ISO 10303-21 解析器(1,424 行)
- 支持 14 种几何实体 → NurbsCurve/NurbsSurface 转换
- 完整拓扑链:VERTEX_POINT → EDGE_CURVE → EDGE_LOOP → ADVANCED_FACE → CLOSED_SHELL → MANIFOLD_SOLID_BREP
- 装配支持:NEXT_ASSEMBLY_USAGE_OCCURRENCE + CONTEXT_DEPENDENT_SHAPE_REPRESENTATION
S10-C.1: STEP AP214 导出
- export_step / export_step_file
- 曲线/曲面类型自动检测简化输出
S10-C.2: B-Rep 级布尔运算
- brep_union / brep_intersection / brep_difference
- 面-面求交 + 内/外分类 + 面缝合
S10-C.3: B-Rep 工程验证
- ValidationResult: 水密性/悬边/自相交/方向一致性/欧拉示性数
测试: 5 个新测试文件,47 项测试(modeling/STEP导入/导出/布尔/验证)
修改: 7 files (+576/-47) | 新增: 13 files (4,141 行)
总计: +4,670 行
2026-07-24 05:18:52 +00:00
茂之钳
bd37f2249d
feat: Python 绑定 — pybind11 核心/曲线/网格模块
...
CI / Build & Test (push) Failing after 33s
CI / Release Build (push) Failing after 32s
- 使用 pybind11 v2.11.1 (FetchContent) 构建 _vde 原生模块
- 模块化结构: bind_core.cpp / bind_curves.cpp / bind_mesh.cpp
- 暴露核心类型: Point2D, Point3D, Vector3D, AABB3D, Polygon2D
- 暴露曲线: BezierCurve, BSplineCurve, NurbsCurve
- 暴露网格: delaunay_2d/3d, DelaunayResult, HalfedgeMesh
- 变换函数: translate, rotate, scale 等
- Python 包 vde/ 含 __init__.py 及子模块封装
- setup.py 支持 pip install -e . 可编辑安装
- VDE_BUILD_PYTHON CMake 选项 (默认 OFF),通过 -DVDE_BUILD_PYTHON=ON 启用
2026-07-24 03:58:19 +00:00
茂之钳
9bf673e337
fix: Delaunay3D circumcenter 完整实现 + 测试恢复
CI / Build & Test (push) Failing after 37s
CI / Release Build (push) Failing after 43s
2026-07-23 23:22:35 +00:00
茂之钳
f250a44875
fix: add_edge 返回数组下标(统一 ID 语义)
CI / Build & Test (push) Failing after 32s
CI / Release Build (push) Failing after 31s
2026-07-23 16:46:11 +00:00
茂之钳
be76f495dc
fix: face_edges/edge_faces 改用 ID 查找替代数组下标
CI / Build & Test (push) Failing after 24s
CI / Release Build (push) Failing after 38s
2026-07-23 16:43:33 +00:00
茂之钳
9e4c1b1f54
fix: add_surface 返回数组下标 + is_valid 按 ID 查找而非下标比较
CI / Build & Test (push) Failing after 31s
CI / Release Build (push) Failing after 40s
2026-07-23 16:41:57 +00:00
茂之钳
5c4002620a
debug: is_valid() 添加诊断输出
CI / Build & Test (push) Failing after 26s
CI / Release Build (push) Failing after 34s
2026-07-23 16:38:59 +00:00
茂之钳
d60f36dfc2
fix: evaluate() 中 BSplineCurve 空控制点 → 传入合法哑数据
CI / Build & Test (push) Failing after 31s
CI / Release Build (push) Failing after 28s
2026-07-23 16:34:56 +00:00
茂之钳
28356d2f08
fix: clip_mesh 改用 brute-force inside test (BVH 射线有容差 bug)
CI / Build & Test (push) Failing after 36s
CI / Release Build (push) Failing after 31s
2026-07-23 15:45:03 +00:00
茂之钳
78995ecf6a
fix: 射线原点微偏移避免面上歧义
CI / Build & Test (push) Failing after 36s
CI / Release Build (push) Failing after 43s
2026-07-23 15:43:53 +00:00
茂之钳
f1d144aaa0
fix: nurbs_surface ?: 类型不一致
CI / Build & Test (push) Failing after 41s
CI / Release Build (push) Failing after 32s
2026-07-23 15:41:30 +00:00
茂之钳
db8c675dbb
fix: S9 修复 — CMake nurbs_surface 补充 + ray-tri 交点容差 + Delaunay3D WIP 标记
CI / Build & Test (push) Failing after 16m57s
CI / Release Build (push) Failing after 27s
2026-07-23 15:39:24 +00:00
茂之钳
762ca66ee3
feat: Sprint 8 收尾 — KD-Tree/OcTree ray query + mesh QEM 完善
CI / Build & Test (push) Failing after 30s
CI / Release Build (push) Failing after 28s
2026-07-23 14:08:34 +00:00