Commit Graph
918 Commits
Author SHA1 Message Date
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 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 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 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 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 b2e73d1733 docs(feedback): normalize legacy report filenames; add VDE-1351..1353 2026-11-14 05:23:16 +08:00
hm 9c8024ad0d feat(brep): repair curved T-junction dangling edges in boolean results (VDE-1608) 2026-11-13 22:27:04 +08:00
hm db1a490808 test(brep): add sphere-through-cylinder boolean tripwire (VDE-1607) 2026-11-13 17:35:19 +08:00
hm 4c6e387135 test(brep): add boolean containment/disjoint matrix regression (VDE-1606) 2026-11-13 17:04:49 +08:00
hm 22abb96b94 feat(brep): containment fast paths for analytic spheres in any solid (VDE-1605) 2026-11-13 16:40:45 +08:00
hm 8384f6d349 test(brep): add unequal-radii sphere boolean regression (VDE-1604) 2026-11-13 16:14:31 +08:00
hm 685245f50c docs(release): record merged-tree 1.0.395 suite numbers 2026-11-13 15:55:16 +08:00
hm a5d6e15b3a Merge remote-tracking branch 'origin/main' 2026-11-13 15:31:13 +08:00
hm a76dbbb32a feat(brep): add make_sphere_cavity analytic sphere cavity shell (VDE-1603) 2026-11-13 15:30:27 +08:00
hm 52405b4c51 feat(brep): merge coplanar faces with curved boundaries 2026-11-13 13:42:26 +08:00
hm 75b881ef86 feat(brep): add make_sphere_difference analytic difference shell (VDE-1602) 2026-11-13 13:25:24 +08:00
hm 3422cdb96a feat(brep): add make_sphere_union analytic sphere-sphere union shell (VDE-1601) 2026-11-13 13:07:19 +08:00
hm cf9b606052 feat(brep): containment fast path for sphere-sphere union (VDE-1600)
1.0.392: brep_union 增加球包含快路径——两体均为解析球且 d<=|r1-r2|+1e-9*max(r) 时直接返回大球(前置声明 detect_analytic_sphere)。实测 union(make_sphere(2,0,0), make_sphere(1,0,0,Point3D(0.5,0,0))) = 6 面、体积 33.510321638(4/3 pi R^3 精确)、valid=1、watertight=1.0,交换顺序一致。新增 MeasureTest.SphereUnionContainedFastPath。全量 8,756 执行/8,716 passed/0 failed/668.06s;注册 8,757;报告 450;计划 47.184;版本 1.0.392。
2026-11-13 12:33:17 +08:00
hm b91c22d558 Merge remote-tracking branch 'origin/main' 2026-11-13 12:11:52 +08:00
hm 91a3a80ce5 test(brep): lock sphere-sphere intersection fast path (VDE-1599)
1.0.391: 新增 MeasureTest.SphereSphereIntersectionFastPath,覆盖 brep_intersection 球x球解析快路径:相交(R2,d3)8 面/valid=1/watertight>=0.999/体积 2.879793295 vs 解析 2.879793266(1e-6 容差)、包含返回小球(6 面, 4.188790)、分离返回 0 面、平移布局 (1,2,3)/(4,2,3) 通过。全量 8,754 执行/8,714 passed/0 failed/817.11s;注册 8,756;报告 449;计划 47.183;版本 1.0.391。
2026-11-13 12:11:51 +08:00
hm 2b06200705 feat(brep): merge coaxial cone fragments into natural periodic face 2026-11-13 12:02:49 +08:00
hm 78d2bf73d3 feat(brep): analytic sphere-sphere intersection fast path (VDE-1598)
1.0.390: brep_intersection 在通用 SSI 前增加解析球识别与 lens 快路径。球体识别:顶点球面最小二乘拟合(2c·x+k=|x|^2,正规方程 4x4,radius^2=|c|^2+k),校验顶点半径 1e-9、各面 is_spherical(1e-6)、面内 3x3 采样 1e-6。分支:包含->小球/分离->空体/否则 make_sphere_lens。实测 make_sphere(2,0,0) 与 make_sphere(2,0,0,Point3D(3,0,0)) 交集:8 面、valid=1、watertight=1.0、体积 2.879793295 vs 解析 2.879793266(相对 1.0e-8);包含返回小球 4.188790;分离 0 面。更新 MeasureTest.SphereSphereCrossingBooleansKnownLimited(交集 valid/watertight/1e-6)与 MeasureTest.BooleanMembershipAuditDetectsSphereSphereFailures(交集审计误判<=0.05、extra=0,并集/差集保持)。另恢复被误删的 substitute_pointy_cone_tool。全量 8,753 执行/8,713 passed/0 failed/731.28s;注册 8,755;报告 448;计划 47.182;版本 1.0.390。
2026-11-13 11:50:43 +08:00
hm 376d61e893 feat(brep): add make_sphere_lens exact lens for arbitrary sphere pairs (VDE-1597)
1.0.389: 新增 BrepModel make_sphere_lens(center1,r1,center2,r2,quadrants=4)(include/vde/brep/modeling.h + src/brep/modeling.cpp)。任意球心/轴向:axis=(c2-c1)/d,构造正交基,两球面控制网按该基旋转;capA v in [vcA,1],capB v in [0,vcB](同一基,切圆弧一一对齐);每球 4 个 90 度经度片,共享切圆弧与子午线,8 面水密壳;分离/包含或非法输入返回空体。实测:球心 (1,2,3)/(4,2,3) 与轴向 (1,1,1)/sqrt3 两例 volume=2.879793266 vs 解析 2.879793266(<=1e-9),valid=1、watertight=1.0;分离(d=10)/包含(d=0.5,r=0.5) 返回 0 面。新增 MeasureTest.SphereLensExactAndWatertight。注意:测试中曾误用 Point3D+Vector3D 表达式(结果类型为 Vector3D,隐式转 Point3D 值损坏)导致误判,库本身正确;测试已改为显式 Point3D 构造。全量 8,753 执行/8,713 passed/0 failed/744.25s;注册 8,755;报告 447;计划 47.181;版本 1.0.389。
2026-11-13 11:01:26 +08:00
hm 992719a829 test(brep): build watertight analytic sphere-sphere lens shell (VDE-1596)
1.0.388: 在 1.0.387 精确球帽片基础上完成首个 watertight 解析球x球 lens 壳。构造:两球 R2 球心距 3;球面绕 y 旋转使极点沿 +x(+z->+x);capA 取 v in [vcut,1](x>=1.5),capB 取 x<=1.5 的帽(-x 极);每球 4 个 90 度经度片共享 4 条切圆弧边与各球 4 条子午线边,每片 3 边成环。实测:8 面、valid=1、watertightness=1.0000、dangling=0、non-manifold=0;body_volume=2.879793246 vs 解析 2.879793266(相对 7e-9)。新增 MeasureTest.SphereSphereLensShellIsWatertight(volume 相对 1e-8)。全量 8,752 执行/8,712 passed/0 failed/827.17s;注册 8,754;报告 446;计划 47.180;版本 1.0.388。
2026-11-13 10:34:14 +08:00
hm b24e5b0918 test(curves): lock exact rotated-sphere cap patch area for sphere-sphere lens (VDE-1595)
1.0.387: 找到无裁剪环的精确球帽片构建路径——NurbsSurface::sphere(0,0,0,R) 控制网绕 y 轴旋转 90 度(+z->+x,det=+1,实测 |p|-2 <= 4.4e-16),数值求 vcut 使 x=R-h(R2、平面 x=1.5、h=0.5 => vcut=0.768916699886),extract_sub_surface(Sx,0,1,vcut,1) 得矩形帽片;面积实测 6.283185307 = 2*pi*R*h(误差 0)。新增 NurbsSurfaceTest.RotatedSphereCapAreaIsExact(1e-12,并在测试中 include surface_tools.h)。lens 两帽同 shell 的 body_volume 实测 5.497787128 vs 期望 2.879793266:B 帽散度贡献符号错误(-1.3090 计为 +1.3090),set_face_reversed 对无环面无效,朝向/缝合留待下一轮,尚未接入 brep_intersection。全量 8,751 执行/8,711 passed/0 failed/764.81s;注册 8,753;报告 445;计划 47.179;版本 1.0.387。
2026-11-13 10:09:50 +08:00
hm 437329ae0e test(brep): add trim-domain small-hole area tripwire (VDE-1594)
1.0.386: 在 1.0.385 复测(面面积 93.363880 vs 解析 93.300298,+0.067%;对 face_measure deflection 1e-2..1e-12 与孔边数 64/256/1024 不敏感)基础上新增 MeasureTest.TrimDomainSmallHoleAreaTripwire:构造半圆柱面(make_cylinder_surface(3,10), u in [0,0.5])上 UV 半径 0.04 的 64 弦孔,断言 face_measure(frag,0).ok、面积 93.363880 +-5e-4 且大于解析值。任何积分器改动会触发该用例并迫使同步更新基线。全量 8,750 执行/8,710 passed/0 failed/865.71s;注册 8,752;报告 444;计划 47.178;版本 1.0.386。
2026-11-13 09:46:00 +08:00
hm 83788ea1de docs(brep): record trim-domain small-hole area bias baseline (VDE-1593)
1.0.385: 复测半圆柱面(make_cylinder_surface(3,10), u in [0,0.5])UV 半径 0.04 圆孔的裁剪域积分:face_measure 面积 93.363880 vs 解析 93.300298(偏差 0.067%,孔面积偏差 6.57%)。对 face_measure deflection(1e-2..1e-12)恒定、对孔边数 HN(16/64/256/1024)在 64 后饱和——说明偏差来自解析 trim-domain 积分的 UV 分辨率,而非弦高采样或三角化回退。登记为已知限制与回归基线(计划 §47.177,报告 443),不改积分器以避免裁剪稳定性风险。全量 8,749 执行/8,709 passed/0 failed/825.78s;注册 8,751;版本 1.0.385。
2026-11-13 09:23:56 +08:00
hm 9cada75017 feat(curves): add is_rational and is_bezier representation predicates (VDE-1592)
1.0.384: 新增 NurbsCurve::is_rational()(存在权重 !=1,容差 1e-15)与 is_bezier()(节点向量只有两个不同值=无内节点)。实测:直线 非有理+Bézier;圆/椭圆 有理+非Bézier;圆弧(1 rad) 有理+单段Bézier。用于 STEP/IGES 导出、曲线简化与升阶策略选择。新增 NurbsCurveTest.RepresentationPredicates。全量 8,749 执行/8,709 passed/0 failed/757.54s;注册 8,751;报告 442;版本 1.0.384。
2026-11-13 08:59:04 +08:00
hm d503761dd3 feat(curves): add is_ruled surface predicate (VDE-1591)
1.0.383: 新增 NurbsSurface::is_ruled(tol=1e-6)——分别检查 u/v 两族等参曲线(各 5 条、每条 7 点)到首末连线的最大距离是否 <= tol*控制点尺度,任一族为直线即判直纹。实测:平面/圆柱/圆锥/ruled_surface(arc,arc) true;球/环 false。新增 NurbsSurfaceTest.IsRuledDetection。全量 8,748 执行/8,708 passed/0 failed/819.07s;注册 8,750;报告 441;版本 1.0.383。
2026-11-13 08:34:43 +08:00
hm fbe9c0d27b feat(curves): add surfaces_overlap coincident-surface predicate (VDE-1590)
1.0.382: 新增 surfaces_overlap(a,b,tolerance=1e-6)——a 的参数域 5x5 采样点全部落在 b 上(distance_to <= tol*尺度且 closest_point_param 参数在 b 域内),再对 b 双向检查。实测:相同平面/相同圆柱 true;偏移 1.0 平面 false;球 x 圆柱 false。用于布尔/裁剪前识别完全重合面,避免退化求交产生伪交线。部分重叠(子面)按文档返回 false。新增 SurfIntExtra.SurfacesOverlapDetection。全量 8,747 执行/8,707 passed/0 failed/893.33s;注册 8,749;报告 440;版本 1.0.382。
2026-11-13 08:06:54 +08:00
hm 066b1ed51a feat(curves): add curves_overlap degenerate intersection predicate (VDE-1589)
1.0.381: 新增 curves_overlap(a,b,tolerance=1e-6)——采样 17 点并用 curve_closest_point 双向判定「一条整体落在另一条上」。实测:完全相同直线/同圆 true;包含(0..2 vs 0..1) true;部分重叠(0..2 vs 1..3) false(文档约定);相交/偏移 0.1 false。用于求交前识别重合段,避免把 0 交点误判为不相交。新增 CurvesExactnessTest.CurvesOverlapDetection。全量 8,746 执行/8,706 passed/0 failed/760.81s;注册 8,748;报告 439;版本 1.0.381。
2026-11-13 07:45:56 +08:00
hm 873604b629 perf(curves): use exact closest_point_param for SSI p-curve parameters (VDE-1588)
1.0.380: fill_params_by_projection 改用 1.0.379 新增的 closest_point_param(原用 project_point_on_surface,参数误差约 3e-8)。实测平面(10x10,原点 -5,-5)x 球 R2:49 点参数回代残差 a=1.3e-15、b=5.6e-17(改前约 3e-8)。新增 SurfIntExtra.SSIParamsAreExactAfterProjection(1e-12)。全量 8,745 执行/8,705 passed/0 failed/696.71s;注册 8,747;报告 438;版本 1.0.380。
2026-11-13 07:20:35 +08:00
hm 54180af57a feat(curves): expose exact NurbsSurface::closest_point_param (VDE-1587)
1.0.379: 此前 closest_point 只返回 3D 点(project_point_on_surface 参数位置误差约 6e-11)。把 VDE-1562 的脚踏点牛顿抛光抽成 NurbsSurface::closest_point_param(p)->(u,v),closest_point 改为 evaluate(closest_point_param(p)),行为不变。实测球 R2 (0.3,0.4)/(0.7,0.6)、圆柱 R2 (0.25,0.5)、环 R5xr1 (0.3,0.4)、make_sphere_surface (0.3,0.4) 取点回投:duv=0、pos=0(契约 1e-9/1e-12)。新增 NurbsSurfaceTest.ClosestPointParamIsExact。全量 8,744 执行/8,704 passed/0 failed/716.99s;注册 8,746;报告 437;版本 1.0.379。
2026-11-13 02:57:44 +08:00
hm d89a0c67c4 test(curves): lock curve closest-point exactness on ellipse and helix (VDE-1586)
1.0.378: 新增 CurvesExactnessTest.CurveClosestPointIsExact——椭圆 3x2 与螺旋线 (R2/pitch3/h3/turns2) 上取点回投:位置误差 2.0e-15 / 3.1e-15;椭圆内点参数回代误差 <=1e-10(避开接缝,接缝处 t=0/1 等价)。契约:位置 1e-12、内点参数 1e-10。全量 8,743 执行/8,703 passed/0 failed/989.72s;注册 8,745;报告 436;版本 1.0.378。
2026-11-13 02:33:55 +08:00
hm d9853a4587 test(curves): lock cylinder and sphere offset surface exactness (VDE-1585)
1.0.377: 实测 offset_surface 在圆柱/球面解析精确——圆柱 R2 偏置 +0.5/-0.5 径向误差 8.9e-16/4.4e-16;球 R2+0.5 半径误差 1.3e-15。新增 CurvesExactnessTest.OffsetCylinderAndSphereSurfacesAreExact(1e-12)。注:本轮首次跑全量时 DSH worker 因 Windows Job runner 0xC0000142 崩溃,1.0.377 测试与全量已用 ctest_377c 重跑通过(8,742/0/964.68s)。全量 8,742 执行/8,702 passed/0 failed/964.68s;注册 8,744;报告 435;版本 1.0.377。
2026-11-13 02:13:28 +08:00
hm fa509d3f64 feat(curves): add curve_lies_on_surface degeneracy predicate (VDE-1584)
1.0.376: 1.0.375 记录了曲线整体落在曲面上时 curve_surface_intersection 返回 0 的限制。新增 curve_lies_on_surface(curve, surf, tolerance=1e-6):采样 33 个曲线点,全部到曲面距离 <= tol*尺度,且 project_point_on_surface 的 (u,v) 落在曲面参数域内(1e-9 相对边距)。实测:半径 sqrt(3)、z=1 的圆在球 R2 上 true;穿球直线 false;平面参数域内直线 true;离面 0.1 直线 false;域外直线 false。新增 AdvancedIntersectionTest.CurveLiesOnSurfaceDetection。全量 8,741 执行/8,701 passed/0 failed/826.18s;注册 8,743;报告 434;版本 1.0.376。
2026-11-13 00:50:46 +08:00
hm a5f58ded38 test(curves): lock curve-surface intersection exactness on line-sphere (VDE-1583)
1.0.375: 新增 AdvancedIntersectionTest.CurveSurfaceIntersection_LineSphereIsExact——直线 (-5,0,0)->(5,0,0) 穿球 R2,返回 2 个交点:t=0.300000000/0.700000000,位置 (-2,0,0)/(2,0,0),点到曲面距离 8.9e-15/9.1e-15,|pos|=2 误差 <=1e-12。既有 CS 测试仅 1e-4 级,本用例把精度锁到 1e-9。全量 8,740 执行/8,700 passed/0 failed/884.46s (宿主负载较高);注册 8,742;报告 433;版本 1.0.375。
2026-11-13 00:29:45 +08:00
hm 463b6860b7 feat(curves): add is_cylindrical and is_spherical surface predicates (VDE-1582)
1.0.374: 新增 NurbsSurface::is_cylindrical(tol=1e-4)(可展 + 一个主曲率约 0、另一个为常值非零)与 is_spherical(tol=1e-4)(K 为正常数且 H^2≈K 脐点条件),参数域 5x5 采样。实测互斥精确:圆柱->仅 cylindrical;球->仅 spherical;平面/圆锥/环对两者均 false。用途:孔/轴/球面识别、布尔/偏置解析路径选择、加工策略分类。新增 NurbsSurfaceTest.CylindricalAndSphericalPredicates。全量 8,739 执行/8,699 passed/0 failed/856.18s;注册 8,741;报告 432;版本 1.0.374。
2026-11-13 00:08:02 +08:00
hm 0810cd1f7a feat(curves): add is_developable surface predicate (VDE-1581)
1.0.373: 新增 NurbsSurface::is_developable(tol=1e-6)——参数域 6x6 采样点计算高斯曲率 K,全部 |K|<=tol 且有效点数>=9 判为可展。实测:平面/圆柱 R2/圆锥 R2->0.5 true;球 R2(K=0.25)/环 R5xr1 false。用途:钣金展开、圆柱/锥面识别、NC 侧铣解析路径。新增 NurbsSurfaceTest.IsDevelopableDetection。全量 8,738 执行/8,698 passed/0 failed/1063.03s(宿主负载较高);注册 8,740;报告 431;版本 1.0.373。
2026-11-12 23:43:04 +08:00
hm f48c8d4a93 feat(curves): add is_circular curve predicate (VDE-1580)
1.0.372: 新增 NurbsCurve::is_circular(tol=1e-6)——先 is_planar 判定,再以 0.2/0.45/0.7 三个参数点外接圆为候选,检查 17 个采样点到圆心距离偏差 <= tol*尺度。实测:整圆 true(tol=1e-9 亦 true)、圆弧 true;椭圆(即使 tol=1e-2)/直线/螺旋线 false。用途:孔/轴/圆角识别、偏置解析路径选择、NC 圆弧输出。新增 NurbsCurveTest.IsCircularDetection。全量 8,737 执行/8,697 passed/0 failed/925.11s(宿主负载较高);注册 8,739;报告 430;版本 1.0.372。
2026-11-12 23:17:42 +08:00
hm f4fcd2da97 Merge remote-tracking branch 'origin/main' 2026-11-12 22:51:30 +08:00
hm 446db48523 test(measure): lock B-Rep surface area API consistency (VDE-1579)
1.0.371: 新增 MeasureTest.BodySurfaceAreaApisAgree——BrepModel::body_surface_area() 与 measure::surface_area() 在球 R2 (50.265482457, rel 8.1e-13)、圆柱 R2xh5 (87.964594299, 1.7e-11)、盒 4^3 (96, 0) 上与闭式解一致,两 API 互差 <=1e-12。同时记录装配层级 STEP 读入阻塞项(VDE-900(1)(2),上游接口未提供,见计划文档)。全量 8,735 执行/8,695 passed/0 failed/967.58s (宿主负载较高);注册 8,738;报告 429;版本 1.0.371。
2026-11-12 22:51:28 +08:00
hm a9f6b71b14 feat(brep): merge coplanar straight-boundary faces 2026-11-12 22:19:42 +08:00
hm 407a5b2b78 fix(brep): scope natural cylinder merge to boolean results 2026-11-12 21:51:48 +08:00
hm bb7cf5e46c feat(brep): merge coaxial cylinder fragments into natural periodic faces 2026-11-12 21:30:20 +08:00
hm d786835da9 test(brep): correct audit false-negative claim; audit detects sphere-sphere failures (VDE-1578)
1.0.370: 撤回 1.0.358 的『审计假阴性』结论——该结论基于误构造的粗糙多面体 make_sphere(2,3,0)。用正确解析球 A=make_sphere(2,0,0)、B=make_sphere(2,0,0,Point3D(3,0,0)) 重测(256 采样、Halton):交集 79/256=30.86% 多料、并集 18/256=7.03% 少料、差集 12/256=4.69% 多料——审计对三种错误全部有效检出(差集虽 validate=valid 静默,但审计可检出)。新增 MeasureTest.BooleanMembershipAuditDetectsSphereSphereFailures(交集 >0.2、并集 >0.03、差集 >0.02,extra/missing 计数为正)。计划文档 §47.150 同步更正。全量 8,734 执行/8,694 passed/0 failed/741.76s;注册 8,737;报告 428;版本 1.0.370。
2026-11-12 20:50:49 +08:00