Commit Graph
164 Commits
Author SHA1 Message Date
hm d026672ec8 test(brep,curves): quality-property and NURBS derivative audits (VDE-1403)
基本体质量属性 vs 闭式解 <=4.3e-11、随机有理曲线/曲面导数 vs 差分 <=3.5e-9 固化为回归;报告 275 记录 SSI 布尔装配顺序敏感的已知问题;版本 1.0.218。
2026-11-10 02:36:09 +08:00
hm 02d7c384f3 fix(brep): per-span Gauss for degree-2 curved edges (VDE-1402)
degree=2 曲边(椭圆等)按节点逐段 Gauss:半椭圆面面积 rel 3.94e-4→≤1e-9;圆/直线/折线/圆弧路径不变;新增回归与报告 274;版本 1.0.217。
2026-11-10 01:50:07 +08:00
hm a41c77930c fix(brep): per-segment analytic Green for polyline edges (VDE-1401)
折线边按节点逐段解析 Green:修复整段 Gauss 欠采样(60 段锯齿 0.63% 面积误差)与折线被误判单直线;面积 rel≤1e-12;新增回归与报告 273;版本 1.0.216。
2026-11-10 01:27:53 +08:00
hm 65d681a73d perf(brep): analytic Green for line edges in planar faces (VDE-1400)
直线边(degree=1 NURBS)改解析 Green:200 边 4.1→0.043ms、盒面 0.065→0.0016ms;数值逐位一致;新增报告 272;版本 1.0.215。
2026-11-10 01:04:45 +08:00
hm deffa75bd7 perf(brep): fast-reject circle detection and index loop chaining (VDE-1399)
圆弧检测按阶次/边数/直线快速排除(零采样),chain_loop_edges 改邻接表 O(N);数值零变化;微基准如实记录无可测幅度;新增报告 271;版本 1.0.214。
2026-11-10 00:43:23 +08:00
hm 4bc37e9c2a fix(brep): per-edge closed-form Green for circular arc boundaries (VDE-1398)
单条圆弧边拟合+闭式矩:多段圆弧+直线混合环面积精确(半圆盘 rel≤1e-9);整圈/导入/布尔路径不变;新增回归与报告 270;版本 1.0.213。
2026-11-10 00:17:04 +08:00
hm 6158bebb0d fix(brep): closed-form Green moments for full circle trim loops (VDE-1397)
整圈单圆环用闭式 Green 矩:STEP 往返圆柱端盖面积/体积回到解析精度(rel 9.85e-5→~1e-16),非圆弧环保持原整段 Gauss(布尔/特征编辑行为不变);新增/收紧回归与报告 269;版本 1.0.212。
2026-11-09 23:56:50 +08:00
hm ce6141eff5 test(brep): STEP roundtrip cylinder face-hole regression (VDE-1395)
解析圆柱 export→文件→import 后顶面 Ø4 贯穿:导入 6 面/valid/水密/vol rel 9.85e-5;打孔后 valid/水密、切除体积 rel 1.61e-3;新增回归与报告 268;版本 1.0.211。
2026-11-09 23:10:42 +08:00
hm b2f3847f74 test(brep): real STEP plate face-hole watertightness regression (VDE-1394)
导入真实 STEP 板(198 面/valid/水密)后 Ø4 贯穿孔:degraded=1 但 valid/水密 1.0、切除体积 rel 1.61e-3;新增回归与报告 267;版本 1.0.210。
2026-11-09 22:46:49 +08:00
hm 1d65ba19f8 fix(brep): counterbore takes precedence over countersink in HoleSpec (VDE-1393)
cb+cs 组合从 cs-only/两者都丢 修复为 cb-only(15 面、闭式体积、水密 1.0),文档明确优先级;三条路径口径一致;新增回归与报告 266;版本 1.0.209。
2026-11-09 22:26:17 +08:00
hm 47dd458ab2 test(brep): certify degraded fallback contract for non-prism holes (VDE-1392)
阶梯轴顶面贯穿孔:degraded=true 但 valid/水密 1.0/体积 rel 7.7e-5,与 make_hole 一致;计划文档 §45 记录直构造族与交叉钻孔布尔弱项;报告 265;版本 1.0.208。
2026-11-09 22:04:30 +08:00
hm eb19dee6df test(brep): certify hole orientation invariance on rotated prisms (VDE-1391)
旋转板贯穿/盲孔与 face-aware 打孔认证:10/11 面、水密 1.0、闭式体积 rel 1e-12 量级;纯测试;报告 264;版本 1.0.207。
2026-11-09 21:44:17 +08:00
hm f846c4849c fix(brep): reject non-watertight boolean fallback in make_hole (VDE-1390)
布尔回退结果非水密时 heal 重试,仍失败返回空体(交叉钻孔 wt 0.59 不再外泄);直构造孔型不变;新增回归与报告 263;版本 1.0.206。
2026-11-09 21:09:12 +08:00
hm 5538f4a6f3 feat(brep): blind counterbore direct construction (VDE-1389)
build_counterbore_hole_direct 支持盲孔底圆盘并接入 make_hole/make_hole_on_face:16 面/水密 1.0/rel 7e-13、degraded=false(旧布尔 136 面);新增回归与报告 262;版本 1.0.205。
2026-11-09 20:25:17 +08:00
hm 29097b66db feat(brep): blind countersink direct construction (VDE-1388)
build_countersink_hole_direct 支持盲孔底圆盘并接入 make_hole/make_hole_on_face:15 面/水密 1.0/rel 8.4e-12、degraded=false;新增回归与报告 261;版本 1.0.204。
2026-11-09 20:04:42 +08:00
hm f1fbd12821 feat(brep): direct countersink construction in make_hole (VDE-1387)
贯穿埋头孔复用 build_countersink_hole_direct:14 面/水密 1.0/rel 8.8e-12,替换旧的无效 cs 参数布尔路径;新增回归与报告 260;版本 1.0.203。
2026-11-09 19:43:46 +08:00
hm 60422875d7 fix(brep): make_hole blind depth and blind counterbore volume (VDE-1386)
盲孔改直构造(体积 rel 3.7e-13)、沉头盲孔改互不重叠分段做差(rel ~1e-5,水密 1.0);埋头保持旧行为并记录缺口;报告 259;版本 1.0.202。
2026-11-09 19:22:57 +08:00
hm 78fd2a2033 perf(brep): densify analytic-path trim boundary sampling (VDE-1385)
mass_integral 非周期域按 p-curve 数均分 256 点(对称),带孔面积 rel ~4x 改善;修正首版抽稀破坏圆环对称导致 VDE1234FaceHole 两项失败;报告 258;版本 1.0.201。
2026-11-09 18:51:20 +08:00
hm 6a55bf4d4a fix(brep): use real knot domain for trim boundary UV scale (VDE-1384)
build_polygon_adaptive 按真实节点域端点估算 UV→3D 缩放,修复非 [0,1] 域 scale=0 导致恒 32 采样;带孔面积 rel 1.775e-3→1.060e-4;新增回归与报告 257;版本 1.0.200。
2026-11-09 18:11:19 +08:00
hm c26106c2c5 test(curves): add NURBS curve certification gate (VDE-1383)
圆 1e-9/1/1e9 弧长 1e-16 级精度、空/零长/短节点安全、6 类非法构造拒绝;纯测试;报告 256;版本 1.0.199。
2026-11-09 17:48:03 +08:00
hm e4d511dc45 test(brep): tighten analytic primitive precision gates (VDE-1382)
球/精确环面/精确锥台容差收紧到 1e-9/1e-8,新增 closed-form + faceted 收敛门禁;纯测试;报告 255;版本 1.0.198。
2026-11-09 17:23:02 +08:00
hm bf9aaad7aa fix(measure): expose invalid_surface on FaceMeasure and unify analytic counting (VDE-1381)
FaceMeasure 新增 invalid_surface;face_measure 入口统一检测,analytic_measure 据此计数;回退数值不变。新增报告 254;版本 1.0.197。
2026-11-09 16:57:56 +08:00
hm 5b0a677617 fix(measure): mark analytic measure degraded for invalid-surface faces (VDE-1380)
AnalyticMeasure 新增 invalid_surface_faces 计数并纳入 degraded/degraded_reason;无效基面面回退数值口径不变。新增回归与报告 253;版本 1.0.196。
2026-11-09 16:34:55 +08:00
hm fa6d201a27 test(curves): add NURBS certification suite (VDE-1379)
8 例认证:工厂曲面闭式解、极端尺度、极点法向、导数 vs 差分、closest_point/投影往返、三角化贴面与零面积剔除、闭合性/包围盒;报告 252;版本 1.0.195。
2026-11-09 16:13:20 +08:00
hm 2ad7b577ac fix(curves): guard project_polyline_on_surface against empty surfaces (VDE-1378)
批量折线投影入口增加 O(1) 空/畸形曲面守卫,按输入点数返回安全参数;新增投影族回归与报告 251;版本 1.0.194。
2026-11-09 14:33:12 +08:00
hm 6b928ab610 fix(brep): guard build_face_trim_domain/face_center against empty surfaces (VDE-1377)
build_face_trim_domain 对空/畸形基面返回 nullopt,face_center 走既有网格/边界回退;新增回归与报告 250;版本 1.0.193。
2026-11-09 14:14:00 +08:00
hm 81d3c55417 fix(mesh): skip faces with empty/malformed base surfaces during meshing (VDE-1376)
空/畸形基面面在 to_mesh/to_mesh_parallel/to_triangle_soup/mesh_face_diag 的 knots[degree] 越界崩溃改为跳过(mesh_body 缓存 + mesh_face_consistent O(1) 守卫);新增回归与报告 249;版本 1.0.192。
2026-11-09 13:55:39 +08:00
hm b8ab75954e fix(brep): guard TrimmedSurface APIs against empty/malformed base surfaces (VDE-1375)
bounds/mass_integral/offset_surface/detect_self_intersections 对空/畸形 NurbsSurface 基面的 knots[degree] 越界崩溃改为 is_valid_layout() 预检安全返回;新增回归与报告 248;版本 1.0.191。
2026-11-09 13:16:39 +08:00
hm c007320fb2 fix(curves): guard projection of empty/malformed NURBS surfaces (VDE-1374)
closest_point/project_point_on_surface* 对空/畸形 NurbsSurface 的 knots[degree] 越界崩溃改为 O(1) 守卫安全返回;新增回归与报告 247;版本 1.0.190。
2026-11-09 12:49:33 +08:00
hm e6245b29ed fix(curves): guard malformed NURBS surface evaluation (VDE-1373)
NurbsSurface 构造期保持宽容(VDE-1261),求值端防御:span 二分有界、阶次/节点长度守卫、参差网格行列越界防护、非有限结果回退零向量、normal +Z 兜底;新增 is_valid_layout()。11 例回归。合并 origin/main @ee414b55 并解决基准断言冲突(rel 1e-8)。版本 1.0.189,报告 246。
2026-11-09 11:31:27 +08:00
hm 8325e392a8 fix(mesh): dispatch shared-edge sampling by polyline p-curve evidence (VDE-1371)
撤销上游 e111d472 在 to_mesh(double) 的 blanket force_shared_edge_samples;改为外环含一次折线 p-curve 证据。修复合并后 13 个网格/并行/三角汤回归,box-sphere boundary 恢复 0;更新布尔已知限制断言(VDE-1372)。版本 1.0.188,报告 245。
2026-11-09 09:36:31 +08:00
hm dac493cd66 perf(brep): cache shared-edge decision in analytic measure (VDE-1369); fix uninit normal (VDE-1370)
解析测量逐面 mesh_face_diag 重复 O(F) 共享边判定 -> O(F^2);作用域内锁定一次。球体体积 9.6s->0.44s (22x),布尔剖析 12.5s->1.29s。补 Sphere512 一致性用例,版本 1.0.187,报告 244。
2026-11-09 01:44:40 +08:00
hm db7c2ffa0f 1.0.186: 同轴环面×{圆柱,圆锥,球}闭式交线(VDE-1367)
- VDE-1367: 新增 torus_cylinder_coaxial / torus_cone_coaxial / torus_sphere_coaxial
  在环面截面圆 (rho-R)^2+z^2=r^2 上与柱竖线/锥斜线/球轮廓圆闭式求交;
  锥按 [0,h] 轴向域与同轴反向过滤;exact_intersection_multi 增六条分派。
  探针 R=10/r=3:柱 Rc=10 -> 2 圆 r=10 z=+-3;Rc=9 -> z=+-2.828427124746;
  锥 r(z)=9+0.2z -> rho=9.594493549800 z=2.972467749000;球 S=12 -> rho=11.75
  z=+-2.436698586202;S=13 内切单圆;无交/越域 nullopt。32 点双曲面残差 <=1.776e-15。
  旧库同输入全部 nullopt。
