Commit Graph
2549 Commits
Author SHA1 Message Date
hm f065979123 Merge branch 'feat/drawing-dxf-block-import' into feat/integration-drawing-dxf
Bring the drawing-branch DXF/DWG capability line (485505a8, v1.0.0-3379,
based on 391152439, 64 commits, 37 files +41575/-860) onto the latest VDE
engine line (cf60fed8, v1.0.0-3490).

Scope merged: DXF/DWG writers (io_dxf/dwg_writer/dwg_writer_r12), DWG
object decoding (dwg_object), MLINE/HATCH/HELIX/ACAD_TABLE, D-14
dwg_helix_bridge, DWG compare, STYLE/DIMSTYLE/LTYPE/XREF tables,
3DFACE/Dimension/underlay bridge and the matching foundation/brep tests
(tests/foundation + tests/brep + tests/drafting).

Conflict resolution: no textual conflicts (git merge clean). Only
src/CMakeLists.txt was modified on both lines and was auto-merged:
CBRA/SMLib target-side vde_curves/vde_brep entries are preserved, and the
drawing-side vde_io additions (foundation/dwg_compare.cpp,
brep/dwg_helix_bridge.cpp) are added; no side's lines were dropped.

No version-chain/CHANGELOG edits; no main-tree changes.
2026-11-18 14:28:19 +08:00
hm cf60fed8a5 chore(repo): CBRA-L4 - L-stage closeout and PR #1 final review (1.0.467)
Close out CBRA L stage (L1 1.0.464 find_seeds -68.1%, L2 1.0.465 CB4 R4 tolerance scaling, L3 1.0.466 P5f opt-in) with release governance: version 1.0.467, report 532, L-stage worktree archive (build/cleanup/l/, 12 files) and removal (worktree 1), merge checklist updated to 1.0.467, PR #1 final review (open/mergeable, base main@9bda9f16, branch ahead 71, 154 files +42436/-123). Full ctest 9121 passed 0 failed (735.38 s).
2026-11-18 01:40:27 +08:00
hm 98da71df49 feat(brep): CBRA-L3 - P5f expensive-success saturation parameterized (opt-in, 1.0.466)
Parameterize P5f dispatch controls: expensive-success cooldown (mode/threshold/duration env) and combined operand-sum budget (a+b faces admission), default off (behavior identical to 1.0.465). Sweep candidate C2 (takeover + 10s cooldown + budget 48) passes all gates: macro ctest 0.676, BENCH 0.707, matched-set CPU 0.9445 (1098 items, 0 failures). Adopted as opt-in only; 3 reservations documented (macro gain mainly from budget admission, bench/stress bucket regressions, 1.0.465 default macro regression). 18 [CBRA] rows byte-identical; CBRA fast/slow 98/98; full ctest 9121 passed 0 failed.
2026-11-18 01:22:26 +08:00
hm 93f8078f1e feat(brep): CBRA-L2 - CB4 R4 remaining fixed absolute tolerance scaling (1.0.465)
Scale the last two model-scale-independent fixed absolute tolerances in the assembly path (crossover=100): detect_coincident_faces tol and add_fragment reid_tol. scale<=100 bitwise unchanged (guard returns base); scale>100 uses 1e-5/2e-4 relative floors. 13 resolution floors documented as intentional. 18 [CBRA] rows byte-identical; CBRA fast/slow 98/98; heal 142/142; full ctest 9121 passed 0 failed.
2026-11-18 01:02:40 +08:00
hm c8281f180a feat(brep): CBRA-L1 - CB1 find_seeds dedup hotspot (1.0.464)
find_seeds seed dedup was O(seeds^2) no-op on torus x cylinder fixtures (106M distance evals ~425 ms); skip dedup when grid spacing > dedup radius, early-exit ok(), profile counters. find_seeds 571.91->182.14 ms (-68.1%), trace 645.68->259.26 ms (-59.8%), torus cut 292/250/283->129/138/146 ms. 18 [CBRA] rows byte-identical; VERIFY_UV mismatch=0; full ctest 9119 passed 0 failed.
2026-11-18 00:24:14 +08:00
hm 1bff99553e feat(brep): CBRA-K4 - exact difference support domain finalized (1.0.463) 2026-11-17 22:13:45 +08:00
hm 7357de5d3f feat(brep): CBRA-K3 - CB4 R3 minimal-scale contract; per-entity tolerances (1.0.462) 2026-11-17 21:53:55 +08:00
hm 9c82eef8bb docs(brep): CBRA-K2 - CB1 trace residual evaluated, not adopted (1.0.461) 2026-11-17 21:34:34 +08:00
hm ce42ab4a88 docs(brep): CBRA-K1 - P5f expensive-success saturation conditionalized, not adopted (1.0.460) 2026-11-17 21:19:45 +08:00
hm a33d56ad9d docs: fill 1.0.459 release verification numbers 2026-11-17 19:53:53 +08:00
hm 9958d6b528 chore(repo): CBRA-J4 - PR #1 review and merge readiness (1.0.459) 2026-11-17 19:53:20 +08:00
hm b0733dc226 feat(brep): CBRA-J3 - CB4 R2 tolerance scaling; exact planar tool support (1.0.458) 2026-11-17 19:37:23 +08:00
hm 66415a4a91 feat(brep): CBRA-J2 - CB1 bisect residual iterations 50->20 (1.0.457) 2026-11-17 19:10:52 +08:00
hm d4e69a88bf docs(brep): CBRA-J1 - P5e expensive-success saturation evaluated, not adopted (1.0.456) 2026-11-17 18:51:59 +08:00
VDE 293807b3e1 feat(brep): CBRA-I2 - suppress redundant robust SSI fallback; cleanup tolerance scale contract (1.0.455) 2026-11-17 11:53:16 +08:00
hm d2587a8f5c feat(brep): CBRA-P5d - chain CBRA budget tightening; stabilize legacy-parallel flake (1.0.454) 2026-11-17 11:27:29 +08:00
hm 296dad126e feat(foundation): R13/R14 class 实体 MULTILEADER 解码覆盖扩展
- 新增 DwgMultiLeader 结构族(引线/折断/折线点/MLEADER_CONTEXT_DATA 文本或块内容/箭头/块标签),按 LibreDWG dwg2.spec:1348-1512 与 MLEADER_CONTEXT_DATA 宏 :1277-1342 实现 R14 读侧解码;
- 注册 MultiLeader=672(classes.c:298/1662)、is_entity_type、type_name、resolve_class_object 仅 R14 门控(R13 无实例、R2007+ 布局未取证,保持 unsupported 并告警,不产假数据);
- dwg_compare 增加 write_multi_leader 与 visitor,字段序与解码一致;
- 新增 3 个测试用例(R14 正向/布局不匹配降级/R13 门控),原负向用例改为 ACAD_TABLE;test_dwg_tables 57/57;
- 真实样本:example_r14、r14/Leader.dwg MULTILEADER 0/1→1/1、decoded+1、unsupported 各减 1、残差 0;example_r13 不变;
- 黄金字节 AC1015 4601B/FNV 0x3a0bbc39ae6f9ecb、AC1032 7977B/FNV 0xcc12865126b095e8 保持;写侧零改动。
2026-11-17 04:07:15 +08:00
hm 9e29c0436f feat(foundation): R13/R14 class 实体 WIPEOUT/LIGHT 解码覆盖扩展
- 新增 DwgObjectType::Wipeout(731)/Light(658) 与 DwgWipeout(AcDbRasterImage 同构)、DwgLight/DwgLightPhotometric 结构与 variant 分支;type_name 同步。
- decode_entity_data 新增 Wipeout/Light 字段序,依据 LibreDWG src/dwg2.spec:1615-1672 / 2374-2456:WIPEOUT 含 class_version、pt0/uvec/vvec、image_size、imagedef(340)、display_props、clipping、brightness/contrast/fade、imagedefreactor(360)、clip_boundary_type/num_clip_verts/clip_verts;LIGHT 含 class_version、name、type、status、color、plot_glyph、intensity、position/target、attenuation、shadows 等。class_version>10 拒绝,字段布局不匹配时按失败告警,不猜测。
- LIGHT photometric 条件段采用确定性残差判定:基础段后仍有剩余位才读,读后必须恰好到达 data_region_end,否则失败告警。
- resolve_class_object 版本门控(仅 R13/R14)并映射 WIPEOUT/AcDbWipeout、LIGHT/AcDbLight;类实体失败告警区分“类型未实现”与“字段布局不匹配”;entity_unsupported 只数 Unused 的口径不变。
- dwg_compare 的 visitor 覆盖新增 variant 类型,避免 std::visit 穷举失配。
- 测试:test_dwg_tables 新增 4 个合成最小容器用例(WIPEOUT R13 矩形+class_version 越界负例、WIPEOUT R14 多边形剪裁、LIGHT R13 基础段、LIGHT R14 photometric),54/54;相关 7 套件 238 PASS / 5 SKIP / 0 FAIL;黄金字节 AC1015 4601B/FNV 0x3a0bbc39ae6f9ecb、AC1032 7977B/FNV 0xcc12865126b095e8 保持。
- 真实样本:example_r13 decoded/consistent 5286→5289、unsupported 4→1、warnings 5→2;example_r14 257→260、unsupported 5→2、warnings 6→3;WIPEOUT 2/2、LIGHT 1/1;其余样本不变,剩余 ACAD_TABLE/MULTILEADER 未实现。
- 文档:api-reference-foundation.md 增加 D-14 尾项说明(字段序依据、版本门控、前后数字)。
2026-11-17 02:08:15 +08:00
hm f6640cc268 docs: correct branch-ahead count wording in 1.0.453 governance report 2026-11-17 00:47:07 +08:00
hm 1d6f7d0e1b chore(repo): CBRA-H - repository and release governance (1.0.453) 2026-11-17 00:46:30 +08:00
hm 7a534c2e68 feat(brep): CBRA-G - CB1 local projection in bisect; CB4 degenerate-run contract + tests (1.0.452) 2026-11-17 00:25:39 +08:00
hm 6c9c8b6538 feat(brep): CBRA-P4 - audit volume contract, precision authority documented (1.0.451) 2026-11-17 00:04:00 +08:00
VDE Agent f32126a343 feat(brep): CBRA-P5c - default-on dispatch, failure learning, bounded attempts (1.0.450) 2026-11-16 23:43:55 +08:00
hm 5a1676304b feat(brep): CBRA-D - sync origin/main (9bda9f16); release governance (1.0.449) 2026-11-16 18:25:54 +08:00
hm d8e26766b2 merge: sync origin/main (9bda9f16) into feat/smlib-brep-nurbs-align-1.0.400 (1.0.449) 2026-11-16 17:54:51 +08:00
hm f20f2016e4 feat(brep): CBRA-C - CB1 param warm-start chain; parallel audit (1.0.448) 2026-11-16 17:54:21 +08:00
hm f035d50ad6 feat(brep): CBRA-B1 - exact difference tool eligibility independent of tool representation (1.0.447) 2026-11-16 17:07:03 +08:00
hm 1902d99f97 feat(brep): CBRA-P5b - gate fast path for sphere shells; default-dispatch A/B evaluated, opt-in kept (1.0.446) 2026-11-16 16:25:18 +08:00
hm 0dce01fed8 feat(foundation): R13/R14 ACIS silhouettes 位修正 + 类实体(HATCH/LWPOLYLINE)识别
- R13 ACIS 实体 −2 bit 根因:read_modeler_geometry 中 num_silhouettes BL
  在 isoline_present=0 时仍存在(依据 ACadSharp DwgObjectReader 与 VDE
  写侧 isolines=0→isoline_present=0→num_silhouettes=0 结构一致),改为
  无条件读取;R13 3 个 3DSOLID/REGION 残差 −2→0,consistent 0→1。
