abelien-harness 0.19.0 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/package.json +1 -1
  2. package/skills/abelien-algorithm/bindings.json +1 -1
  3. package/skills/abelien-hardware/assets/AGENTS.md +1 -1
  4. package/skills/abelien-hardware/bindings.json +1 -1
  5. package/skills/abelien-hardware/contract/host-tools.generated.json +12 -6
  6. package/skills/abelien-hardware/contract/search-index-format.md +1 -1
  7. package/skills/abelien-hardware/references/actions/hardware.selection-commit.generated.md +2 -2
  8. package/skills/abelien-hardware/references/actions/hardware.selection-propose.generated.md +2 -2
  9. package/skills/abelien-hardware/references/actions/hardware.selection-recall.generated.md +2 -2
  10. package/skills/abelien-hardware/references/category-default-dimensions.md +5 -5
  11. package/skills/abelien-hardware/references/selection-service-contract.md +1 -1
  12. package/skills/abelien-hardware/schemas/hardware-selection.v2.json +2 -2
  13. package/skills/abelien-hardware/scripts/dimensions.mjs +20 -4
  14. package/skills/abelien-hardware/scripts/selection-propose.mjs +10 -0
  15. package/skills/abelien-hardware/scripts/selection-recall.mjs +5 -4
  16. package/skills/abelien-hardware/scripts/selection-structure.mjs +1 -1
  17. package/skills/abelien-harness/runtime/README.md +4 -0
  18. package/skills/abelien-harness/runtime/actions.mjs +2 -0
  19. package/skills/abelien-harness/runtime/engine.mjs +23 -5
  20. package/skills/abelien-harness/runtime/errors.mjs +1 -1
  21. package/skills/abelien-harness/scripts/ab.mjs +1 -1
  22. package/skills/abelien-reference/bindings.json +1 -1
  23. package/skills/abelien-structure/contract/host-tools.generated.json +1703 -209
  24. package/skills/abelien-structure/references/actions/cad.fallback.generated.md +2 -2
  25. package/skills/abelien-structure/references/actions/structure.assets-request.generated.md +7 -2
  26. package/skills/abelien-structure/references/actions/structure.cad-assemble.generated.md +6 -0
  27. package/skills/abelien-structure/references/actions/structure.cad-check.generated.md +6 -0
  28. package/skills/abelien-structure/references/actions/structure.layout-check.generated.md +29 -24
  29. package/skills/abelien-structure/references/actions/structure.layout-request.generated.md +2 -1
  30. package/skills/abelien-structure/references/actions/structure.prelude.generated.md +9 -2
  31. package/skills/abelien-structure/references/actions/structure.swap-candidates.generated.md +1 -1
  32. package/skills/abelien-structure/references/cad-functions.generated.md +11 -8
  33. package/skills/abelien-structure/references/cad-modules.md +1 -0
  34. package/skills/abelien-structure/references/skeleton.md +13 -4
  35. package/skills/abelien-structure/schemas/layout-check-result.v1.json +99 -3
  36. package/skills/abelien-structure/schemas/layout-proposal.v1.json +1 -0
  37. package/skills/abelien-structure/schemas/layout-request-input.v1.json +1 -1
  38. package/skills/abelien-structure/schemas/layout-request.v1.json +12 -2
  39. package/skills/abelien-structure/schemas/prelude.v1.json +21 -0
  40. package/skills/abelien-structure/schemas/skeleton.v1.json +11 -3
  41. package/skills/abelien-structure/schemas/swap-candidates-input.v1.json +1 -1
  42. package/skills/abelien-structure/scripts/cad.mjs +30 -8
  43. package/skills/abelien-structure/scripts/geometry.mjs +48 -0
  44. package/skills/abelien-structure/scripts/layout.mjs +241 -21
  45. package/skills/abelien-structure/scripts/swap.mjs +3 -2
  46. package/skills/abelien-structure-worker/worker/abelien_cad.py +108 -13
  47. package/skills/abelien-structure-worker/worker/source-contract.mjs +4 -4
  48. package/skills/abelien-workspace/actions/image.generate.json +10 -0
  49. package/skills/abelien-workspace/assets/journey-stage-plan.json +246 -28
  50. package/skills/abelien-workspace/contract/host-tools.generated.json +4 -3
  51. package/skills/abelien-workspace/flows/creation.create.json +293 -34
  52. package/skills/abelien-workspace/flows/creation.modify.json +293 -34
  53. package/skills/abelien-workspace/flows/creation.remix.json +56 -18
  54. package/skills/abelien-workspace/flows/creation.restore.json +300 -34
  55. package/skills/abelien-workspace/references/actions/image.generate.generated.md +2 -0
  56. package/skills/abelien-workspace/references/actions/workspace.hardware-reselect-input.generated.md +2 -2
  57. package/skills/abelien-workspace/references/journey-stage-plan.md +59 -16
  58. package/skills/abelien-workspace/references/product-flow.md +2 -0
  59. package/skills/abelien-workspace/schemas/plan-common.v1.json +4 -1
  60. package/skills/abelien-workspace/schemas/skeleton-model-reply.v1.json +3 -2
  61. package/skills/abelien-workspace/schemas/skeleton-reply.v1.json +20 -1
  62. package/skills/abelien-workspace/schemas/version-confirmation.v1.json +22 -0
  63. package/skills/abelien-workspace/schemas/version-questions-reply.v1.json +26 -0
  64. package/skills/abelien-workspace/schemas/version-questions.v1.json +28 -0
  65. package/skills/abelien-workspace/scripts/creation-tasks.mjs +179 -14
  66. package/skills/abelien-workspace/scripts/flow-compile.mjs +4 -1
  67. package/skills/abelien-workspace/scripts/plans.mjs +5 -0
@@ -1359,12 +1359,13 @@
1359
1359
  ]
1360
1360
  },