- VDE-1368: 清理 tests/brep/test_boolean_oracle_metrics.cpp unused c30/kPi、
  tests/brep/test_analytic_ssi.cpp unused mc(verifier 241 P2-1),强制重编 0 warning。
- 测试: 新增 6 例,AnalyticSsiTest 45/45,注册 8,485 -> 8,491。
- 全量 CTest: 8,491 执行 / 8,453 passed / 0 failed / 38 SKIP / 464.76 s。
- release --check 14/14 PASS 0 warn,--report-check PASS latest=243。
- 文档: 报告 243、verifier 241 入库、CHANGELOG、docs/index、reference README、
  报告 240 勘误、W1-1 计划状态。
2026-11-08 18:40:21 +08:00
hm c694712b73 1.0.185: 平面×锥闭式交线轴向域守卫(VDE-1366)
- 新增 cone_domain_contains_closed_curve:按闭式曲线轴向跨度 tc±sqrt((a·u·z)^2+(b·v·z)^2)
  精确判定是否整条落在单叶截断锥 [0,h] 内;整条越界或部分越界返回 nullopt,
  不再把顶点另一叶 / z>h 的“幻影圆”当真实交线(旧值 a=4.08 / 1.0 / 1.92)。
- 平面×锥分派正反两种实参顺序均校验;域内 z=5 a=3、z=9.9 a=3.98 保持不变。
- tests/brep/test_analytic_ssi.cpp 新增 2 例;AnalyticSsiTest 39/39;注册 8,483→8,485。
- 报告 242;按 verifier 239 勘误修正报告 238 三处并追加 §11;verifier 239 入库;
  更新 CHANGELOG / docs/index / docs/reference/README / catch-up W1-4 状态。