- 类实体识别:此前仅按内置类型码判 is_entity,R13/R14 的类实体
  (CLASSES item_class_id==0x1F2,LibreDWG dwg.c:2095-2099)被静默跳过;
  现补 HATCH/AcDbHatch、LWPOLYLINE/AcDbPolyline 映射(布局与固定类型
  相同),其余未实现类实体逐条告警并计入 entity_unsupported 新计数;
  新增 entity_class_objects/entity_unsupported 计数并接
  DwgImportResult::dwg_entity_*。
- 加固:IMAGE/IMAGEDEF class_version 限 0–10;HATCH 种子点按
  avail_bits/128 截断;LEADER endptproj 经 ACadSharp 确证 >=R14 门控正确
  (未改)。
- 真实样本:example_r13 objects 5780→5785、warnings 11→6、entity
  未变 5285/5285/5282→5290/5285/5285;example_r14 objects 814→832、
  warnings 37→7、HATCH×1+LWPOLYLINE×11 从不可见变为 consistent
  (entity 262/256/256,HATCH 6 段边界与同文件 DXF 一致)。
- 测试:test_dwg_tables 46 passed(+8:类实体计数/映射、LEADER R13/R14、
  TOLERANCE、HATCH、3DSOLID silhouettes、IMAGE class_version)、
  test_dxf_tables 20、test_dwg_writer 38+1 skip、test_dwg_object 8+4 skip、
  test_dxf 43、test_dxf_drawing 23、test_brep_drawing 43;黄金字节
  AC1015 4601B/FNV 0x3a0bbc39ae6f9ecb、AC1032 7977B/
  0xcc12865126b095e8 保持(写侧未改)。