1361
1361
  "basis": {
1362
- "description": "事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;recorded 库内或既有资料记录。unknown 仅兼容历史记录,新资料按完整度列明缺项。",
1362
+ "description": "事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;database 器件库登记的尺寸,有经核对的 v2 快照绑定且资料完整(三个轴与 evidence_ref 齐全,由代码判定),算可信尺寸;recorded 库内或既有资料记录(没有核对过的绑定或资料不全的库内尺寸也在这里),不算可信。unknown 仅兼容历史记录,新资料按完整度列明缺项。",
1363
1363
  "enum": [
1364
1364
  "manufacturer",
1365
1365
  "measured",
1366
1366
  "estimate",
1367
1367
  "engineering_design",
1368
+ "database",
1368
1369
  "recorded",
1369
1370
  "unknown"
1370
1371
  ]
@@ -5533,7 +5534,7 @@
5533
5534
  "type": "array",
5534
5535
  "minItems": 1,
5535
5536
  "items": {
5536
- "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet 或 estimate;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
5537
+ "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet、database、catalog 或 estimate,其中 measured、datasheet、database 可信;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
5537
5538
  "type": "object",
5538
5539
  "required": [
5539
5540
  "occurrence_id",
@@ -5542,11 +5543,49 @@
5542
5543
  "size_mm",
5543
5544
  "size_basis",
5544
5545
  "aabb_mm",
5546
+ "footprint",
5545
5547
  "facing_face",
5546
5548
  "facing_axis",
5547
5549
  "facing_basis"
5548
5550
  ],
5549
5551
  "properties": {
5552
+ "footprint": {
5553
+ "description": "占位形状(r30 G1):box,或 circle(axis 是圆的法向,世界坐标轴、不带正负号)。圆的直径与厚度取 aabb_mm:axis 方向的边长是厚度,另两个方向相等,即直径;没有别的尺寸字段。只有走预留、没有组件 CAD 的件可以是 circle;真实几何以 CAD 为准。",
5554
+ "oneOf": [
5555
+ {
5556
+ "type": "object",
5557
+ "required": [
5558
+ "shape"
5559
+ ],
5560
+ "properties": {
5561
+ "shape": {
5562
+ "const": "box"
5563
+ }
5564
+ },
5565
+ "additionalProperties": false
5566
+ },
5567
+ {
5568
+ "type": "object",
5569
+ "required": [
5570
+ "shape",
5571
+ "axis"
5572
+ ],
5573
+ "properties": {
5574
+ "shape": {
5575
+ "const": "circle"
5576
+ },
5577
+ "axis": {
5578
+ "enum": [
5579
+ "x",
5580
+ "y",
5581
+ "z"
5582
+ ]
5583
+ }
5584
+ },
5585
+ "additionalProperties": false
5586
+ }
5587
+ ]
5588
+ },
5550
5589
  "occurrence_id": {
5551
5590
  "type": "string",
5552
5591
  "pattern": "^[a-z0-9][a-z0-9_-]{0,127}$"
@@ -5603,6 +5642,7 @@
5603
5642
  "measured",
5604
5643
  "datasheet",
5605
5644
  "estimate",
5645
+ "database",
5606
5646
  "catalog",
5607
5647
  "reserved",
5608
5648
  "cad_asset"
@@ -7456,6 +7496,8 @@
7456
7496
  "translation_mm",
7457
7497
  "rotation_deg",
7458
7498
  "aabb_mm",
7499
+ "footprint",
7500
+ "envelope_axis",
7459
7501
  "facing_face",
7460
7502
  "point_ids",
7461
7503
  "geometry",
@@ -7557,6 +7599,58 @@
7557
7599
  },
7558
7600
  "additionalProperties": false
7559
7601
  },
7602
+ "footprint": {
7603
+ "description": "骨架冻结的占位形状;件按组件 CAD 构建时为 box(CAD 几何为准)",
7604
+ "oneOf": [
7605
+ {
7606
+ "type": "object",
7607
+ "required": [
7608
+ "shape"
7609
+ ],
7610
+ "properties": {
7611
+ "shape": {
7612
+ "const": "box"
7613
+ }
7614
+ },
7615
+ "additionalProperties": false
7616
+ },
7617
+ {
7618
+ "type": "object",
7619
+ "required": [
7620
+ "shape",
7621
+ "axis"
7622
+ ],
7623
+ "properties": {
7624
+ "shape": {
7625
+ "const": "circle"
7626
+ },
7627
+ "axis": {
7628
+ "enum": [
7629
+ "x",
7630
+ "y",
7631
+ "z"
7632
+ ]
7633
+ }
7634
+ },
7635
+ "additionalProperties": false
7636
+ }
7637
+ ]
7638
+ },
7639
+ "envelope_axis": {
7640
+ "oneOf": [
7641
+ {
7642
+ "type": "null"
7643
+ },
7644
+ {
7645
+ "enum": [
7646
+ "x",
7647
+ "y",
7648
+ "z"
7649
+ ]
7650
+ }
7651
+ ],
7652
+ "description": "circle 件的圆柱轴在件自身坐标里的方向(由冻结旋转推出),box 时为 null"
7653
+ },
7560
7654
  "facing_face": {
7561
7655
  "oneOf": [
7562
7656
  {
@@ -9000,6 +9094,8 @@
9000
9094
  "translation_mm",
9001
9095
  "rotation_deg",
9002
9096
  "aabb_mm",
9097
+ "footprint",
9098
+ "envelope_axis",
9003
9099
  "facing_face",
9004
9100
  "point_ids",
9005
9101
  "geometry",
@@ -9101,6 +9197,58 @@
9101
9197
  },
9102
9198
  "additionalProperties": false
9103
9199
  },
9200
+ "footprint": {
9201
+ "description": "骨架冻结的占位形状;件按组件 CAD 构建时为 box(CAD 几何为准)",
9202
+ "oneOf": [
9203
+ {
9204
+ "type": "object",
9205
+ "required": [
9206
+ "shape"
9207
+ ],
9208
+ "properties": {
9209
+ "shape": {
9210
+ "const": "box"
9211
+ }
9212
+ },
9213
+ "additionalProperties": false
9214
+ },
9215
+ {
9216
+ "type": "object",
9217
+ "required": [
9218
+ "shape",
9219
+ "axis"
9220
+ ],
9221
+ "properties": {
9222
+ "shape": {
9223
+ "const": "circle"
9224
+ },
9225
+ "axis": {
9226
+ "enum": [
9227
+ "x",
9228
+ "y",
9229
+ "z"
9230
+ ]
9231
+ }
9232
+ },
9233
+ "additionalProperties": false
9234
+ }
9235
+ ]
9236
+ },
9237
+ "envelope_axis": {
9238
+ "oneOf": [
9239
+ {
9240
+ "type": "null"
9241
+ },
9242
+ {
9243
+ "enum": [
9244
+ "x",
9245
+ "y",
9246
+ "z"
9247
+ ]
9248
+ }
9249
+ ],
9250
+ "description": "circle 件的圆柱轴在件自身坐标里的方向(由冻结旋转推出),box 时为 null"
9251
+ },
9104
9252
  "facing_face": {
9105
9253
  "oneOf": [
9106
9254
  {
@@ -10779,6 +10927,7 @@
10779
10927
  "frame",
10780
10928
  "shell",
10781
10929
  "shell_source",
10930
+ "cavity",
10782
10931
  "tolerances",
10783
10932
  "inputs",
10784
10933
  "slots",
@@ -10962,6 +11111,104 @@
10962
11111
  }
10963
11112
  ]
10964
11113
  },
11114
+ "cavity": {
11115
+ "description": "内腔几何(r30 G2),由外壳算出,与布局校验用的是同一个内腔。盒形:内腔范围与尺寸。圆柱(轴为 Z、原点在底面中心):内半径、轴向范围、内接正方形边长,以及弦宽表——离轴 offset_mm 处、与这个方向垂直能放下的最大宽度,向下取到 0.1 mm。用法:取 offset_mm 不小于实际离轴距离的那一行(往大处取,不在两行之间插值),读到的宽度总是放得下。width_mm 是几何宽度,不扣任何余量或间隙;判定出壳时只有布局校验放宽接触容差 contact_mm,此外不另加余量。盒形的 size_mm 由代码从 min_mm、max_mm 算出,不必自己减。提案查表,不必再用计算器算。",
11116
+ "oneOf": [
11117
+ {
11118
+ "type": "object",
11119
+ "required": [
11120
+ "shape",
11121
+ "min_mm",
11122
+ "max_mm",
11123
+ "size_mm"
11124
+ ],
11125
+ "properties": {
11126
+ "shape": {
11127
+ "const": "box"
11128
+ },
11129
+ "min_mm": {
11130
+ "type": "array",
11131
+ "items": {
11132
+ "type": "number"
11133
+ },
11134
+ "minItems": 3,
11135
+ "maxItems": 3
11136
+ },
11137
+ "max_mm": {
11138
+ "type": "array",
11139
+ "items": {
11140
+ "type": "number"
11141
+ },
11142
+ "minItems": 3,
11143
+ "maxItems": 3
11144
+ },
11145
+ "size_mm": {
11146
+ "type": "array",
11147
+ "items": {
11148
+ "type": "number"
11149
+ },
11150
+ "minItems": 3,
11151
+ "maxItems": 3
11152
+ }
11153
+ },
11154
+ "additionalProperties": false
11155
+ },
11156
+ {
11157
+ "type": "object",
11158
+ "required": [
11159
+ "shape",
11160
+ "inner_radius_mm",
11161
+ "z_mm",
11162
+ "inscribed_square_mm",
11163
+ "chords_mm"
11164
+ ],
11165
+ "properties": {
11166
+ "shape": {
11167
+ "const": "cylinder"
11168
+ },
11169
+ "inner_radius_mm": {
11170
+ "type": "number",
11171
+ "exclusiveMinimum": 0
11172
+ },
11173
+ "z_mm": {
11174
+ "type": "array",
11175
+ "items": {
11176
+ "type": "number"
11177
+ },
11178
+ "minItems": 2,
11179
+ "maxItems": 2
11180
+ },
11181
+ "inscribed_square_mm": {
11182
+ "type": "number",
11183
+ "exclusiveMinimum": 0
11184
+ },
11185
+ "chords_mm": {
11186
+ "type": "array",
11187
+ "minItems": 1,
11188
+ "items": {
11189
+ "type": "object",
11190
+ "required": [
11191
+ "offset_mm",
11192
+ "width_mm"
11193
+ ],
11194
+ "properties": {
11195
+ "offset_mm": {
11196
+ "type": "number",
11197
+ "minimum": 0
11198
+ },
11199
+ "width_mm": {
11200
+ "type": "number",
11201
+ "minimum": 0
11202
+ }
11203
+ },
11204
+ "additionalProperties": false
11205
+ }
11206
+ }
11207
+ },
11208
+ "additionalProperties": false
11209
+ }
11210
+ ]
11211
+ },
10965
11212
  "shell_source": {
10966
11213
  "description": "外壳由代码生成的出处(模型算术 SK-1):basis、用的是哪条硬尺寸(limit_id)或哪个参考产品(item_id)、轴向映射;size 是各轴的数:选择原样({value, choice}),派生是 Formula 的求值回执(FormulaResult),由代码按相等的上下限填值的轴为 null;appearance_target 的估算外观容差另记在 tolerance_mm。",
10967
11214
  "type": "object",
@@ -12793,6 +13040,7 @@
12793
13040
  "measured",
12794
13041
  "datasheet",
12795
13042
  "estimate",
13043
+ "database",
12796
13044
  "catalog",
12797
13045
  "unknown",
12798
13046
  "cad_asset"
@@ -13535,7 +13783,7 @@
13535
13783
  "additionalProperties": false
13536
13784
  },
13537
13785
  "placement": {
13538
- "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet 或 estimate;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
13786
+ "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet、database、catalog 或 estimate,其中 measured、datasheet、database 可信;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
13539
13787
  "type": "object",
13540
13788
  "required": [
13541
13789
  "occurrence_id",
@@ -13544,11 +13792,49 @@
13544
13792
  "size_mm",
13545
13793
  "size_basis",
13546
13794
  "aabb_mm",
13795
+ "footprint",
13547
13796
  "facing_face",
13548
13797
  "facing_axis",
13549
13798
  "facing_basis"
13550
13799
  ],
13551
13800
  "properties": {
13801
+ "footprint": {
13802
+ "description": "占位形状(r30 G1):box,或 circle(axis 是圆的法向,世界坐标轴、不带正负号)。圆的直径与厚度取 aabb_mm:axis 方向的边长是厚度,另两个方向相等,即直径;没有别的尺寸字段。只有走预留、没有组件 CAD 的件可以是 circle;真实几何以 CAD 为准。",
13803
+ "oneOf": [
13804
+ {
13805
+ "type": "object",
13806
+ "required": [
13807
+ "shape"
13808
+ ],
13809
+ "properties": {
13810
+ "shape": {
13811
+ "const": "box"
13812
+ }
13813
+ },
13814
+ "additionalProperties": false
13815
+ },
13816
+ {
13817
+ "type": "object",
13818
+ "required": [
13819
+ "shape",
13820
+ "axis"
13821
+ ],
13822
+ "properties": {
13823
+ "shape": {
13824
+ "const": "circle"
13825
+ },
13826
+ "axis": {
13827
+ "enum": [
13828
+ "x",
13829
+ "y",
13830
+ "z"
13831
+ ]
13832
+ }
13833
+ },
13834
+ "additionalProperties": false
13835
+ }
13836
+ ]
13837
+ },
13552
13838
  "occurrence_id": {
13553
13839
  "type": "string",
13554
13840
  "pattern": "^[a-z0-9][a-z0-9_-]{0,127}$"
@@ -13605,6 +13891,7 @@
13605
13891
  "measured",
13606
13892
  "datasheet",
13607
13893
  "estimate",
13894
+ "database",
13608
13895
  "catalog",
13609
13896
  "reserved",
13610
13897
  "cad_asset"
@@ -14117,7 +14404,7 @@
14117
14404
  "additionalProperties": false
14118
14405
  },
14119
14406
  "placement": {
14120
- "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet 或 estimate;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
14407
+ "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet、database、catalog 或 estimate,其中 measured、datasheet、database 可信;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
14121
14408
  "type": "object",
14122
14409
  "required": [
14123
14410
  "occurrence_id",
@@ -14126,11 +14413,49 @@
14126
14413
  "size_mm",
14127
14414
  "size_basis",
14128
14415
  "aabb_mm",
14416
+ "footprint",
14129
14417
  "facing_face",
14130
14418
  "facing_axis",
14131
14419
  "facing_basis"
14132
14420
  ],
14133
14421
  "properties": {
14422
+ "footprint": {
14423
+ "description": "占位形状(r30 G1):box,或 circle(axis 是圆的法向,世界坐标轴、不带正负号)。圆的直径与厚度取 aabb_mm:axis 方向的边长是厚度,另两个方向相等,即直径;没有别的尺寸字段。只有走预留、没有组件 CAD 的件可以是 circle;真实几何以 CAD 为准。",
14424
+ "oneOf": [
14425
+ {
14426
+ "type": "object",
14427
+ "required": [
14428
+ "shape"
14429
+ ],
14430
+ "properties": {
14431
+ "shape": {
14432
+ "const": "box"
14433
+ }
14434
+ },
14435
+ "additionalProperties": false
14436
+ },
14437
+ {
14438
+ "type": "object",
14439
+ "required": [
14440
+ "shape",
14441
+ "axis"
14442
+ ],
14443
+ "properties": {
14444
+ "shape": {
14445
+ "const": "circle"
14446
+ },
14447
+ "axis": {
14448
+ "enum": [
14449
+ "x",
14450
+ "y",
14451
+ "z"
14452
+ ]
14453
+ }
14454
+ },
14455
+ "additionalProperties": false
14456
+ }
14457
+ ]
14458
+ },
14134
14459
  "occurrence_id": {
14135
14460
  "type": "string",
14136
14461
  "pattern": "^[a-z0-9][a-z0-9_-]{0,127}$"
@@ -14187,6 +14512,7 @@
14187
14512
  "measured",
14188
14513
  "datasheet",
14189
14514
  "estimate",
14515
+ "database",
14190
14516
  "catalog",
14191
14517
  "reserved",
14192
14518
  "cad_asset"
@@ -14742,29 +15068,66 @@
14742
15068
  "maxItems": 3,
14743
15069
  "description": "零件尺寸未知时的工程预留尺寸;尺寸已知时不得给(不缩放真实零件)。"
14744
15070
  },
14745
- "fit_envelope": {
14746
- "description": "结构给一个槽位的分区可用空间(P2-06.03 的 fit_envelope,现归 P2-15)。basis:inferred 结构估算,只用于降低候选排序;locked 结构声明该分区固定,但声明本身没有可核对的出处,不能当硬拒绝依据。",
14747
- "type": "object",
14748
- "required": [
14749
- "envelope",
14750
- "basis"
14751
- ],
14752
- "properties": {
14753
- "envelope": {
14754
- "description": "包络(与 abelien-hardware dimensions.mjs 的 validateEnvelope 同形):box {max_mm, min_mm?, wall_mm?} 或 cylinder {max_diameter_mm, max_height_mm, min_diameter_mm?, min_height_mm?, wall_mm?},单位 mm。",
15071
+ "footprint": {
15072
+ "description": "占位形状(r30 G1),缺省为 box。circle 只给走预留(reserved_mm)、没有组件 CAD 的件;axis 是圆的法向(世界坐标轴,不带正负号),要与坐落面的法向相同,圆柱外壳里只能是外壳轴 z。直径与厚度取放置后的包围盒:axis 方向的边长是厚度,另两个方向必须相等,即直径。",
15073
+ "oneOf": [
15074
+ {
14755
15075
  "type": "object",
14756
15076
  "required": [
14757
15077
  "shape"
14758
15078
  ],
14759
15079
  "properties": {
14760
15080
  "shape": {
14761
- "enum": [
14762
- "box",
14763
- "cylinder"
14764
- ]
14765
- },
14766
- "max_mm": {
14767
- "type": "array",
15081
+ "const": "box"
15082
+ }
15083
+ },
15084
+ "additionalProperties": false
15085
+ },
15086
+ {
15087
+ "type": "object",
15088
+ "required": [
15089
+ "shape",
15090
+ "axis"
15091
+ ],
15092
+ "properties": {
15093
+ "shape": {
15094
+ "const": "circle"
15095
+ },
15096
+ "axis": {
15097
+ "enum": [
15098
+ "x",
15099
+ "y",
15100
+ "z"
15101
+ ]
15102
+ }
15103
+ },
15104
+ "additionalProperties": false
15105
+ }
15106
+ ]
15107
+ },
15108
+ "fit_envelope": {
15109
+ "description": "结构给一个槽位的分区可用空间(P2-06.03 的 fit_envelope,现归 P2-15)。basis:inferred 结构估算,只用于降低候选排序;locked 结构声明该分区固定,但声明本身没有可核对的出处,不能当硬拒绝依据。",
15110
+ "type": "object",
15111
+ "required": [
15112
+ "envelope",
15113
+ "basis"
15114
+ ],
15115
+ "properties": {
15116
+ "envelope": {
15117
+ "description": "包络(与 abelien-hardware dimensions.mjs 的 validateEnvelope 同形):box {max_mm, min_mm?, wall_mm?} 或 cylinder {max_diameter_mm, max_height_mm, min_diameter_mm?, min_height_mm?, wall_mm?},单位 mm。",
15118
+ "type": "object",
15119
+ "required": [
15120
+ "shape"
15121
+ ],
15122
+ "properties": {
15123
+ "shape": {
15124
+ "enum": [
15125
+ "box",
15126
+ "cylinder"
15127
+ ]
15128
+ },
15129
+ "max_mm": {
15130
+ "type": "array",
14768
15131
  "items": {
14769
15132
  "type": "number",
14770
15133
  "exclusiveMinimum": 0
@@ -15049,6 +15412,7 @@
15049
15412
  "artifact",
15050
15413
  "checks",
15051
15414
  "findings",
15415
+ "zone_space",
15052
15416
  "reselect",
15053
15417
  "rework"
15054
15418
  ],
@@ -15729,7 +16093,7 @@
15729
16093
  "type": "array",
15730
16094
  "minItems": 1,
15731
16095
  "items": {
15732
- "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet 或 estimate;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
16096
+ "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet、database、catalog 或 estimate,其中 measured、datasheet、database 可信;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
15733
16097
  "type": "object",
15734
16098
  "required": [
15735
16099
  "occurrence_id",
@@ -15738,11 +16102,49 @@
15738
16102
  "size_mm",
15739
16103
  "size_basis",
15740
16104
  "aabb_mm",
16105
+ "footprint",
15741
16106
  "facing_face",
15742
16107
  "facing_axis",
15743
16108
  "facing_basis"
15744
16109
  ],
15745
16110
  "properties": {
16111
+ "footprint": {
16112
+ "description": "占位形状(r30 G1):box,或 circle(axis 是圆的法向,世界坐标轴、不带正负号)。圆的直径与厚度取 aabb_mm:axis 方向的边长是厚度,另两个方向相等,即直径;没有别的尺寸字段。只有走预留、没有组件 CAD 的件可以是 circle;真实几何以 CAD 为准。",
16113
+ "oneOf": [
16114
+ {
16115
+ "type": "object",
16116
+ "required": [
16117
+ "shape"
16118
+ ],
16119
+ "properties": {
16120
+ "shape": {
16121
+ "const": "box"
16122
+ }
16123
+ },
16124
+ "additionalProperties": false
16125
+ },
16126
+ {
16127
+ "type": "object",
16128
+ "required": [
16129
+ "shape",
16130
+ "axis"
16131
+ ],
16132
+ "properties": {
16133
+ "shape": {
16134
+ "const": "circle"
16135
+ },
16136
+ "axis": {
16137
+ "enum": [
16138
+ "x",
16139
+ "y",
16140
+ "z"
16141
+ ]
16142
+ }
16143
+ },
16144
+ "additionalProperties": false
16145
+ }
16146
+ ]
16147
+ },
15746
16148
  "occurrence_id": {
15747
16149
  "type": "string",
15748
16150
  "pattern": "^[a-z0-9][a-z0-9_-]{0,127}$"
@@ -15799,6 +16201,7 @@
15799
16201
  "measured",
15800
16202
  "datasheet",
15801
16203
  "estimate",
16204
+ "database",
15802
16205
  "catalog",
15803
16206
  "reserved",
15804
16207
  "cad_asset"
@@ -16621,7 +17024,7 @@
16621
17024
  ]
16622
17025
  },
16623
17026
  "checks": {
16624
- "description": "布局校验逐项结果。containment 出壳、collision 盒级碰撞、support 悬空、orientation 朝向、point_alignment 点位对齐、fit_envelope 分区可用空间、shell 外形锁定与容差。盒级通过不代表真实零件几何、线束或运动验证通过。",
17027
+ "description": "布局校验逐项结果的折叠形(r30 G3):七项检查都在,每项给状态、各状态的条数,只展开没通过的条目(fail、unknown、not_applicable);通过的条目只计数。完整条目在通过时的骨架产物 data.checks 里。",
16625
17028
  "type": "object",
16626
17029
  "required": [
16627
17030
  "containment",
@@ -16637,6 +17040,7 @@
16637
17040
  "type": "object",
16638
17041
  "required": [
16639
17042
  "status",
17043
+ "counts",
16640
17044
  "items"
16641
17045
  ],
16642
17046
  "properties": {
@@ -16648,36 +17052,72 @@
16648
17052
  "not_applicable"
16649
17053
  ]
16650
17054
  },
17055
+ "counts": {
17056
+ "description": "各状态的条数;items 的条数等于非 pass 的条数之和。条数为 0 的状态不写,所以每个出现的数至少是 1。",
17057
+ "type": "object",
17058
+ "properties": {
17059
+ "pass": {
17060
+ "type": "integer",
17061
+ "minimum": 1
17062
+ },
17063
+ "fail": {
17064
+ "type": "integer",
17065
+ "minimum": 1
17066
+ },
17067
+ "unknown": {
17068
+ "type": "integer",
17069
+ "minimum": 1
17070
+ },
17071
+ "not_applicable": {
17072
+ "type": "integer",
17073
+ "minimum": 1
17074
+ }
17075
+ },
17076
+ "additionalProperties": false
17077
+ },
16651
17078
  "items": {
16652
17079
  "type": "array",
16653
17080
  "items": {
16654
- "type": "object",
16655
- "required": [
16656
- "status"
16657
- ],
16658
- "properties": {
16659
- "status": {
16660
- "enum": [
16661
- "pass",
16662
- "fail",
16663
- "unknown",
16664
- "not_applicable"
16665
- ]
17081
+ "allOf": [
17082
+ {
17083
+ "type": "object",
17084
+ "required": [
17085
+ "status"
17086
+ ],
17087
+ "properties": {
17088
+ "status": {
17089
+ "enum": [
17090
+ "pass",
17091
+ "fail",
17092
+ "unknown",
17093
+ "not_applicable"
17094
+ ]
17095
+ },
17096
+ "subject": {
17097
+ "type": "array",
17098
+ "items": {
17099
+ "type": "string"
17100
+ }
17101
+ },
17102
+ "values": {
17103
+ "type": "object"
17104
+ },
17105
+ "note": {
17106
+ "type": "string"
17107
+ }
17108
+ },
17109
+ "additionalProperties": false
16666
17110
  },
16667
- "subject": {
16668
- "type": "array",
16669
- "items": {
16670
- "type": "string"
17111
+ {
17112
+ "properties": {
17113
+ "status": {
17114
+ "not": {
17115
+ "const": "pass"
17116
+ }
17117
+ }
16671
17118
  }
16672
- },
16673
- "values": {
16674
- "type": "object"
16675
- },
16676
- "note": {
16677
- "type": "string"
16678
17119
  }
16679
- },
16680
- "additionalProperties": false
17120
+ ]
16681
17121
  }
16682
17122
  }
16683
17123
  },
@@ -16687,6 +17127,7 @@
16687
17127
  "type": "object",
16688
17128
  "required": [
16689
17129
  "status",
17130
+ "counts",
16690
17131
  "items"
16691
17132
  ],
16692
17133
  "properties": {
@@ -16698,36 +17139,72 @@
16698
17139
  "not_applicable"
16699
17140
  ]
16700
17141
  },
17142
+ "counts": {
17143
+ "description": "各状态的条数;items 的条数等于非 pass 的条数之和。条数为 0 的状态不写,所以每个出现的数至少是 1。",
17144
+ "type": "object",
17145
+ "properties": {
17146
+ "pass": {
17147
+ "type": "integer",
17148
+ "minimum": 1
17149
+ },
17150
+ "fail": {
17151
+ "type": "integer",
17152
+ "minimum": 1
17153
+ },
17154
+ "unknown": {
17155
+ "type": "integer",
17156
+ "minimum": 1
17157
+ },
17158
+ "not_applicable": {
17159
+ "type": "integer",
17160
+ "minimum": 1
17161
+ }
17162
+ },
17163
+ "additionalProperties": false
17164
+ },
16701
17165
  "items": {
16702
17166
  "type": "array",
16703
17167
  "items": {
16704
- "type": "object",
16705
- "required": [
16706
- "status"
16707
- ],
16708
- "properties": {
16709
- "status": {
16710
- "enum": [
16711
- "pass",
16712
- "fail",
16713
- "unknown",
16714
- "not_applicable"
16715
- ]
17168
+ "allOf": [
17169
+ {
17170
+ "type": "object",
17171
+ "required": [
17172
+ "status"
17173
+ ],
17174
+ "properties": {
17175
+ "status": {
17176
+ "enum": [
17177
+ "pass",
17178
+ "fail",
17179
+ "unknown",
17180
+ "not_applicable"
17181
+ ]
17182
+ },
17183
+ "subject": {
17184
+ "type": "array",
17185
+ "items": {
17186
+ "type": "string"
17187
+ }
17188
+ },
17189
+ "values": {
17190
+ "type": "object"
17191
+ },
17192
+ "note": {
17193
+ "type": "string"
17194
+ }
17195
+ },
17196
+ "additionalProperties": false
16716
17197
  },
16717
- "subject": {
16718
- "type": "array",
16719
- "items": {
16720
- "type": "string"
17198
+ {
17199
+ "properties": {
17200
+ "status": {
17201
+ "not": {
17202
+ "const": "pass"
17203
+ }
17204
+ }
16721
17205
  }
16722
- },
16723
- "values": {
16724
- "type": "object"
16725
- },
16726
- "note": {
16727
- "type": "string"
16728
17206
  }
16729
- },
16730
- "additionalProperties": false
17207
+ ]
16731
17208
  }
16732
17209
  }
16733
17210
  },
@@ -16737,6 +17214,7 @@
16737
17214
  "type": "object",
16738
17215
  "required": [
16739
17216
  "status",
17217
+ "counts",
16740
17218
  "items"
16741
17219
  ],
16742
17220
  "properties": {
@@ -16748,36 +17226,72 @@
16748
17226
  "not_applicable"
16749
17227
  ]
16750
17228
  },
17229
+ "counts": {
17230
+ "description": "各状态的条数;items 的条数等于非 pass 的条数之和。条数为 0 的状态不写,所以每个出现的数至少是 1。",
17231
+ "type": "object",
17232
+ "properties": {
17233
+ "pass": {
17234
+ "type": "integer",
17235
+ "minimum": 1
17236
+ },
17237
+ "fail": {
17238
+ "type": "integer",
17239
+ "minimum": 1
17240
+ },
17241
+ "unknown": {
17242
+ "type": "integer",
17243
+ "minimum": 1
17244
+ },
17245
+ "not_applicable": {
17246
+ "type": "integer",
17247
+ "minimum": 1
17248
+ }
17249
+ },
17250
+ "additionalProperties": false
17251
+ },
16751
17252
  "items": {
16752
17253
  "type": "array",
16753
17254
  "items": {
16754
- "type": "object",
16755
- "required": [
16756
- "status"
16757
- ],
16758
- "properties": {
16759
- "status": {
16760
- "enum": [
16761
- "pass",
16762
- "fail",
16763
- "unknown",
16764
- "not_applicable"
16765
- ]
17255
+ "allOf": [
17256
+ {
17257
+ "type": "object",
17258
+ "required": [
17259
+ "status"
17260
+ ],
17261
+ "properties": {
17262
+ "status": {
17263
+ "enum": [
17264
+ "pass",
17265
+ "fail",
17266
+ "unknown",
17267
+ "not_applicable"
17268
+ ]
17269
+ },
17270
+ "subject": {
17271
+ "type": "array",
17272
+ "items": {
17273
+ "type": "string"
17274
+ }
17275
+ },
17276
+ "values": {
17277
+ "type": "object"
17278
+ },
17279
+ "note": {
17280
+ "type": "string"
17281
+ }
17282
+ },
17283
+ "additionalProperties": false
16766
17284
  },
16767
- "subject": {
16768
- "type": "array",
16769
- "items": {
16770
- "type": "string"
17285
+ {
17286
+ "properties": {
17287
+ "status": {
17288
+ "not": {
17289
+ "const": "pass"
17290
+ }
17291
+ }
16771
17292
  }
16772
- },
16773
- "values": {
16774
- "type": "object"
16775
- },
16776
- "note": {
16777
- "type": "string"
16778
17293
  }
16779
- },
16780
- "additionalProperties": false
17294
+ ]
16781
17295
  }
16782
17296
  }
16783
17297
  },
@@ -16787,6 +17301,7 @@
16787
17301
  "type": "object",
16788
17302
  "required": [
16789
17303
  "status",
17304
+ "counts",
16790
17305
  "items"
16791
17306
  ],
16792
17307
  "properties": {
@@ -16798,36 +17313,72 @@
16798
17313
  "not_applicable"
16799
17314
  ]
16800
17315
  },
17316
+ "counts": {
17317
+ "description": "各状态的条数;items 的条数等于非 pass 的条数之和。条数为 0 的状态不写,所以每个出现的数至少是 1。",
17318
+ "type": "object",
17319
+ "properties": {
17320
+ "pass": {
17321
+ "type": "integer",
17322
+ "minimum": 1
17323
+ },
17324
+ "fail": {
17325
+ "type": "integer",
17326
+ "minimum": 1
17327
+ },
17328
+ "unknown": {
17329
+ "type": "integer",
17330
+ "minimum": 1
17331
+ },
17332
+ "not_applicable": {
17333
+ "type": "integer",
17334
+ "minimum": 1
17335
+ }
17336
+ },
17337
+ "additionalProperties": false
17338
+ },
16801
17339
  "items": {
16802
17340
  "type": "array",
16803
17341
  "items": {
16804
- "type": "object",
16805
- "required": [
16806
- "status"
16807
- ],
16808
- "properties": {
16809
- "status": {
16810
- "enum": [
16811
- "pass",
16812
- "fail",
16813
- "unknown",
16814
- "not_applicable"
16815
- ]
17342
+ "allOf": [
17343
+ {
17344
+ "type": "object",
17345
+ "required": [
17346
+ "status"
17347
+ ],
17348
+ "properties": {
17349
+ "status": {
17350
+ "enum": [
17351
+ "pass",
17352
+ "fail",
17353
+ "unknown",
17354
+ "not_applicable"
17355
+ ]
17356
+ },
17357
+ "subject": {
17358
+ "type": "array",
17359
+ "items": {
17360
+ "type": "string"
17361
+ }
17362
+ },
17363
+ "values": {
17364
+ "type": "object"
17365
+ },
17366
+ "note": {
17367
+ "type": "string"
17368
+ }
17369
+ },
17370
+ "additionalProperties": false
16816
17371
  },
16817
- "subject": {
16818
- "type": "array",
16819
- "items": {
16820
- "type": "string"
17372
+ {
17373
+ "properties": {
17374
+ "status": {
17375
+ "not": {
17376
+ "const": "pass"
17377
+ }
17378
+ }
16821
17379
  }
16822
- },
16823
- "values": {
16824
- "type": "object"
16825
- },
16826
- "note": {
16827
- "type": "string"
16828
17380
  }
16829
- },
16830
- "additionalProperties": false
17381
+ ]
16831
17382
  }
16832
17383
  }
16833
17384
  },
@@ -16837,6 +17388,7 @@
16837
17388
  "type": "object",
16838
17389
  "required": [
16839
17390
  "status",
17391
+ "counts",
16840
17392
  "items"
16841
17393
  ],
16842
17394
  "properties": {
@@ -16848,36 +17400,72 @@
16848
17400
  "not_applicable"
16849
17401
  ]
16850
17402
  },
17403
+ "counts": {
17404
+ "description": "各状态的条数;items 的条数等于非 pass 的条数之和。条数为 0 的状态不写,所以每个出现的数至少是 1。",
17405
+ "type": "object",
17406
+ "properties": {
17407
+ "pass": {
17408
+ "type": "integer",
17409
+ "minimum": 1
17410
+ },
17411
+ "fail": {
17412
+ "type": "integer",
17413
+ "minimum": 1
17414
+ },
17415
+ "unknown": {
17416
+ "type": "integer",
17417
+ "minimum": 1
17418
+ },
17419
+ "not_applicable": {
17420
+ "type": "integer",
17421
+ "minimum": 1
17422
+ }
17423
+ },
17424
+ "additionalProperties": false
17425
+ },
16851
17426
  "items": {
16852
17427
  "type": "array",
16853
17428
  "items": {
16854
- "type": "object",
16855
- "required": [
16856
- "status"
16857
- ],
16858
- "properties": {
16859
- "status": {
16860
- "enum": [
16861
- "pass",
16862
- "fail",
16863
- "unknown",
16864
- "not_applicable"
16865
- ]
17429
+ "allOf": [
17430
+ {
17431
+ "type": "object",
17432
+ "required": [
17433
+ "status"
17434
+ ],
17435
+ "properties": {
17436
+ "status": {
17437
+ "enum": [
17438
+ "pass",
17439
+ "fail",
17440
+ "unknown",
17441
+ "not_applicable"
17442
+ ]
17443
+ },
17444
+ "subject": {
17445
+ "type": "array",
17446
+ "items": {
17447
+ "type": "string"
17448
+ }
17449
+ },
17450
+ "values": {
17451
+ "type": "object"
17452
+ },
17453
+ "note": {
17454
+ "type": "string"
17455
+ }
17456
+ },
17457
+ "additionalProperties": false
16866
17458
  },
16867
- "subject": {
16868
- "type": "array",
16869
- "items": {
16870
- "type": "string"
17459
+ {
17460
+ "properties": {
17461
+ "status": {
17462
+ "not": {
17463
+ "const": "pass"
17464
+ }
17465
+ }
16871
17466
  }
16872
- },
16873
- "values": {
16874
- "type": "object"
16875
- },
16876
- "note": {
16877
- "type": "string"
16878
17467
  }
16879
- },
16880
- "additionalProperties": false
17468
+ ]
16881
17469
  }
16882
17470
  }
16883
17471
  },
@@ -16887,6 +17475,7 @@
16887
17475
  "type": "object",
16888
17476
  "required": [
16889
17477
  "status",
17478
+ "counts",
16890
17479
  "items"
16891
17480
  ],
16892
17481
  "properties": {
@@ -16898,36 +17487,72 @@
16898
17487
  "not_applicable"
16899
17488
  ]
16900
17489
  },
17490
+ "counts": {
17491
+ "description": "各状态的条数;items 的条数等于非 pass 的条数之和。条数为 0 的状态不写,所以每个出现的数至少是 1。",
17492
+ "type": "object",
17493
+ "properties": {
17494
+ "pass": {
17495
+ "type": "integer",
17496
+ "minimum": 1
17497
+ },
17498
+ "fail": {
17499
+ "type": "integer",
17500
+ "minimum": 1
17501
+ },
17502
+ "unknown": {
17503
+ "type": "integer",
17504
+ "minimum": 1
17505
+ },
17506
+ "not_applicable": {
17507
+ "type": "integer",
17508
+ "minimum": 1
17509
+ }
17510
+ },
17511
+ "additionalProperties": false
17512
+ },
16901
17513
  "items": {
16902
17514
  "type": "array",
16903
17515
  "items": {
16904
- "type": "object",
16905
- "required": [
16906
- "status"
16907
- ],
16908
- "properties": {
16909
- "status": {
16910
- "enum": [
16911
- "pass",
16912
- "fail",
16913
- "unknown",
16914
- "not_applicable"
16915
- ]
17516
+ "allOf": [
17517
+ {
17518
+ "type": "object",
17519
+ "required": [
17520
+ "status"
17521
+ ],
17522
+ "properties": {
17523
+ "status": {
17524
+ "enum": [
17525
+ "pass",
17526
+ "fail",
17527
+ "unknown",
17528
+ "not_applicable"
17529
+ ]
17530
+ },
17531
+ "subject": {
17532
+ "type": "array",
17533
+ "items": {
17534
+ "type": "string"
17535
+ }
17536
+ },
17537
+ "values": {
17538
+ "type": "object"
17539
+ },
17540
+ "note": {
17541
+ "type": "string"
17542
+ }
17543
+ },
17544
+ "additionalProperties": false
16916
17545
  },
16917
- "subject": {
16918
- "type": "array",
16919
- "items": {
16920
- "type": "string"
17546
+ {
17547
+ "properties": {
17548
+ "status": {
17549
+ "not": {
17550
+ "const": "pass"
17551
+ }
17552
+ }
16921
17553
  }
16922
- },
16923
- "values": {
16924
- "type": "object"
16925
- },
16926
- "note": {
16927
- "type": "string"
16928
17554
  }
16929
- },
16930
- "additionalProperties": false
17555
+ ]
16931
17556
  }
16932
17557
  }
16933
17558
  },
@@ -16937,6 +17562,7 @@
16937
17562
  "type": "object",
16938
17563
  "required": [
16939
17564
  "status",
17565
+ "counts",
16940
17566
  "items"
16941
17567
  ],
16942
17568
  "properties": {
@@ -16948,36 +17574,72 @@
16948
17574
  "not_applicable"
16949
17575
  ]
16950
17576
  },
17577
+ "counts": {
17578
+ "description": "各状态的条数;items 的条数等于非 pass 的条数之和。条数为 0 的状态不写,所以每个出现的数至少是 1。",
17579
+ "type": "object",
17580
+ "properties": {
17581
+ "pass": {
17582
+ "type": "integer",
17583
+ "minimum": 1
17584
+ },
17585
+ "fail": {
17586
+ "type": "integer",
17587
+ "minimum": 1
17588
+ },
17589
+ "unknown": {
17590
+ "type": "integer",
17591
+ "minimum": 1
17592
+ },
17593
+ "not_applicable": {
17594
+ "type": "integer",
17595
+ "minimum": 1
17596
+ }
17597
+ },
17598
+ "additionalProperties": false
17599
+ },
16951
17600
  "items": {
16952
17601
  "type": "array",
16953
17602
  "items": {
16954
- "type": "object",
16955
- "required": [
16956
- "status"
16957
- ],
16958
- "properties": {
16959
- "status": {
16960
- "enum": [
16961
- "pass",
16962
- "fail",
16963
- "unknown",
16964
- "not_applicable"
16965
- ]
17603
+ "allOf": [
17604
+ {
17605
+ "type": "object",
17606
+ "required": [
17607
+ "status"
17608
+ ],
17609
+ "properties": {
17610
+ "status": {
17611
+ "enum": [
17612
+ "pass",
17613
+ "fail",
17614
+ "unknown",
17615
+ "not_applicable"
17616
+ ]
17617
+ },
17618
+ "subject": {
17619
+ "type": "array",
17620
+ "items": {
17621
+ "type": "string"
17622
+ }
17623
+ },
17624
+ "values": {
17625
+ "type": "object"
17626
+ },
17627
+ "note": {
17628
+ "type": "string"
17629
+ }
17630
+ },
17631
+ "additionalProperties": false
16966
17632
  },
16967
- "subject": {
16968
- "type": "array",
16969
- "items": {
16970
- "type": "string"
17633
+ {
17634
+ "properties": {
17635
+ "status": {
17636
+ "not": {
17637
+ "const": "pass"
17638
+ }
17639
+ }
16971
17640
  }
16972
- },
16973
- "values": {
16974
- "type": "object"
16975
- },
16976
- "note": {
16977
- "type": "string"
16978
17641
  }
16979
- },
16980
- "additionalProperties": false
17642
+ ]
16981
17643
  }
16982
17644
  }
16983
17645
  },
@@ -17003,24 +17665,543 @@
17003
17665
  "type": "string",
17004
17666
  "pattern": "^[A-Z][A-Z0-9_]{1,63}$"
17005
17667
  },
17006
- "severity": {
17007
- "enum": [
17008
- "blocker",
17009
- "warning"
17010
- ]
17668
+ "severity": {
17669
+ "enum": [
17670
+ "blocker",
17671
+ "warning"
17672
+ ]
17673
+ },
17674
+ "occurrence_ids": {
17675
+ "type": "array",
17676
+ "items": {
17677
+ "type": "string"
17678
+ }
17679
+ },
17680
+ "message": {
17681
+ "type": "string",
17682
+ "minLength": 1
17683
+ },
17684
+ "values": {
17685
+ "description": "数值证据;其余键暂不约束。阻断项的修正(r30 G3)在 move(出壳、点位偏差、悬空)或 move_options(碰撞,两件各一个)里。",
17686
+ "type": "object",
17687
+ "properties": {
17688
+ "move": {
17689
+ "oneOf": [
17690
+ {
17691
+ "description": "一件的最小修正:按 target 改提案即可。delta_mm 是世界坐标下的平移;stays_inside、clears_others 是挪完后的包围盒(圆形占位按圆)是否仍在内腔里、是否不撞别的件。",
17692
+ "type": "object",
17693
+ "required": [
17694
+ "occurrence_id",
17695
+ "target",
17696
+ "delta_mm",
17697
+ "stays_inside",
17698
+ "clears_others"
17699
+ ],
17700
+ "properties": {
17701
+ "occurrence_id": {
17702
+ "type": "string"
17703
+ },
17704
+ "target": {
17705
+ "description": "修正后的目标值,用提案自己的写法:in_plane_mm 即提案的 in_plane_mm,seat_gap_mm 即 seat.gap_mm。只写要改的那一项。",
17706
+ "type": "object",
17707
+ "properties": {
17708
+ "in_plane_mm": {
17709
+ "type": "array",
17710
+ "items": {
17711
+ "type": "number"
17712
+ },
17713
+ "minItems": 2,
17714
+ "maxItems": 2
17715
+ },
17716
+ "seat_gap_mm": {
17717
+ "type": "number",
17718
+ "minimum": 0
17719
+ }
17720
+ },
17721
+ "additionalProperties": false
17722
+ },
17723
+ "delta_mm": {
17724
+ "type": "array",
17725
+ "items": {
17726
+ "type": "number"
17727
+ },
17728
+ "minItems": 3,
17729
+ "maxItems": 3
17730
+ },
17731
+ "stays_inside": {
17732
+ "type": "boolean"
17733
+ },
17734
+ "clears_others": {
17735
+ "type": "boolean"
17736
+ }
17737
+ },
17738
+ "additionalProperties": false
17739
+ },
17740
+ {
17741
+ "description": "挪不到位的修正:target 与 delta_mm 是能做到的那一部分,blocked 按原因列出,每个原因带它要的数。too_big:零件比内腔大,too_big_mm 给各轴或 radial 超多少;limited_by_shell:贴向内壁时角先碰到弧面,depth_gap_left_mm 是还差多少;needs_other_seat:间隙要变成负数,得换坐落面;normal_fixed:坐在圆柱侧壁上,法向由弧面推出,不能靠间隙改。",
17742
+ "type": "object",
17743
+ "required": [
17744
+ "occurrence_id",
17745
+ "target",
17746
+ "delta_mm",
17747
+ "stays_inside",
17748
+ "clears_others",
17749
+ "blocked"
17750
+ ],
17751
+ "properties": {
17752
+ "occurrence_id": {
17753
+ "type": "string"
17754
+ },
17755
+ "target": {
17756
+ "description": "修正后的目标值,用提案自己的写法:in_plane_mm 即提案的 in_plane_mm,seat_gap_mm 即 seat.gap_mm。只写要改的那一项。",
17757
+ "type": "object",
17758
+ "properties": {
17759
+ "in_plane_mm": {
17760
+ "type": "array",
17761
+ "items": {
17762
+ "type": "number"
17763
+ },
17764
+ "minItems": 2,
17765
+ "maxItems": 2
17766
+ },
17767
+ "seat_gap_mm": {
17768
+ "type": "number",
17769
+ "minimum": 0
17770
+ }
17771
+ },
17772
+ "additionalProperties": false
17773
+ },
17774
+ "delta_mm": {
17775
+ "type": "array",
17776
+ "items": {
17777
+ "type": "number"
17778
+ },
17779
+ "minItems": 3,
17780
+ "maxItems": 3
17781
+ },
17782
+ "stays_inside": {
17783
+ "type": "boolean"
17784
+ },
17785
+ "clears_others": {
17786
+ "type": "boolean"
17787
+ },
17788
+ "blocked": {
17789
+ "type": "object",
17790
+ "minProperties": 1,
17791
+ "properties": {
17792
+ "too_big": {
17793
+ "type": "object",
17794
+ "required": [
17795
+ "too_big_mm"
17796
+ ],
17797
+ "properties": {
17798
+ "too_big_mm": {
17799
+ "type": "object",
17800
+ "minProperties": 1,
17801
+ "propertyNames": {
17802
+ "enum": [
17803
+ "x",
17804
+ "y",
17805
+ "z",
17806
+ "radial"
17807
+ ]
17808
+ },
17809
+ "additionalProperties": {
17810
+ "type": "number",
17811
+ "exclusiveMinimum": 0
17812
+ }
17813
+ }
17814
+ },
17815
+ "additionalProperties": false
17816
+ },
17817
+ "limited_by_shell": {
17818
+ "type": "object",
17819
+ "required": [
17820
+ "depth_gap_left_mm"
17821
+ ],
17822
+ "properties": {
17823
+ "depth_gap_left_mm": {
17824
+ "type": "number",
17825
+ "exclusiveMinimum": 0
17826
+ }
17827
+ },
17828
+ "additionalProperties": false
17829
+ },
17830
+ "needs_other_seat": {
17831
+ "const": true
17832
+ },
17833
+ "normal_fixed": {
17834
+ "const": true
17835
+ }
17836
+ },
17837
+ "additionalProperties": false
17838
+ }
17839
+ },
17840
+ "additionalProperties": false
17841
+ }
17842
+ ]
17843
+ },
17844
+ "move_options": {
17845
+ "type": "array",
17846
+ "minItems": 2,
17847
+ "maxItems": 2,
17848
+ "items": {
17849
+ "oneOf": [
17850
+ {
17851
+ "description": "一件的最小修正:按 target 改提案即可。delta_mm 是世界坐标下的平移;stays_inside、clears_others 是挪完后的包围盒(圆形占位按圆)是否仍在内腔里、是否不撞别的件。",
17852
+ "type": "object",
17853
+ "required": [
17854
+ "occurrence_id",
17855
+ "target",
17856
+ "delta_mm",
17857
+ "stays_inside",
17858
+ "clears_others"
17859
+ ],
17860
+ "properties": {
17861
+ "occurrence_id": {
17862
+ "type": "string"
17863
+ },
17864
+ "target": {
17865
+ "description": "修正后的目标值,用提案自己的写法:in_plane_mm 即提案的 in_plane_mm,seat_gap_mm 即 seat.gap_mm。只写要改的那一项。",
17866
+ "type": "object",
17867
+ "properties": {
17868
+ "in_plane_mm": {
17869
+ "type": "array",
17870
+ "items": {
17871
+ "type": "number"
17872
+ },
17873
+ "minItems": 2,
17874
+ "maxItems": 2
17875
+ },
17876
+ "seat_gap_mm": {
17877
+ "type": "number",
17878
+ "minimum": 0
17879
+ }
17880
+ },
17881
+ "additionalProperties": false
17882
+ },
17883
+ "delta_mm": {
17884
+ "type": "array",
17885
+ "items": {
17886
+ "type": "number"
17887
+ },
17888
+ "minItems": 3,
17889
+ "maxItems": 3
17890
+ },
17891
+ "stays_inside": {
17892
+ "type": "boolean"
17893
+ },
17894
+ "clears_others": {
17895
+ "type": "boolean"
17896
+ }
17897
+ },
17898
+ "additionalProperties": false
17899
+ },
17900
+ {
17901
+ "description": "挪不到位的修正:target 与 delta_mm 是能做到的那一部分,blocked 按原因列出,每个原因带它要的数。too_big:零件比内腔大,too_big_mm 给各轴或 radial 超多少;limited_by_shell:贴向内壁时角先碰到弧面,depth_gap_left_mm 是还差多少;needs_other_seat:间隙要变成负数,得换坐落面;normal_fixed:坐在圆柱侧壁上,法向由弧面推出,不能靠间隙改。",
17902
+ "type": "object",
17903
+ "required": [
17904
+ "occurrence_id",
17905
+ "target",
17906
+ "delta_mm",
17907
+ "stays_inside",
17908
+ "clears_others",
17909
+ "blocked"
17910
+ ],
17911
+ "properties": {
17912
+ "occurrence_id": {
17913
+ "type": "string"
17914
+ },
17915
+ "target": {
17916
+ "description": "修正后的目标值,用提案自己的写法:in_plane_mm 即提案的 in_plane_mm,seat_gap_mm 即 seat.gap_mm。只写要改的那一项。",
17917
+ "type": "object",
17918
+ "properties": {
17919
+ "in_plane_mm": {
17920
+ "type": "array",
17921
+ "items": {
17922
+ "type": "number"
17923
+ },
17924
+ "minItems": 2,
17925
+ "maxItems": 2
17926
+ },
17927
+ "seat_gap_mm": {
17928
+ "type": "number",
17929
+ "minimum": 0
17930
+ }
17931
+ },
17932
+ "additionalProperties": false
17933
+ },
17934
+ "delta_mm": {
17935
+ "type": "array",
17936
+ "items": {
17937
+ "type": "number"
17938
+ },
17939
+ "minItems": 3,
17940
+ "maxItems": 3
17941
+ },
17942
+ "stays_inside": {
17943
+ "type": "boolean"
17944
+ },
17945
+ "clears_others": {
17946
+ "type": "boolean"
17947
+ },
17948
+ "blocked": {
17949
+ "type": "object",
17950
+ "minProperties": 1,
17951
+ "properties": {
17952
+ "too_big": {
17953
+ "type": "object",
17954
+ "required": [
17955
+ "too_big_mm"
17956
+ ],
17957
+ "properties": {
17958
+ "too_big_mm": {
17959
+ "type": "object",
17960
+ "minProperties": 1,
17961
+ "propertyNames": {
17962
+ "enum": [
17963
+ "x",
17964
+ "y",
17965
+ "z",
17966
+ "radial"
17967
+ ]
17968
+ },
17969
+ "additionalProperties": {
17970
+ "type": "number",
17971
+ "exclusiveMinimum": 0
17972
+ }
17973
+ }
17974
+ },
17975
+ "additionalProperties": false
17976
+ },
17977
+ "limited_by_shell": {
17978
+ "type": "object",
17979
+ "required": [
17980
+ "depth_gap_left_mm"
17981
+ ],
17982
+ "properties": {
17983
+ "depth_gap_left_mm": {
17984
+ "type": "number",
17985
+ "exclusiveMinimum": 0
17986
+ }
17987
+ },
17988
+ "additionalProperties": false
17989
+ },
17990
+ "needs_other_seat": {
17991
+ "const": true
17992
+ },
17993
+ "normal_fixed": {
17994
+ "const": true
17995
+ }
17996
+ },
17997
+ "additionalProperties": false
17998
+ }
17999
+ },
18000
+ "additionalProperties": false
18001
+ }
18002
+ ]
18003
+ }
18004
+ }
18005
+ }
18006
+ }
18007
+ },
18008
+ "additionalProperties": false
18009
+ }
18010
+ },
18011
+ "zone_space": {
18012
+ "description": "分区剩余空间(r30 G2):每个有已放实例的声明分区一项,没有已放实例的分区不列。box_mm 是成员包围盒的并;room 是六个方向上还能伸多远——box_mm 的那一面保持截面向外平移,先碰到内壁(by 为 shell)或别的分区的件(by 为 occurrence:<id>)为止,几何距离、不扣余量、向下取到 0.1 mm;圆柱侧向按截面角点到轴线的距离判,与请求里的弦宽表同一读法。free_slab_mm 是成员之间沿各轴最长的空隙(整片截面上没有成员的那一段)。只做包围盒级别:圆件按包围盒算,不求最优装箱。shared_with 列出伸进 box_mm 的别的分区的件,它们不限 room,但会占掉 free_slab_mm 里的空间。都由代码算出,提案查这里,不必用计算器。",
18013
+ "type": "array",
18014
+ "items": {
18015
+ "type": "object",
18016
+ "required": [
18017
+ "zone",
18018
+ "occurrence_ids",
18019
+ "box_mm",
18020
+ "room",
18021
+ "free_slab_mm",
18022
+ "shared_with"
18023
+ ],
18024
+ "properties": {
18025
+ "zone": {
18026
+ "description": "分区名等短标识(与现有 fit_envelope.zone 规则相同)。",
18027
+ "type": "string",
18028
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,63}$"
18029
+ },
18030
+ "occurrence_ids": {
18031
+ "type": "array",
18032
+ "minItems": 1,
18033
+ "items": {
18034
+ "type": "string"
18035
+ }
18036
+ },
18037
+ "box_mm": {
18038
+ "type": "object",
18039
+ "required": [
18040
+ "min",
18041
+ "max"
18042
+ ],
18043
+ "properties": {
18044
+ "min": {
18045
+ "type": "array",
18046
+ "items": {
18047
+ "type": "number"
18048
+ },
18049
+ "minItems": 3,
18050
+ "maxItems": 3
18051
+ },
18052
+ "max": {
18053
+ "type": "array",
18054
+ "items": {
18055
+ "type": "number"
18056
+ },
18057
+ "minItems": 3,
18058
+ "maxItems": 3
18059
+ }
18060
+ },
18061
+ "additionalProperties": false
18062
+ },
18063
+ "room": {
18064
+ "type": "object",
18065
+ "required": [
18066
+ "+x",
18067
+ "-x",
18068
+ "+y",
18069
+ "-y",
18070
+ "+z",
18071
+ "-z"
18072
+ ],
18073
+ "properties": {
18074
+ "+x": {
18075
+ "description": "一个方向上还能伸多远:mm 是几何距离(不扣余量),by 是先碰到的东西——shell 为内壁,occurrence:<id> 为别的分区的件。",
18076
+ "type": "object",
18077
+ "required": [
18078
+ "mm",
18079
+ "by"
18080
+ ],
18081
+ "properties": {
18082
+ "mm": {
18083
+ "type": "number",
18084
+ "minimum": 0
18085
+ },
18086
+ "by": {
18087
+ "type": "string",
18088
+ "pattern": "^(shell|occurrence:[a-z0-9][a-z0-9_-]{0,127})$"
18089
+ }
18090
+ },
18091
+ "additionalProperties": false
18092
+ },
18093
+ "-x": {
18094
+ "description": "一个方向上还能伸多远:mm 是几何距离(不扣余量),by 是先碰到的东西——shell 为内壁,occurrence:<id> 为别的分区的件。",
18095
+ "type": "object",
18096
+ "required": [
18097
+ "mm",
18098
+ "by"
18099
+ ],
18100
+ "properties": {
18101
+ "mm": {
18102
+ "type": "number",
18103
+ "minimum": 0
18104
+ },
18105
+ "by": {
18106
+ "type": "string",
18107
+ "pattern": "^(shell|occurrence:[a-z0-9][a-z0-9_-]{0,127})$"
18108
+ }
18109
+ },
18110
+ "additionalProperties": false
18111
+ },
18112
+ "+y": {
18113
+ "description": "一个方向上还能伸多远:mm 是几何距离(不扣余量),by 是先碰到的东西——shell 为内壁,occurrence:<id> 为别的分区的件。",
18114
+ "type": "object",
18115
+ "required": [
18116
+ "mm",
18117
+ "by"
18118
+ ],
18119
+ "properties": {
18120
+ "mm": {
18121
+ "type": "number",
18122
+ "minimum": 0
18123
+ },
18124
+ "by": {
18125
+ "type": "string",
18126
+ "pattern": "^(shell|occurrence:[a-z0-9][a-z0-9_-]{0,127})$"
18127
+ }
18128
+ },
18129
+ "additionalProperties": false
18130
+ },
18131
+ "-y": {
18132
+ "description": "一个方向上还能伸多远:mm 是几何距离(不扣余量),by 是先碰到的东西——shell 为内壁,occurrence:<id> 为别的分区的件。",
18133
+ "type": "object",
18134
+ "required": [
18135
+ "mm",
18136
+ "by"
18137
+ ],
18138
+ "properties": {
18139
+ "mm": {
18140
+ "type": "number",
18141
+ "minimum": 0
18142
+ },
18143
+ "by": {
18144
+ "type": "string",
18145
+ "pattern": "^(shell|occurrence:[a-z0-9][a-z0-9_-]{0,127})$"
18146
+ }
18147
+ },
18148
+ "additionalProperties": false
18149
+ },
18150
+ "+z": {
18151
+ "description": "一个方向上还能伸多远:mm 是几何距离(不扣余量),by 是先碰到的东西——shell 为内壁,occurrence:<id> 为别的分区的件。",
18152
+ "type": "object",
18153
+ "required": [
18154
+ "mm",
18155
+ "by"
18156
+ ],
18157
+ "properties": {
18158
+ "mm": {
18159
+ "type": "number",
18160
+ "minimum": 0
18161
+ },
18162
+ "by": {
18163
+ "type": "string",
18164
+ "pattern": "^(shell|occurrence:[a-z0-9][a-z0-9_-]{0,127})$"
18165
+ }
18166
+ },
18167
+ "additionalProperties": false
18168
+ },
18169
+ "-z": {
18170
+ "description": "一个方向上还能伸多远:mm 是几何距离(不扣余量),by 是先碰到的东西——shell 为内壁,occurrence:<id> 为别的分区的件。",
18171
+ "type": "object",
18172
+ "required": [
18173
+ "mm",
18174
+ "by"
18175
+ ],
18176
+ "properties": {
18177
+ "mm": {
18178
+ "type": "number",
18179
+ "minimum": 0
18180
+ },
18181
+ "by": {
18182
+ "type": "string",
18183
+ "pattern": "^(shell|occurrence:[a-z0-9][a-z0-9_-]{0,127})$"
18184
+ }
18185
+ },
18186
+ "additionalProperties": false
18187
+ }
18188
+ },
18189
+ "additionalProperties": false
18190
+ },
18191
+ "free_slab_mm": {
18192
+ "type": "array",
18193
+ "items": {
18194
+ "type": "number",
18195
+ "minimum": 0
18196
+ },
18197
+ "minItems": 3,
18198
+ "maxItems": 3
17011
18199
  },
17012
- "occurrence_ids": {
18200
+ "shared_with": {
17013
18201
  "type": "array",
17014
18202
  "items": {
17015
18203
  "type": "string"
17016
18204
  }
17017
- },
17018
- "message": {
17019
- "type": "string",
17020
- "minLength": 1
17021
- },
17022
- "values": {
17023
- "type": "object"
17024
18205
  }
17025
18206
  },
17026
18207
  "additionalProperties": false
@@ -17898,6 +19079,7 @@
17898
19079
  "measured",
17899
19080
  "datasheet",
17900
19081
  "estimate",
19082
+ "database",
17901
19083
  "catalog",
17902
19084
  "unknown"
17903
19085
  ]
@@ -20991,7 +22173,7 @@
20991
22173
  "type": "array",
20992
22174
  "minItems": 1,
20993
22175
  "items": {
20994
- "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet 或 estimate;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
22176
+ "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet、database、catalog 或 estimate,其中 measured、datasheet、database 可信;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
20995
22177
  "type": "object",
20996
22178
  "required": [
20997
22179
  "occurrence_id",
@@ -21000,11 +22182,49 @@
21000
22182
  "size_mm",
21001
22183
  "size_basis",
21002
22184
  "aabb_mm",
22185
+ "footprint",
21003
22186
  "facing_face",
21004
22187
  "facing_axis",
21005
22188
  "facing_basis"
21006
22189
  ],
21007
22190
  "properties": {
22191
+ "footprint": {
22192
+ "description": "占位形状(r30 G1):box,或 circle(axis 是圆的法向,世界坐标轴、不带正负号)。圆的直径与厚度取 aabb_mm:axis 方向的边长是厚度,另两个方向相等,即直径;没有别的尺寸字段。只有走预留、没有组件 CAD 的件可以是 circle;真实几何以 CAD 为准。",
22193
+ "oneOf": [
22194
+ {
22195
+ "type": "object",
22196
+ "required": [
22197
+ "shape"
22198
+ ],
22199
+ "properties": {
22200
+ "shape": {
22201
+ "const": "box"
22202
+ }
22203
+ },
22204
+ "additionalProperties": false
22205
+ },
22206
+ {
22207
+ "type": "object",
22208
+ "required": [
22209
+ "shape",
22210
+ "axis"
22211
+ ],
22212
+ "properties": {
22213
+ "shape": {
22214
+ "const": "circle"
22215
+ },
22216
+ "axis": {
22217
+ "enum": [
22218
+ "x",
22219
+ "y",
22220
+ "z"
22221
+ ]
22222
+ }
22223
+ },
22224
+ "additionalProperties": false
22225
+ }
22226
+ ]
22227
+ },
21008
22228
  "occurrence_id": {
21009
22229
  "type": "string",
21010
22230
  "pattern": "^[a-z0-9][a-z0-9_-]{0,127}$"
@@ -21061,6 +22281,7 @@
21061
22281
  "measured",
21062
22282
  "datasheet",
21063
22283
  "estimate",
22284
+ "database",
21064
22285
  "catalog",
21065
22286
  "reserved",
21066
22287
  "cad_asset"
@@ -21926,6 +23147,7 @@
21926
23147
  "frame",
21927
23148
  "shell",
21928
23149
  "shell_source",
23150
+ "cavity",
21929
23151
  "tolerances",
21930
23152
  "inputs",
21931
23153
  "slots",
@@ -22109,6 +23331,104 @@
22109
23331
  }
22110
23332
  ]
22111
23333
  },
23334
+ "cavity": {
23335
+ "description": "内腔几何(r30 G2),由外壳算出,与布局校验用的是同一个内腔。盒形:内腔范围与尺寸。圆柱(轴为 Z、原点在底面中心):内半径、轴向范围、内接正方形边长,以及弦宽表——离轴 offset_mm 处、与这个方向垂直能放下的最大宽度,向下取到 0.1 mm。用法:取 offset_mm 不小于实际离轴距离的那一行(往大处取,不在两行之间插值),读到的宽度总是放得下。width_mm 是几何宽度,不扣任何余量或间隙;判定出壳时只有布局校验放宽接触容差 contact_mm,此外不另加余量。盒形的 size_mm 由代码从 min_mm、max_mm 算出,不必自己减。提案查表,不必再用计算器算。",
23336
+ "oneOf": [
23337
+ {
23338
+ "type": "object",
23339
+ "required": [
23340
+ "shape",
23341
+ "min_mm",
23342
+ "max_mm",
23343
+ "size_mm"
23344
+ ],
23345
+ "properties": {
23346
+ "shape": {
23347
+ "const": "box"
23348
+ },
23349
+ "min_mm": {
23350
+ "type": "array",
23351
+ "items": {
23352
+ "type": "number"
23353
+ },
23354
+ "minItems": 3,
23355
+ "maxItems": 3
23356
+ },
23357
+ "max_mm": {
23358
+ "type": "array",
23359
+ "items": {
23360
+ "type": "number"
23361
+ },
23362
+ "minItems": 3,
23363
+ "maxItems": 3
23364
+ },
23365
+ "size_mm": {
23366
+ "type": "array",
23367
+ "items": {
23368
+ "type": "number"
23369
+ },
23370
+ "minItems": 3,
23371
+ "maxItems": 3
23372
+ }
23373
+ },
23374
+ "additionalProperties": false
23375
+ },
23376
+ {
23377
+ "type": "object",
23378
+ "required": [
23379
+ "shape",
23380
+ "inner_radius_mm",
23381
+ "z_mm",
23382
+ "inscribed_square_mm",
23383
+ "chords_mm"
23384
+ ],
23385
+ "properties": {
23386
+ "shape": {
23387
+ "const": "cylinder"
23388
+ },
23389
+ "inner_radius_mm": {
23390
+ "type": "number",
23391
+ "exclusiveMinimum": 0
23392
+ },
23393
+ "z_mm": {
23394
+ "type": "array",
23395
+ "items": {
23396
+ "type": "number"
23397
+ },
23398
+ "minItems": 2,
23399
+ "maxItems": 2
23400
+ },
23401
+ "inscribed_square_mm": {
23402
+ "type": "number",
23403
+ "exclusiveMinimum": 0
23404
+ },
23405
+ "chords_mm": {
23406
+ "type": "array",
23407
+ "minItems": 1,
23408
+ "items": {
23409
+ "type": "object",
23410
+ "required": [
23411
+ "offset_mm",
23412
+ "width_mm"
23413
+ ],
23414
+ "properties": {
23415
+ "offset_mm": {
23416
+ "type": "number",
23417
+ "minimum": 0
23418
+ },
23419
+ "width_mm": {
23420
+ "type": "number",
23421
+ "minimum": 0
23422
+ }
23423
+ },
23424
+ "additionalProperties": false
23425
+ }
23426
+ }
23427
+ },
23428
+ "additionalProperties": false
23429
+ }
23430
+ ]
23431
+ },
22112
23432
  "shell_source": {
22113
23433
  "description": "外壳由代码生成的出处(模型算术 SK-1):basis、用的是哪条硬尺寸(limit_id)或哪个参考产品(item_id)、轴向映射;size 是各轴的数:选择原样({value, choice}),派生是 Formula 的求值回执(FormulaResult),由代码按相等的上下限填值的轴为 null;appearance_target 的估算外观容差另记在 tolerance_mm。",
22114
23434
  "type": "object",
@@ -23940,6 +25260,7 @@
23940
25260
  "measured",
23941
25261
  "datasheet",
23942
25262
  "estimate",
25263
+ "database",
23943
25264
  "catalog",
23944
25265
  "unknown",
23945
25266
  "cad_asset"
@@ -24682,7 +26003,7 @@
24682
26003
  "additionalProperties": false
24683
26004
  },
24684
26005
  "placement": {
24685
- "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet 或 estimate;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
26006
+ "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet、database、catalog 或 estimate,其中 measured、datasheet、database 可信;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
24686
26007
  "type": "object",
24687
26008
  "required": [
24688
26009
  "occurrence_id",
@@ -24691,11 +26012,49 @@
24691
26012
  "size_mm",
24692
26013
  "size_basis",
24693
26014
  "aabb_mm",
26015
+ "footprint",
24694
26016
  "facing_face",
24695
26017
  "facing_axis",
24696
26018
  "facing_basis"
24697
26019
  ],
24698
26020
  "properties": {
26021
+ "footprint": {
26022
+ "description": "占位形状(r30 G1):box,或 circle(axis 是圆的法向,世界坐标轴、不带正负号)。圆的直径与厚度取 aabb_mm:axis 方向的边长是厚度,另两个方向相等,即直径;没有别的尺寸字段。只有走预留、没有组件 CAD 的件可以是 circle;真实几何以 CAD 为准。",
26023
+ "oneOf": [
26024
+ {
26025
+ "type": "object",
26026
+ "required": [
26027
+ "shape"
26028
+ ],
26029
+ "properties": {
26030
+ "shape": {
26031
+ "const": "box"
26032
+ }
26033
+ },
26034
+ "additionalProperties": false
26035
+ },
26036
+ {
26037
+ "type": "object",
26038
+ "required": [
26039
+ "shape",
26040
+ "axis"
26041
+ ],
26042
+ "properties": {
26043
+ "shape": {
26044
+ "const": "circle"
26045
+ },
26046
+ "axis": {
26047
+ "enum": [
26048
+ "x",
26049
+ "y",
26050
+ "z"
26051
+ ]
26052
+ }
26053
+ },
26054
+ "additionalProperties": false
26055
+ }
26056
+ ]
26057
+ },
24699
26058
  "occurrence_id": {
24700
26059
  "type": "string",
24701
26060
  "pattern": "^[a-z0-9][a-z0-9_-]{0,127}$"
@@ -24752,6 +26111,7 @@
24752
26111
  "measured",
24753
26112
  "datasheet",
24754
26113
  "estimate",
26114
+ "database",
24755
26115
  "catalog",
24756
26116
  "reserved",
24757
26117
  "cad_asset"
@@ -25264,7 +26624,7 @@
25264
26624
  "additionalProperties": false
25265
26625
  },
25266
26626
  "placement": {
25267
- "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet 或 estimate;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
26627
+ "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet、database、catalog 或 estimate,其中 measured、datasheet、database 可信;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
25268
26628
  "type": "object",
25269
26629
  "required": [
25270
26630
  "occurrence_id",
@@ -25273,11 +26633,49 @@
25273
26633
  "size_mm",
25274
26634
  "size_basis",
25275
26635
  "aabb_mm",
26636
+ "footprint",
25276
26637
  "facing_face",
25277
26638
  "facing_axis",
25278
26639
  "facing_basis"
25279
26640
  ],
25280
26641
  "properties": {
26642
+ "footprint": {
26643
+ "description": "占位形状(r30 G1):box,或 circle(axis 是圆的法向,世界坐标轴、不带正负号)。圆的直径与厚度取 aabb_mm:axis 方向的边长是厚度,另两个方向相等,即直径;没有别的尺寸字段。只有走预留、没有组件 CAD 的件可以是 circle;真实几何以 CAD 为准。",
26644
+ "oneOf": [
26645
+ {
26646
+ "type": "object",
26647
+ "required": [
26648
+ "shape"
26649
+ ],
26650
+ "properties": {
26651
+ "shape": {
26652
+ "const": "box"
26653
+ }
26654
+ },
26655
+ "additionalProperties": false
26656
+ },
26657
+ {
26658
+ "type": "object",
26659
+ "required": [
26660
+ "shape",
26661
+ "axis"
26662
+ ],
26663
+ "properties": {
26664
+ "shape": {
26665
+ "const": "circle"
26666
+ },
26667
+ "axis": {
26668
+ "enum": [
26669
+ "x",
26670
+ "y",
26671
+ "z"
26672
+ ]
26673
+ }
26674
+ },
26675
+ "additionalProperties": false
26676
+ }
26677
+ ]
26678
+ },
25281
26679
  "occurrence_id": {
25282
26680
  "type": "string",
25283
26681
  "pattern": "^[a-z0-9][a-z0-9_-]{0,127}$"
@@ -25334,6 +26732,7 @@
25334
26732
  "measured",
25335
26733
  "datasheet",
25336
26734
  "estimate",
26735
+ "database",
25337
26736
  "catalog",
25338
26737
  "reserved",
25339
26738
  "cad_asset"
@@ -26849,7 +28248,7 @@
26849
28248
  "type": "array",
26850
28249
  "minItems": 1,
26851
28250
  "items": {
26852
- "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet 或 estimate;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
28251
+ "description": "一个实例的坐落方式与盒级几何。size_mm 是放置用的本地尺寸:已选零件的真实尺寸(size_basis 为 measured、datasheet、database、catalog 或 estimate,其中 measured、datasheet、database 可信;有可用组件 CAD 时取资产实测包围盒,为 cad_asset),尺寸未知时是工程预留(reserved,骨架为 degraded)。cad_asset 是宿主解析的几何资产(没有解析时省略),asset_dimension_conflict 记录资产与目录尺寸的冲突。aabb_mm 是装配坐标系下的包围盒。facing_axis 是功能面在零件本地的朝向,facing_basis 写它来自零件资料还是提案假设。",
26853
28252
  "type": "object",
26854
28253
  "required": [
26855
28254
  "occurrence_id",
@@ -26858,11 +28257,49 @@
26858
28257
  "size_mm",
26859
28258
  "size_basis",
26860
28259
  "aabb_mm",
28260
+ "footprint",
26861
28261
  "facing_face",
26862
28262
  "facing_axis",
26863
28263
  "facing_basis"
26864
28264
  ],
26865
28265
  "properties": {
28266
+ "footprint": {
28267
+ "description": "占位形状(r30 G1):box,或 circle(axis 是圆的法向,世界坐标轴、不带正负号)。圆的直径与厚度取 aabb_mm:axis 方向的边长是厚度,另两个方向相等,即直径;没有别的尺寸字段。只有走预留、没有组件 CAD 的件可以是 circle;真实几何以 CAD 为准。",
28268
+ "oneOf": [
28269
+ {
28270
+ "type": "object",
28271
+ "required": [
28272
+ "shape"
28273
+ ],
28274
+ "properties": {
28275
+ "shape": {
28276
+ "const": "box"
28277
+ }
28278
+ },
28279
+ "additionalProperties": false
28280
+ },
28281
+ {
28282
+ "type": "object",
28283
+ "required": [
28284
+ "shape",
28285
+ "axis"
28286
+ ],
28287
+ "properties": {
28288
+ "shape": {
28289
+ "const": "circle"
28290
+ },
28291
+ "axis": {
28292
+ "enum": [
28293
+ "x",
28294
+ "y",
28295
+ "z"
28296
+ ]
28297
+ }
28298
+ },
28299
+ "additionalProperties": false
28300
+ }
28301
+ ]
28302
+ },
26866
28303
  "occurrence_id": {
26867
28304
  "type": "string",
26868
28305
  "pattern": "^[a-z0-9][a-z0-9_-]{0,127}$"
@@ -26919,6 +28356,7 @@
26919
28356
  "measured",
26920
28357
  "datasheet",
26921
28358
  "estimate",
28359
+ "database",
26922
28360
  "catalog",
26923
28361
  "reserved",
26924
28362
  "cad_asset"
@@ -28636,6 +30074,8 @@
28636
30074
  "translation_mm",
28637
30075
  "rotation_deg",
28638
30076
  "aabb_mm",
30077
+ "footprint",
30078
+ "envelope_axis",
28639
30079
  "facing_face",
28640
30080
  "point_ids",
28641
30081
  "geometry",
@@ -28737,6 +30177,58 @@
28737
30177
  },
28738
30178
  "additionalProperties": false
28739
30179
  },
30180
+ "footprint": {
30181
+ "description": "骨架冻结的占位形状;件按组件 CAD 构建时为 box(CAD 几何为准)",
30182
+ "oneOf": [
30183
+ {
30184
+ "type": "object",
30185
+ "required": [
30186
+ "shape"
30187
+ ],
30188
+ "properties": {
30189
+ "shape": {
30190
+ "const": "box"
30191
+ }
30192
+ },
30193
+ "additionalProperties": false
30194
+ },
30195
+ {
30196
+ "type": "object",
30197
+ "required": [
30198
+ "shape",
30199
+ "axis"
30200
+ ],
30201
+ "properties": {
30202
+ "shape": {
30203
+ "const": "circle"
30204
+ },
30205
+ "axis": {
30206
+ "enum": [
30207
+ "x",
30208
+ "y",
30209
+ "z"
30210
+ ]
30211
+ }
30212
+ },
30213
+ "additionalProperties": false
30214
+ }
30215
+ ]
30216
+ },
30217
+ "envelope_axis": {
30218
+ "oneOf": [
30219
+ {
30220
+ "type": "null"
30221
+ },
30222
+ {
30223
+ "enum": [
30224
+ "x",
30225
+ "y",
30226
+ "z"
30227
+ ]
30228
+ }
30229
+ ],
30230
+ "description": "circle 件的圆柱轴在件自身坐标里的方向(由冻结旋转推出),box 时为 null"
30231
+ },
28740
30232
  "facing_face": {
28741
30233
  "oneOf": [
28742
30234
  {
@@ -29796,6 +31288,7 @@
29796
31288
  "measured",
29797
31289
  "datasheet",
29798
31290
  "estimate",
31291
+ "database",
29799
31292
  "catalog",
29800
31293
  "unknown"
29801
31294
  ]
@@ -31167,12 +32660,13 @@
31167
32660
  ]
31168
32661
  },
31169
32662
  "basis": {
31170
- "description": "事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;recorded 库内或既有资料记录。unknown 仅兼容历史记录,新资料按完整度列明缺项。",
32663
+ "description": "事实来源类型:manufacturer 厂商资料;measured 测量记录;estimate 估算;engineering_design 工程设计;database 器件库登记的尺寸,有经核对的 v2 快照绑定且资料完整(三个轴与 evidence_ref 齐全,由代码判定),算可信尺寸;recorded 库内或既有资料记录(没有核对过的绑定或资料不全的库内尺寸也在这里),不算可信。unknown 仅兼容历史记录,新资料按完整度列明缺项。",
31171
32664
  "enum": [
31172
32665
  "manufacturer",
31173
32666
  "measured",
31174
32667
  "estimate",
31175
32668
  "engineering_design",
32669
+ "database",
31176
32670
  "recorded",
31177
32671
  "unknown"
31178
32672
  ]