- 全量 CTest 8,485 执行 / 8,447 passed / 0 failed / 38 SKIP / 519.41 s;
  release --check 14/14 PASS、--report-check PASS(latest=242)。
2026-11-08 17:00:57 +08:00
hm 3aaaae75a7 1.0.184: 自动角部缺口修补(VDE-1365)
- 新增 auto_trim_corner_notch(BrepModel&, deflection=0.02, tol=1e-3):
  从网格边界环识别「单环 + 3 尖角 + 3 段同球面弧 + 总跨度 3π/2」的
  角部缺口,反推球心/半径后自动调用 trim_corner_notch;失败返回
  中文 reason 且不改动模型。
- box−sphere 16×8: valid 0→1, wt 0.7500→1.0, boundary 456→0,
  volume rel 9.25e-13;32×16: wt 0.8378→1.0, boundary 912→0,
  rel 9.03e-12。闭合体与平面孔负例不误裁。
- 新增 4 例测试,FaceRegionsTest 20/20 PASS;注册 8,480,
  全量 8,442 passed / 0 failed / 38 SKIP / 671.65 s。
- 报告 240;CHANGELOG、docs/index、参考索引、W1-6 计划状态更新;
  入库 verifier 报告 237(1.0.182 独立验证 PASS)。
2026-11-08 14:47:03 +08:00
hm ecaa343406 1.0.183: 异轴等半径柱闭式 SSI(VDE-1364)
- 柱×柱多分支新增两轴相交等半径圆柱:隐式方程相减得两张角平分平面,
  各与柱面求精确椭圆,16 点双柱残差复核;半径不等/异面仍 nullopt