- 风险:num_silhouettes 位置与 LibreDWG master spec 相反(以 ACadSharp+
  写侧+位级实测为准);ACIS 载荷仍不解析;未实现类实体
  (MULTILEADER/WIPEOUT/LIGHT/ACAD_TABLE/ARC_DIMENSION)布局未验证。
2026-11-16 13:25:05 +08:00
hm 7d90698a8d feat(foundation): R13/R14 实体公共数据位流修正与常用实体解码覆盖
- 根因:公共实体数据流对 R13/R14 多读 12 bit —— ltype_flags(BB)、
  plotstyle_flags(BB)、lineweight(RC) 均为 LibreDWG SINCE(R_2000b),仅
  R2000+ 读取;BT/BE 按 R2000 语义多读前导位;TEXT/LINE/LWPOLYLINE/INSERT
  等另有 R13/R14 字段布局差异。
- 修正:BitReader::bt/be 增加 modern 版本参数(默认保持 R2000+ 语义);
  decode_entity_common 三字段版本门控;read_common_text_data 新增 R13/R14
  分支;LINE thickness+extrusion、CIRCLE/ARC/POINT/SOLID/POLYLINE2D 的
  bt/be、LWPOLYLINE 顶点 2RD、MTEXT linespace、INSERT/MINSERT 3BD scale
  按版本门控;新增 entity_objects/entity_decoded/entity_consistent 统计
  (consistency = decoded 且 data_residual_bits==0),原生导入路径复制到
  DwgImportResult::dwg_entity_*,并纠正 R13/R14 需外部转换器的过期指引。
