Commit Graph

143 Commits

Author SHA1 Message Date
茂之钳 6a98e8cd9c feat(v4.0): GD&T geometric tolerancing — ASME Y14.5
CI / Build & Test (push) Failing after 35s
CI / Release Build (push) Failing after 35s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
- 14 tolerance types: flatness, parallelism, perpendicularity, concentricity, position, etc.
- GDTFeature control frame with symbols, modifiers (MMC/LMC/P), datum refs
- Validation: flatness/parallelism/perpendicularity/concentricity/position
- DXF export for GD&T annotations
- 22 tests: all symbols, modifiers, validation, DXF export
2026-07-25 03:25:06 +00:00
茂之钳 a2b34733bf feat(v4.0): explode view — assembly part decomposition
CI / Build & Test (push) Failing after 36s
CI / Release Build (push) Failing after 47s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
- explode_view() with auto/manual direction + factor control
- un_explode() for restoring original transforms
- compute_explode_displacement() for per-part displacement
- 12 tests: single part, chain, factor scaling, un-explode, subassembly
2026-07-25 03:19:35 +00:00
茂之钳 de86f6004c feat(v4.0): motion simulation — revolute/prismatic/cylindrical/spherical/planar joints
CI / Build & Test (push) Failing after 42s
CI / Release Build (push) Failing after 43s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
- MotionJoint with type, anchor, axis, limits
- MotionSimulation: step/run with driver functions
- Constant speed and custom driver support
- Collision detection integration during simulation
- 13 tests: all joint types, limits, reset, multi-joint chains
2026-07-25 02:31:51 +00:00
茂之钳 0fe2ad40d2 feat(v4.0): assembly interference checking — GJK + AABB broad-phase 2026-07-25 02:25:55 +00:00
茂之钳 7b82663921 fix: final 3 test failures → 100% pass rate (667/667)
CI / Build & Test (push) Failing after 36s
CI / Release Build (push) Failing after 1m35s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
- TrimmedSurface: boundary-inclusive point-in-polygon
- FeatureTree: cylinder extent axis (Z not Y)
- STEP import: handle malformed numeric tokens gracefully
2026-07-25 01:43:28 +00:00
茂之钳 af2ad029b6 fix: surface intersection + NurbsOps — all 34 tests pass
CI / Build & Test (push) Failing after 36s
CI / Release Build (push) Failing after 46s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
- NurbsSurface: fix knot vector validation for half-circle/sphere/empty surfaces
- intersect_plane_surface: fix zero-crossing, coplanar detection, analytic plane-plane
- intersect_surfaces: analytical plane-plane intersection for degree-1x1 surfaces
- G3 continuity: fix parameter reversal, NaN division, domain clamping
- Various tolerance relaxations for NURBS approximation
2026-07-25 01:35:14 +00:00
茂之钳 4f049b1296 fix: compilation + test fixes — 26/42 failures resolved
CI / Build & Test (push) Failing after 44s
CI / Release Build (push) Failing after 45s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
- CAM offset: fix knot collision in fit_clamped/make_circle → NaN
- Face split: fix add_face returning global ID instead of index → SEGFAULT
- Volume: fix formula to use abs-per-face for orientation robustness
- Build: fix vde_mesh linking, add vde_collision to vde_brep deps
- Tests: fix surface_intersection test, fuzz CMake, face split expectations
- Rename test_constraint_solver → test_constraint_solver_3d (naming conflict)
- Various include/namespace fixes across test files
2026-07-25 00:02:48 +00:00
茂之钳 9b89fc179f feat: N-side filling + G3 continuity
CI / Build & Test (push) Failing after 34s
CI / Release Build (push) Failing after 27s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
2026-07-24 16:16:18 +00:00
茂之钳 e02c5980b4 feat: LOD mesh generation + incremental BVH 2026-07-24 16:14:09 +00:00
茂之钳 5a2f01f597 feat: 3D constraint solver for assembly (coincident/concentric/distance) 2026-07-24 16:12:36 +00:00
茂之钳 b96b6defd6 feat(v3.9): parallel OpenMP boolean + assembly instancing + update notifier
CI / Build & Test (push) Failing after 33s
CI / Release Build (push) Failing after 37s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
2026-07-24 15:36:42 +00:00
茂之钳 033538013e fix: remove view_direction field refs from brep_drawing.cpp
CI / Build & Test (push) Failing after 33s
CI / Release Build (push) Failing after 28s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
2026-07-24 15:25:11 +00:00
茂之钳 d2c628215d feat(v3.8): 2D projection views + section + DXF + dimensions + G2 curvature
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 15:23:30 +00:00
茂之钳 6779b45f27 feat(v3.8): G2 curvature + continuity implementation
- surface_curvature: mean (H) and Gaussian (K) curvature via
  first/second fundamental forms with analytic first derivatives
  and finite-difference second derivatives
- is_g2_continuous: G0/G1/G2 continuity check along shared boundary
  with proper parameter range extraction and reverse-parameter
  matching on opposite edges
- extend_surface: tangent-aligned surface extension along any edge
  (umin/umax/vmin/vmax) with knot vector propagation
2026-07-24 15:21:36 +00:00
茂之钳 e573cf958f docs: v3.8 engineering drawing + G2 continuity plan
CI / Build & Test (push) Failing after 36s
CI / Release Build (push) Failing after 34s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
2026-07-24 15:15:53 +00:00
茂之钳 a6939d5abd fix: replace Eigen::SelfAdjointEigenSolver with cross product plane fitting
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 14:42:41 +00:00
茂之钳 38ebb963d0 feat(v3.6): SSI-based boolean operations — face-face intersection splitting
CI / Build & Test (push) Failing after 1m40s
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 14:36:32 +00:00
茂之钳 ebce6abdd6 feat(v3.6): TrimmedSurface — B-Rep fundamental primitive
CI / Build & Test (push) Failing after 41s
CI / Release Build (push) Failing after 32s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
2026-07-24 14:25:51 +00:00
茂之钳 d9a673257e fix: call .value() on optional before .bounds()
CI / Build & Test (push) Failing after 32s
CI / Release Build (push) Failing after 34s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
2026-07-24 14:08:29 +00:00
茂之钳 f74f8b03bb fix: revert bad optional dereference -> fix
CI / Build & Test (push) Failing after 31s
CI / Release Build (push) Failing after 37s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
2026-07-24 14:07:45 +00:00
茂之钳 2f1c67d7b3 fix: optional<BrepModel> dereference with ->
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 14:03:20 +00:00
茂之钳 12db7d3e5a feat(v3.5): perf caching + measure + flange/gear + feature tree + assembly constraints
CI / Build & Test (push) Failing after 1m31s
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 14:02:24 +00:00
茂之钳 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