- tests: 4 个新用例(90°/60°/半径不等/异面 + NURBS 裁剪链),AnalyticSsiTest 37/37
- 全量:8,475 执行 / 8,437 passed / 0 failed / 38 SKIP / 528.73 s;release 14/14
- 报告 238;W1-1 追赶计划状态更新为九步
2026-11-08 12:46:41 +08:00
hm cd5003f1ce 1.0.182: 尖锥退化拓扑与壳面索引修复(VDE-1362/1363)
- VDE-1362: make_cone faceted 分支某端半径 < vertex_merge 时走 apex 路径,
  侧面 segs 三角 + 1 端盖 = segs+1 面,χ=2 闭合流形;旧实现顶环收缩为重合
  顶点仍建四边形,得 F=66/V=65/E=128、χ=3 奇数,validate().valid=false 但
  体积近似正确(隐性坏体)。阈值严格小于,r2>=1e-6 保持原 66 面圆台表示。
- VDE-1363: rebuild_single_shell 把 Face::id 写入 shell.faces(VDE-1282 约定
  为数组下标),封盖重建后 is_valid()=false、bad shell face idx 越界;改为按
  faces_ 下标填充,全仓其余写入点均为下标(verifier 235 P2-1)。
- 测试:4 例 faceted cone(顶锥/底锥/容差/中心偏移)+ 1 例封盖壳面索引,
  圆锥快照补面数/valid/wt;注册 8,466 -> 8,471,全量 8,471 执行 / 8,433
  passed / 0 failed / 38 SKIP / 475.70 s。
- kernel 审计套件随上游 API 修复:audit_formats 三处 fs::path 流构造改
  .string()、audit_curves 球面 tess 改账面守恒断言;384 PASS / 0 FAIL。