- 真实样本:example_r13.dwg 实体解码 4601/5232 → 5285/5285(剩余 2 个
  非对齐为 3DSOLID×1+REGION×2 ACIS 载荷);example_r14.dwg 92/214 →
  244/244;LINE huge=1722/1367 → 0/1367(max_abs 2.67e11 → 11789.5);
  drawing.extents 由 ±1e250 级回到万级。
- 测试:test_dwg_tables 38/38(+8 R13/R14 实体位流用例,最小 AC15 容器,
  逐字段+data_residual_bits==0+计数断言);test_dxf_tables 20/20、
  test_dwg_writer 38+1skip、test_dwg_object 8+4skip、test_dxf 43/43、
  test_dxf_drawing 23/23、test_brep_drawing 43/43、test_dwg_xref 9/9、
  test_dwg_underlay_bridge 17/17;黄金字节 AC1015 4601B/FNV
  0x3a0bbc39ae6f9ecb、AC1032 7977B/0xcc12865126b095e8 保持(写侧未改)。
- 风险:R13b1/R13c3 子版本无法区分(LEADER endptproj 仍按 >=R14);
  R13/R14 无 lineweight 字段保持默认;3DSOLID/REGION ACIS 载荷不解析;
  HATCH/IMAGE 未逐字段验证;剩余非实体类 warnings 为既有问题。
2026-11-16 12:15:49 +08:00
hm 7d18dfda0c feat(foundation): R13/R14 HEADER 变量区解析(AC15 同框取证 + 关键变量映射)
- 规范取证:LibreDWG header_variables.spec 全量布局与 decode.c decode_R13_R2000
  (R13/R14 与 R2000 同框:16B 哨兵 + RL 声明长度 + 字节对齐位流 + CRC16),
  VDE decode_header_section 无需新框架,仅修版本门控。