- 文档:报告 236、报告 234 §11 勘误、报告 235(verifier 随版入库)、
  CHANGELOG/docs 索引更新;release --check 14/14、--report-check PASS。
2026-11-08 08:11:49 +08:00
hm 4c0cb13919 1.0.181: 封盖面朝向修正(VDE-1360)+ 1.0.180 独立验证报告入库
- VDE-1360: cap_boundary_loops/cap_boundary_cycles 封盖面按网格边界环顺序设置 face.reversed,
  修复 10^3 立方体缺一面解析体积 666.6667(validate() 仍报水密假阳性);cycles 按点集匹配
  to_mesh 边界环取 -Newell,匹配不到回退旧行为。
- 新增 2 例六面逐一封盖体积回归;A/B 旧库 666.66666666666686 -> 新库 1000.000000。
- 合并 origin/main @ a5eaffe5(5 提交);注册 8,462、全量 8,424 passed / 0 failed / 38 SKIP / 419.76 s。
- 报告 234;verifier 233(1.0.180 PASS,P3=10)随版入库;按 P3 修正报告 232 勘误与 bowtie 注释。
- release --check 14/14 PASS、--report-check PASS(latest=234)。
2026-11-08 03:21:03 +08:00
hm c16f6a8165 1.0.180: 网格边界环追踪、圆弧拟合与弧边写回修复(VDE-1357~1359)
- VDE-1357 analyze_mesh_boundary/extract_boundary_loops 改有向边界半边 +
  next(twin(next)) 绕顶点旋转追踪;bowtie 环数 1->2,seam 度数 4 顶点不再丢环;
  fill_boundary_loops 按有向环反向补扇,保证与相邻面绕向一致。
- VDE-1358 BoundaryArc 新增 closed(闭合整圆 sweep=2pi);fit_circle_segment
  增加共面校验,sweep 改逐段展开角累加;光滑 16 边形闭合圆旧 0 弧 -> 新 1 弧。
- VDE-1359 add_boundary_arc_edges 先校验半径/sweep/共面,再按累积展开角
  贪心切段(每段 <=90 度);旧 270 度弧负权重使 NurbsCurve 构造抛异常,
  新实现 3 条边且中点半径精确 50。
- tests/mesh/test_mesh_diagnostics.cpp 新增 5 例;注册 8,449 -> 8,454。
- 全量 CTest 8,454 执行 / 8,416 passed / 0 failed / 38 SKIP / 558.63 s;
  release --check 14/14、--report-check PASS(232)。

报告: docs/reference/232-VDE1.0.180-网格边界环追踪与圆弧重建修复自验证报告.md
2026-11-08 00:04:33 +08:00
hm 23f9467721 feat(1.0.179): 网格水密指标、shell_multi validate 门控与网格焊接入口一致性
VDE-1350 网格水密指标:mesh_repair.h 新增 MeshWatertightness 与
analyze_mesh_watertightness 两条重载(焊接顶点/边界环/非流形边/重复面/
有向体积/共享边比率);mesh_healing_report 的 hole_count 由 boundary_edges/3
启发式改为边界顶点 DSU 连通分量。新增 test_mesh_watertight 8 例 +
双孔洞 1 例。

VDE-1351 shell_multi 门控:独立验证 229 P2-1 证实 is_valid() 只做基本检查,
L 形/圆柱/球坏体仍非空返回且旧库数值相同。新增 shell_result_acceptable()
(validate() + 水密率=1 + 无悬挂边/非流形边/夹边),等厚与不等厚两路径统一;
测试改名 InvalidShellReturnsEmptyModel 并断言空模型。

VDE-1352 恢复 topo_naming.h BOM;勘误 228 报告行数/BOM 口径与 CHANGELOG
1.0.178 的回归编号、告警口径。

VDE-1353 网格焊接入口一致性:合并上游 71 提交后 20 项 CTest 失败,根因是
上游只给串行 to_mesh 加容差焊接,tagged/parallel(两分支)/soup/可见性重载
均未焊接,同一体各入口顶点数分叉;另原容差用 max|coord|*1e-6,1e15 远体
eps=1e6 致整球塌缩。焊接容差改为包围盒相对口径 eps=max(1e-9*diag,1e-12)、
格点以包围盒最小角为原点;五个入口全部补齐焊接;to_mesh_parallel 大网格
焊接后改用确定性串行 build_from_triangles;过期断言更新(box 24→8、facet
与 mesh→brep 唯一顶点数、ctypes smoke)。曾失败 5 组 46 项修复后 46/46。

测试:注册 8,381→8,414(合并上游 +33,本版新增 9)。
全量 CTest(Release -j8 三段 1-2805/2806-5610/5611-8414):8,414 执行、
8,379 passed、0 failed、35 SKIP、583.30 s;build 0 error。
release --check 14/14 PASS、--report-check PASS(latest=230)。
报告:docs/reference/230-VDE1.0.179-…自验证报告.md;229(1.0.178 独立验证)
随版入库。版本链 6 处 bump 1.0.179。
2026-11-07 14:40:21 +08:00
hm 4eda032c8b fix(brep,cmake,docs): repair double-encoded comments, generation-aware topo naming, shell_multi guard, SDK package-config leak (VDE-1346/1347/1348/1349, 1.0.178)
- VDE-1348: 316 damaged comment lines in 4 source files restored via mbcs
  inverse transform + GB18030 reverse table + parent-version alignment;
  remaining 5 scattered lines hand-fixed; repo-wide PUA/U+FFFD now 0.
- VDE-1347: topological_name(generation,...) resolves the requested
  generation instead of always the latest; name_from_generation() added;
  unknown generation returns an empty string.
- VDE-1346: shell_multi validates results and returns an empty model when
  the shell is topologically invalid; docs narrowed to convex planar solids.
- VDE-1349: plugin SDK package config now generated under
  build/package/vde-plugin-sdk/ and stale copies are removed, so a PATH
  containing build/src can no longer make plugin templates' find_package
  hit a configured-but-uninstalled config and fail; scaffold smoke asserts
  no leak at the build root.
- Tests: 5 new cases (8,370 -> 8,372); full CTest 8,372 executed,
  8,337 passed, 0 failed, 35 skipped, 712.96 s; release check 14/14 PASS.
2026-11-07 10:30:32 +08:00
hm 5d10fbfd97 fix(brep): rebuild shell_multi unequal thickness via shared inner cavity (VDE-1341, 1.0.177)
shell_multi keyed inner vertices by (face_id, vertex_id), so every adjacent
face duplicated the inner point of a shared outer vertex; inner surfaces at
edges/corners were disconnected and self-intersected (upstream 60x60x20 case
with t=4/2 gave volume 105920 instead of 34368).

- equal thickness now delegates to shell() (shared-vertex inward offset)
- unequal thickness builds an inner cavity by intersecting per-face offset
  half-spaces and returns brep_difference(body, cavity); miter steps and open
  side walls come from the boolean itself
- non-finite/non-positive thickness and invalid open_face return an empty
  model instead of a self-intersecting body
- add 7-case test_shell_multi_1341, switch 3 old modeling assertions to volumes
- fix stale placeholders: report 212 summary PENDING_FULL, CHANGELOG 1.0.176
  test count; vde_release report-refs accepts labels like [226 自验证](...)

Tests: shell_multi 7/7, brep_modeling 80/80, targeted 149/149,
full CTest 8,369/8,369 passed, 0 failed, 35 skipped (525.23 s).
2026-11-07 05:22:48 +08:00
hm 6827692f4e fix(brep,mesh): entity diagnostics/ref validation + robust polygon triangulation (VDE-1341..1344, 1.0.176)
- VDE-1341 mesh: to_mcm ear-clips n>3 faces (Newell normal + 2D ear clipping,
  fallback to fan on degeneracy) and maps local triangle indices back to face
  vertices; empty HalfedgeMesh/PointCloud bounds return a finite zero box;
  faces_range()/vertex_one_ring() implemented (FaceRange iterator, adjacency
  from vertex outgoing half-edges).
- VDE-1342 FeatureNode: last_error()/last_evaluate_ok() diagnostics, stronger
  boolean success predicate, invalid primitive/edit parameters throw
  std::invalid_argument instead of being silently clamped.
- VDE-1343 edit_feature: face_ids range validation before the no-op early
  return, analytic hole location first, warnings on geometric fallback,
  15% radial consistency check between reference faces and matched hole.
- VDE-1344 rebind_entity: id hit now verified against the anchor distance
  (vertex/edge/face), falls back to nearest-anchor match, returns -1 when
  still mismatched; Body rebinds through anchor's nearest face.
- Tests: test_mesh_1177_fixes 11 cases, test_entity_1177_fixes 12 cases;
  registry 8,339 -> 8,362; full CTest 8,362/8,362 passed, 0 failed, 35 SKIP,
  635.55 s; release checks 14/14 PASS, report-check latest=224.
- Docs: report 224 (self-verification), verifier report 223 (1.0.175 PASS)
  included, RegressionExtreme count corrected to 10/10 (P3-1).