- 核心修复:DIMPOST/DIMAPOST 两个 TV 仅 R2000–R2004 出现
  (header_variables.spec:361-376 IF_FREE_OR_SINCE(R_2000b){ PRE(R_2007a) }
  ),旧实现无条件读取导致 R13/R14 从旧版 DIM 块起整体错位;R2007+ 走独立
  字符串流,移除后位长/字段值不变。
- 新增解析:////、//
  / 名称回填(只认类型匹配的已解码对象,缺失不猜名并计数)、
  unknown_variable_count 逐项计数;DwgObjectDocument.code_page、
  DwgImportResult 15 个 dwg_* 字段纯增量;native_dwg_to_drawing 仅在
  R13/R14 且实体包围盒为空时用 header extents 兜底。
- 测试:test_dwg_tables 30/30(新增手工最小 AC15 容器 header 用例 R13/R14)、
  test_dwg_object 8+4skip、test_dxf_tables 20/20、test_dwg_writer 38+1skip、
  test_dxf 43/43 全绿;黄金字节 AC1015 4601B/FNV 0x3a0bbc39ae6f9ecb、
  AC1032 7977B/0xcc12865126b095e8 保持。
- 真实样本:example_r13/r14 header_ok 0→1,字段与 LibreDWG dwg2dxf 真值逐项
  一致;位长残差(≡4 mod 8)与 R13 80 位尾部扩展保留诚实告警,DIMSTYLE 句柄
  未解析如实计数。
- 风险:R13/R14 实体几何位流既有异常(extents ±1e168)与本轮无关未修;
  外部 CAD 未验证。
2026-11-16 11:27:34 +08:00
hm e2c206f5c6 feat(foundation): R13/R14 LAYER 独立 4 位解码 + 非实体对象 RL bitsize 帧修复
- 规范依据 LibreDWG master src/dwg.spec:3274-3279:R13/R14 LAYER 为 4 个独立
  FIELD_B(frozen -> off -> frozen_in_new -> locked),无 flag0/plotflag/
  lineweight;color 为 CMC(BS),负索引表示 off;plot 默认 true、lineweight -3。
- 修复前置阻塞:R13/R14 非实体对象的 RL bitsize 位于 self handle+EED 之后
  (实体则在 preview 之后),原解码器对所有对象按实体帧预扫描导致表对象位流
  全面错位(真实样本修前 0 个 LAYER 可解)。decode_object_at 现在先解析类型
  再做双帧 bitsize 预扫描,实体/非实体各自消费正确位置。
- dwg_object.cpp:实体公共数据补 R13/R14 RL bitsize;Layer 解码新增 R13/R14
  四独立位 + 负色号分支(R2000+ flag0 原路径不变)。
- 写侧无 R13/R14 目标:dwg_writer.h 增加版本范围说明,输出字节零改动。
- 测试:test_dwg_tables 28/28(新增 R13/R14 解码 3 例,手工最小 AC15 容器)、
  test_dxf_tables 20/20、test_dwg_writer 38+1 skip、test_dwg_object 8+4 skip、
  test_dxf 43/43;黄金字节 AC1015 4601B/FNV 0x3a0bbc39ae6f9ecb、AC1032 7977B/
  0xcc12865126b095e8 保持。
- 真实样本交叉验证(%TEMP%,不入库):example_r13.dwg objects 1437->5727、
  consistent 0->64、LAYER 5/5 解码;example_r14.dwg objects 85->784、LAYER 5/5,
  与配套 DXF LAYER 表逐项吻合。
- 风险:R13/R14 HEADER 变量区仍未解析;实体/类对象覆盖不完整;无写目标不能
  round-trip;合成测试为手写最小 AC15 容器。
2026-11-16 10:35:40 +08:00
hm 3db57bf55b feat(brep): CBRA-P5(4) - default-dispatch A/B re-evaluation; legacy pins scoped (1.0.445) 2026-11-16 09:51:31 +08:00
hm 99a48ce3f3 feat(brep): CBRA-P5 - gate cost reduction, chain budget/breaker, overrun cap (1.0.444) 2026-11-16 08:31:57 +08:00
hm 579c5edc6d feat(foundation): R12 DWG LAYER frozen/locked/off 位写出 + bridge 状态复核
- R12(AC1009)LAYER 记录按 LibreDWG dwg.spec PRE(R_13b1) 分支写出状态位:
  flag bit0 frozen / bit1 frozen_in_new / bit2 locked,off 用 62 负色号表达;
  emit_tables case 2 组装,读侧 decode_r12_table 按位解码;plottable 自
  R2000b 才有 plotflag,R12 保持诚实降级(计数+中文 warning)。
- 降级清单收敛:删除 R12 off/frozen_in_new/frozen/locked 计数+warning,
  仅保留 plottable/linetype/lineweight/true_color;DwgWriteLayer 头文件位语义
  与历史计数字段注释同步(api-reference-foundation.md 更新)。
- DXF<->DWG 桥 plot/plottable 与 off/frozen-in-new 双向传播复核结论:HEAD
  已完整(f2f1b8f2/de71cce0/de45ed68 三提交),本轮仅补测试与注释,无源码逻辑改动。
- 测试:test_dwg_tables 22/22(新增 R12 往返、四状态全置位、bridge 读回)、
  test_dxf_tables 17/17(新增 bridge R12 状态传播、默认未置位与原生写字节逐字节一致)、
  test_dwg_writer 38+1skip、test_dwg_object 8+4skip、test_dxf 43/43、
  test_dwg_underlay_bridge 13/13、test_dwg_xref 9/9 无回归;
  黄金字节 AC1015 4601B/FNV 0x3a0bbc39ae6f9ecb、AC1032 7977B/0xcc12865126b095e8 保持。
- 风险:R13/R14 独立 4xFIELD_B LAYER 布局未实现;R12 plotflag/370/420
  规范不可表达保持降级;未外部 CAD 实机验证。
2026-11-16 07:03:44 +08:00
hm 9bda9f169b feat(brep): point-based entity picking and display mesh audit for host feedback
VDE-1345: add brep::pick_entity (world-space hit point -> nearest B-Rep
face/edge/vertex) so the host can resolve mate entities without treating
display-mesh triangle indices as B-Rep face ids. Ties prefer the more
specific entity (Vertex > Edge > Face); out-of-range/NaN/empty model return
nullopt instead of throwing. Add mesh::display_mesh_triangle_face as the
only safe triangle -> face mapping entry point.

VDE-1276: add mesh::audit_display_mesh, a topology/array consistency audit
for host display-mesh caches (invalid/hidden face tags, unrepresented
faces, failed-face triangles, out-of-range indices, degenerate triangles,
array length mismatches).

Tests: 5 VDE1345EntityPick cases in test_vde1238_entity_geometry and 5
display-mesh audit/mapping cases in test_display_mesh.

test_vde1238_entity_geometry 25/25, test_display_mesh 21/21, test_brep
96/96, PR gate 918/918 (58.66 s).

Docs: new docs/reference/host-entity-pick-2026-11-16.md; kernel-side
handling sections in VDE-1345/VDE-1276; feedback status, remaining gaps
and synthetic host fixtures updated.
2026-11-16 06:46:51 +08:00
hm 16a85d106a test(brep): content-level corpus search with real-product regressions
按用户要求改为按语料「实际内容」而不是文件名搜索(377,293 文件 / 229.64 GB):
- 全内容标记扫描:229.64 GB 全部内容(ASCII+UTF-16 双编码)0 处宿主运行时
  dump;faceid 45,491 处命中全部为 SolidWorks 流名/字段/标签(surfaceidrep、
  meshfaceids、faceidtag 等),另有 454 处 CAD 内部标注,均非宿主数据。
- SolidWorks 嵌入内容抽样 5,200 个 .sldprt:98.9% 含中文产品/配置名,77.3%
  含被引用零件名——语料确为真实产品设计(此前文件名关键词搜不到不代表没有)。
- CAD 几何扫描:7,295 个 STEP/IGES/STL 中 5,792 个(79.4%)导入并逐 body 采集
  面数/内环/面类型/显示网格/壁厚(14,614 bodies,8,220,666 faces);SLDPRT
  336,324 个 import ok 但 0 面(sldprt_plugin.cpp:396 几何解码未完成)。