2026-11-07 03:37:30 +08:00
hm b98ca6373c feat(brep): entity/curve/mesh audit fixes, robust numeric inputs (VDE-1329..1340, 1.0.175)
- entity/feature layer: split_body shell IDs, shell_face_ids bounds, empty
  FeatureHistory, multi-body Euler warning, config dependency cycles, undo off-by-one
- VDE-1335: serialize assembly flex joints in additive section 16 with validation
- curves: P0 crashes (degree=0 derivative, empty Bezier, negative index/degree,
  weights mismatch, empty domain), k-order derivative, repeated-knot NaN,
  degenerate self-intersection; stricter constructors and C API boundary guards
- VDE-1337: exact planar trim handles curves enclosing/inside existing holes and
  repeated trims of single-closed-edge outer loops
- mesh: O(1) vertex queries, O(F+V) update_normals (~2035x/36588x), validated
  construction, empty-operand boolean set semantics, save_ply length checks
- VDE-1339/1340: finite guards in primitive builders (NaN/Inf return empty body)
  and in intersection curve fitting (never throw inside OpenMP regions)
- tests: 8,290 -> 8,339; full CTest 8,339/8,339 passed, 0 failed, 35 skipped
- reports: 219, 221 (independent verification), 222 (self verification)
2026-11-06 23:49:19 +08:00
hm 31ea6e7d5f feat(brep): trim planar faces bounded by a single closed edge (VDE-1328, 1.0.174)
- exact_face_trim: drop the blanket rejection of loops made of one closed
  curve edge (STEP full-circle / full-ellipse caps, v_start == v_end);
  fill p_from/p_to/has_curve on the early-return branch (was left as
  {0,0,0}/false), and stop treating a zero-chord closed edge as a line
  (probe denominator was max(chord,1e-30) -> deviation always 0).
- Only the no-intersection branches are enabled; a curve crossing a
  non-linear outer boundary is still rejected with a clear error.
- tests: 3 new cases (split inside/outside with exact radii, enclosing /
  disjoint, crossing rejection) and the degenerate-closed-edge subcase;
  test_exact_face_trim 22 -> 25 cases, 25/25 PASS.
- real-model evidence: a 249.5 MB STEP copy has 5 closed edges and one
  face whose outer loop is a single closed curve edge (60,029 faces).
- report: docs/reference/220 (full regression 8,290/8,290, 0 failed,
  35 SKIP, 562.65 s; release check 14/14 PASS).
- also commit report 217 (independent verification of 1.0.172, PASS).
2026-11-06 18:23:52 +08:00
hm bf5f93ce90 fix(brep): only warn about Euler characteristic when topology is not closed (VDE-1327, 1.0.173)
- brep_validate.cpp: a closed orientable 2-manifold has chi = 2-2g, so legal
  solids with genus > 0 (through-hole tori, chi=0) or multiple shells (chi=4)
  no longer receive the misleading "expected 2 for closed genus-0 solid"
  warning (verifier 215 P3-2). The count hint is now emitted only while the
  topology is not confirmed closed (boundary/dangling/non-manifold edges,
  coincident pinches or untrimmed faces); the message points at those causes.
- The odd-chi error path for single closed manifold bodies is unchanged.
- brep_validate.h: document the new warning semantics.
- test_brep_validate: new EulerWarnsOnlyWhenTopologyIsNotClosedManifold
  (torus clean, two disjoint boxes union clean, open shell still warns);
  47/47 pass, 8,286 -> 8,287 registered tests.
- docs/reference/214 errata from verifier 215 P3-3/4/5/6 (modeling 80/80,
  measured timing, incremental build wording, +57/-0 diff wording).
- report 218, CHANGELOG and index updates.
- Full CTest: 8,287/8,287 passed, 0 failed, 35 skipped, 857.96 s.
2026-11-06 15:37:04 +08:00
hm 3b97d22490 feat(brep): auto volume gate for small boolean results (VDE-1326, 1.0.172)
- BooleanQualityOptions: verify_volume is now "force any size"; add
  verify_volume_small_results (default true) and verify_volume_max_faces
  (default 200) so results up to 200 faces are volume-checked by default.
  BooleanQualityReport adds volume_auto.
- boolean_quality.cpp: run analytic-vs-mesh divergence volume comparison when
  forced or when faces <= threshold. VDE-1325 fixed Euler counting, after which
  the 9-face cone-minus-through-cylinder result is a closed orientable manifold
  (chi=0, watertight 1.0) whose exact circles were replaced by straight
  diamonds (+45.6% analytic volume, rel 0.313); only the volume cross-check
  can detect it. to_mesh yields a boundary-free mesh for that body as well.