- 新增真实产品件回归(10 个用例):电子连接器 HMTSW-104(显示网格水密)、
  Mastercam 直线导轨 LG-CMX250350(214 面/206 内环,显示网格与 face id 合法
  性)、微轴承 4×12×4(26 个周期面、0.90 mm 薄壁与壁厚分析)。
  避开真实件性能陷阱:merge_coplanar_faces 214 面 103.8 s、
  face_cylinder_geometry 5.3 s/面(face_type 无缓存),用例只做抽样断言。
- 文档 docs/reference/corpus-search-2026-11-15.md 升 v2.0(内容级方法/命中分类/
  几何统计/失败归因/真实样本/回归表/复现),更新 remaining-gaps 第 4 项与
  synthetic-host-fixtures 开头的“语料库/公网均无”表述。

验证:test_real_corpus_feedback 10/10(3.9 s)、ctest -R RealCorpusFeedback
10 passed + 1 skipped、test_brep 96/96、PR gate 918 项 exit 0。
2026-11-16 03:58:13 +08:00
hm de45ed6887 feat(foundation): DXF<->DWG LAYER 状态字段双向桥接
- DXF LAYER 补齐解析/写出:70 位1=frozen、位2=frozen-in-new、位4=locked,
  负 ACI=off(62),290=plottable(R2000+),6/370/420(线型名/线宽/真彩)。
- DWG LAYER flag0:bit0 frozen、bit1 off 0x02、bit2 frozen-in-new 0x04、
  bit3 locked 0x08、bit4 plot 0x10、bits5-9 线宽索引;真彩仅 AC1032 CMC。
- DXF->DWG 与 DWG->DXF 桥接传播全部状态字段(三态仅显式非默认置位,
  默认聚合初始化逐字节等价,黄金字节 AC1015 4601B/FNV 0x3a0bbc39ae6f9ecb、
  AC1032 7977B/0xcc12865126b095e8 保持)。
- R12 与 AC1015 真彩等不可表达字段:计数 + 中文 warning,不静默丢弃。
- 新增 8 个写出报告计数(DwgDrawingWriteReport/DwgWriteResult/DxfTablesWriteReport)
  与三通道可选 DwgWriteResult* 出参;API 文档更新。
- 测试:test_dxf_tables 12/12、test_dwg_tables 21/21、test_dxf 43/43、
  test_dwg_writer 38+1skip、test_dwg_object 8+4skip、test_dwg_underlay_bridge
  13/13(临时 Ninja/MinGW,746/746 目标编译通过)。
2026-11-16 03:24:34 +08:00
hm f5aeeeb424 fix(curves): initialize plane normal before coplanarity test in is_circle_section
is_circle_section used the caller's uninitialized Vector3D normal in the coplanarity sampling loop before assigning it at the end; suffix tests rewriting the stack flipped rational-circle sections to the generic resampling path, giving loft weight sum 26.414213562 instead of 23.485281374 and offset fit residuals 4.3e-2. Assign plane_normal before the loop and hand it back as the output.

Regression: MeasureTest.LoftOfRationalCirclesStaysRational (rational Coons prefix + 3-circle loft; weight sum and v-boundary tolerance 1e-12). test_measure 160/160; test_generative_surfaces 33/33; test_curve_tools 52/52; test_brep 96/96; PR gate 918/918.
2026-11-16 03:05:27 +08:00
hm da6b581c7a feat(brep): CBRA follow-up - default-dispatch A/B re-evaluation + origin/main sync (1.0.443) 2026-11-16 02:36:16 +08:00
hm bb9b8d846e perf(brep): parallel per-face analytic measure (PWB body2 body_volume 32.8s -> 7.8s)
analytic_measure now evaluates faces in parallel by default (hardware concurrency capped at 16; serial for <16 faces, or when a MassIntegralBudget is supplied). Per-face reduction is performed in face order on the main thread, so results stay bit-identical to the serial path: PWB_110_12_MD_30W.STEP body2 body_volume drops from 32.8 s (serial) to 7.77 s on 8 threads with volume/area unchanged. VDE_ANALYTIC_THREADS overrides the thread count (1 = serial).