- measure.cpp: gate the unconditional "[analytic] DEGRADED" stderr line behind
  VDE_ANALYTIC_DEBUG; degraded state remains queryable via degraded_reason()
  and volume_measurement_degraded (verifier 213 P3-6).
- tests: test_brep_boolean 47/47; box/through/cone cases assert volume_auto;
  new AutoVolumeCheckSkipsLargeResults covers the opt-out path.
- docs: report 216, design/boolean-defects update, CHANGELOG, index entries.
- Full CTest: 8,286 registered, 8,286 executed, 0 failed, 35 skipped, 620.53 s.
2026-11-06 14:16:48 +08:00
hm e9d5c15f0f fix(brep): correct Euler characteristic counting and add parity invariant (VDE-1325, 1.0.171)
- brep_validate: chi = V - E + F - sum(k-1) with merged vertices, deduplicated
  edges, referenced-vertices-only V, and 2-cell (2-k) correction for faces with
  k boundary loops. Through-hole solids now report chi=0 (torus) instead of 2;
  bolts (old chi=3) and directly drilled plates (old chi=2) are corrected.
- brep_validate.h: new euler_parity_consistent field; odd chi on a single-body
  closed manifold (watertight, no dangling/non-manifold/pinch edges, no
  untrimmed faces) now sets valid=false. Multi-body assemblies are exempt.
- tests: 3 validate cases (box/torus even, make_hole through hole chi=0, two
  boxes touching at a corner chi=3 => invalid); boolean quality tests aligned
  with torus semantics (through cylinder chi 2 -> 0; cone-cylinder caught by
  opt-in volume check since chi is now even and consistent).
- docs: report 214, verifier 213 report (1.0.170 PASS, P0/P1/P2=0, P3=6),
  CHANGELOG, index and reference README at 1.0.171 / 8,285 tests.

Verification: build 0 error / 0 warning; ctest 8,285/8,285 passed, 0 failed,
35 skipped, 861.08 s; vde_release.py --check 14/14 PASS; --report-check PASS.
2026-11-06 12:33:47 +08:00
hm 5d346e3440 feat(brep): opt-in quality gate for boolean results (VDE-1324, 1.0.170)
- add evaluate_boolean_quality / brep_union_checked / brep_intersection_checked /
  brep_difference_checked with watertightness, dangling/non-manifold, orientation,
  Euler parity and opt-in analytic-vs-mesh volume checks; existing brep_* unchanged

- harden exact face trim failure contract: compute areas into locals and only write
  result fields after consistency checks (verifier 211 P3-5); reject failure results
  with zero area/arc counts in tests

- fix stale changelog report-ref examples in report 210 / CHANGELOG (verifier 211 P3-1)

- tests: BrepBooleanQualityTest 7 cases (46/46 in test_brep_boolean), ExactFaceTrim 22/22;
  registry 8,275 -> 8,282

- docs: reports 212 (self-verification) and 211 (verifier 211, 1.0.169 PASS);
  boolean-defects design doc status update; index/README entries

Full release CTest: 8,282 executed, 8,247 passed, 0 failed, 35 skipped, 648.76 s;
release --check 14/14 PASS, --report-check PASS (latest=212).
2026-11-06 09:08:49 +08:00
hm f536f7b955 fix(brep): harden exact trim input contract and release tooling (VDE-1315, 1.0.169)
- exact_face_trim: validate face/loop/edge/vertex ids, empty loops, single
  closed-edge loops, finite orthogonal curve frame; public API now catches
  topology exceptions and returns ok=false with no partial fragments.
- ExactCurve::valid(): reject NaN/Inf center/normal/u/v and non-finite axes.
- analytic_trim: non-finite parameters rejected (no ceil(NaN) UB), sample
  count clamped to [2,4096], split_arc_edges_at sanitizes tol and returns 0
  on malformed topology.
- tests: exact_face_trim 15 -> 22 cases (malformed topology, non-finite
  curve, 1e-12..1e9 scales), analytic_trim 13 -> 15 cases.
- tools/vde_release.py: changelog:report-refs also parses markdown report
  links; new regression test.
- docs: new boolean-defects-20261106.md (box-cyl/cone-cyl/sphere-sphere
  audit), report 210, verifier report 209, errata for 206/208/CHANGELOG.

Version 1.0.169. Full CTest release -j8: 8,275/8,275 passed, 0 failed,
35 skipped, 537.11 s. vde_release.py --check 14/14 PASS.
2026-11-06 06:48:32 +08:00