Add AnalyticMeasureParallel.MatchesSerialBitwise to test_measure, keeping a bitwise serial-vs-parallel contract. While pinning the flake, MeasureTest.OffsetSurfaceLoftIsHighAccuracy remains order-dependent in full runs (pre-existing).
2026-11-16 02:29:22 +08:00
hm 23a48a3df0 fix(mesh): watertight display mesh for defective spline B-Rep (shared-edge UV CDT + Steiner points) 2026-11-16 01:57:00 +08:00
hm db251ead95 merge: sync origin/main (d90f078b) into feature branch before 1.0.443 2026-11-16 01:26:21 +08:00
hm f2f1b8f25c feat(foundation): D-02/D-20 DXF/DWG LAYER 打印标志(290/plottable)读写
- DXF LAYER 表新增 plot 字段(默认 true),解析组码 290(0=不打印,R2000+);
  dxf_write_tables_string 仅在显式 plot=false 且目标 R2000+ 时写 290=0,
  R12 降级计数 + 告警;默认/空表输出与旧字节完全一致(AC1015 4601B /
  FNV 0x3a0bbc39ae6f9ecb,AC1032 7977B / 0xcc12865126b095e8)。
- DWG LAYER: DwgLayer 增 plottable(R2000+ flag0 bit4 0x10 解码),
  DwgWriteLayer 增 std::optional<bool> plottable(nullopt=旧字节默认、
  false=显式不打印、true=置位),R12 显式设置降级计数 + 告警;
  DwgWriteResult 增 layers_plottable_skipped,DxfTablesWriteReport 增
  layers_plot_skipped。
- 测试:test_dxf_tables 9/9、test_dwg_tables 15/15(新增 6 例),
  test_dwg_writer 38+1skip、test_dwg_object 8+4skip、test_dxf 43/43 无回归;
  黄金字节基线与 R12 降级字节均有断言。
- 诚实记录:桥接映射(export_dwg_drawing / DWG->DXF)暂不传播 plot 标志
  (会与默认字节基线冲突,需独立基线升级任务);VDE 读侧仍未解码
  flag0 的 off/frozen-in-new 位。

验证:MinGW g++ 16.1 + Ninja/CMake 临时构建 third_party/ViewDesignEngine/build/vde-r44,
5 个相关套件全绿。
2026-11-16 01:19:15 +08:00
hm 2540d89549 test(brep): real corpus regressions for host feedback paths (VDE-903/1276/1345)
全语料搜索(377,293 文件)找到 2 份 ViewDesignEngine 导出的真实 STEP,
把「宿主导出 → 内核再导入 → 合并/显示/布尔/几何查询」链路钉到真实数据:

- tests/brep/test_real_corpus_feedback.cpp:7 个固定回归(导入/显示网格/
  共面合并/薄壁差集/越界查询/整体 validate),另带开发期探针;缺语料自动
  GTEST_SKIP,不进入 PR gate。
- docs/reference/corpus-search-2026-11-15.md:搜索范围/方法/命中清单/
  实测指标(含 PWB body2 384 Spline 面 576 开放边、体积 34s、合并 69s)
  与仍然缺失的宿主运行时样本(face-id 序列/display-mesh 缓存/cutParametric)。
- 更正 remaining-gaps 第 5 项与 synthetic-host-fixtures 开头「语料库/公网
  均无」的无证据断言;补充未关闭项 1 的宿主导出同类实例。
2026-11-16 00:11:49 +08:00
hm a5675bbf59 feat(brep): CBRA follow-up - CB1 perf, legacy-first volume gate, hard time budget (1.0.442) 2026-11-16 00:00:19 +08:00
hm 6ca5bf7445 feat(brep): CBRA-P3 - stage timings, dispatch/assembly time budgets; bounded fallback cost (1.0.441) 2026-11-15 20:09:18 +08:00
hm d5e6385e9f feat(brep): CBRA-P1b - torus-cylinder union loose branch chaining; 9 curved fixtures pass audit (1.0.440) 2026-11-15 19:04:55 +08:00
hm 898d32616a feat(brep): CBRA-P2 - strict dispatch env parsing, exact-contract isolation; env=1 A/B 4 failures cleared (1.0.439) 2026-11-15 18:08:52 +08:00
hm c5f78b7768 feat(brep): CBRA-P1 - torus-cylinder offset-axis tracing/param fixes; inter/diff pass audit (1.0.438) 2026-11-15 17:17:04 +08:00