spine-parts 2.16.0 → 2.17.0
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.
- package/docs/AUTHORING.md +95 -1
- package/docs/STABILITY.md +8 -0
- package/package.json +1 -1
- package/src/artjoints.ts +2 -1
- package/src/boundarycolour.ts +3 -2
- package/src/build.ts +4 -3
- package/src/check.ts +42 -36
- package/src/checkrow.ts +23 -0
- package/src/coincide.ts +5 -4
- package/src/cutmaterial.ts +2 -1
- package/src/motionseampose.ts +2 -1
- package/src/setuppainting.ts +3 -2
package/docs/AUTHORING.md
CHANGED
|
@@ -152,7 +152,7 @@ read by no CPU stage).
|
|
|
152
152
|
| `assemble.ground` | assemble, build | **authored**, optional `"plain"` or `"busy"` (issue #996): what lies behind the figure in the painting. `plain` (the default) is a ground of one colour; `busy` is an opaque ground of many colours (a wall, a banner). Read by `--project visible` only: a busy, opaque ground needs `assemble.ground: busy`; without it, visible takes backdrop pixels. An invalid value is `CONFIG_FIELD_TYPE` at `config.assemble.ground`. Absent or `plain`, existing build bytes are unchanged. `assemble` warns (`ASSEMBLE_GROUND_PLAIN`, §5), under project: visible, where paintingEdges reads the ground, when a plain ground's border ring is not one colour. |
|
|
153
153
|
| `assemble.rig_scale` | assemble — the rig is `trunc(w × rig_scale)` x `trunc(h × rig_scale)`, and every rig-px value after it (`bones`, `meshes`, `motion`, `patches`, `cuts`) is in that rig's pixels; `check --source` (`CHECK_SOURCE_SIZE`) and `compose` (`SCENE_RIG_SCALE_AGREES`) read it back off `parts.json` | authored; rig pixels per source pixel. 0.5 in both examples (a 1664x2432 painting makes an 832x1216 rig). **Keep the figure about 1,100 to 1,200 rig px tall** — the `H` of `propose`'s `mesh spacing:` note, the height of the parts' boxes together — so for another painting, about 1,150 over the figure's height in painting px: that is the size the proposer's spacing divisor was calibrated at (H 1106–1185, the `mesh spacing` note says so) and the size of the two examples `check`'s bars are derived from, and the proposer and `check` also hold fixed rig-px values that do not scale with it (the fringe's 10 px step, the trunk segments' 18, 20, 30 and 100 px, the 15 px wrist tolerance, the 10-row pendant floor, the seam bar's 50 rig px over 40). What else it trades, measured on `demo` with the README loop from a fresh config at 0.25, 0.5 and 1 (issue #345, rig-c 2.47.1): the same plan and the same ten chains; every bar but the one the uncorrected `demo` always fails (`bottomwear` `TIP_OVER_ROOT`, the README loop's `RL01`) passing at all three; the atlas page 418x606, 832x1205 and 1825x2047; the figure's mesh spacing 16, 32 and 64, so 830, 868 and 932 triangles; the breath 2.5 % of a torso that scales with it; and the proposed bones, scaled to 0.5, off the 0.5 proposal's by up to 38 px at 0.25 and 22.5 px at 1 (the hairpin's origin; the skirt roots 20 and 10.5) — the fixed-px values above. `propose` records it on the proposal as `proposed_rig_scale` (issue #354), and changing `assemble.rig_scale` after the rig sections are written is refused (`CONFIG_PROPOSED_RIG_SCALE`): without that refusal `demo`'s tracked config built at 0.25 gated green and `check` failed only `TIP_OVER_ROOT` on both sleeves (`propose --from-config` named 54 `LINT` lines, links off the art) — re-run `assemble` and `propose` at the new scale. Absent: `CONFIG_FIELD_PRESENT`; 0, negative or not a number: `CONFIG_FIELD_TYPE`; a rig under 1x1: `ASSEMBLE_RIG_SIZE` |
|
|
154
154
|
| `assemble.plan` | assemble; also the list every `meshes`/`regions` key must come from | **proposed** by `assemble --propose-plan`. `[part name, "full" \| "head", See-through tag]`, in draw order back to front. Names are free; roles come from the tag. A layer the author made and added to a run takes `author:<label>` in the tag's place, and has no role (§5, *A layer the author made*). When `generation.control.skeleton` is present and a full-run `handwear-r` or `handwear-l` layer merges sleeve, bare hand and overgarment drape into one layer — a skin-coloured hand cluster (`>= 40` run px, `GHOST_MIN_AREA`, measured `516..4,787` run px across the 9-standee corpus) lies within `0.35` forearm lengths of `<s>_wrist` and non-skin pixels reach more than `1.0x` the forearm length (`<s>_elbow -> <s>_wrist`) below `<s>_wrist` (issue #490; measured `-0.15x..0.45x` on the 6 clean standees vs `1.25x..2.02x` on the 3 merged standees, placing `1.0x` inside the `0.45x..1.25x` gap) — the layer is split into `drape-<s>`, `handwear-<s>` and `hand-<s>` (back to front) when the Euclidean RGB distance between the sleeve median colour above `<s>_wrist` and the drape median colour below `<s>_wrist` is at least `80` (`ARM_DRAPE_COLOR_DISTANCE`, measured `103.6..236.0` on the two distinct-colour merged standees vs `20.8..28.2` on the same-colour merged standee, placing `80` between `28.2` and `103.6`), or refused with `SEETHROUGH_ARM_RUN_MERGED` when the distance is under `80` |
|
|
155
|
-
| `assemble.extend_below_crop` | assemble | **proposed** with the plan: `{part, run, tag}` — a head-run part that reaches the bottom of the head crop is continued from a full-run layer, whole connected components. With optional `edges: ["left", "right", "top", "bottom"]`, copies full-run pixels at alpha >= 128 beyond only those actual crop edges; no rim is grown and no pixel whose centre lies inside the half-open crop is written. The entry must name a head-run part and full-run layer of the same tag. Omit `edges` to retain the original inset bottom, component seeding and rim behavior. |
|
|
155
|
+
| `assemble.extend_below_crop` | assemble | **proposed** with the plan: `{part, run, tag}` — a head-run part that reaches the bottom of the head crop is continued from a full-run layer, whole connected components. With optional `edges: ["left", "right", "top", "bottom"]`, copies full-run pixels at alpha >= 128 beyond only those actual crop edges; no rim is grown and no pixel whose centre lies inside the half-open crop is written. Under `visible`, painting-edge reconstruction re-evaluates the part once the crop line is no longer its edge, so pixels inside the crop can change; in the measured cases they were next to the declared edge. The entry must name a head-run part and full-run layer of the same tag. Omit `edges` to retain the original inset bottom, component seeding and rim behavior. |
|
|
156
156
|
| `assemble.extend_painting` | assemble, base painting only — assigns unheld opaque painting samples to declared final layer-derived parts | **authored**, optional array of `{part, band: [x0,y0,x1,y1], max_distance, min_held_alpha?, order?}`; part, band and max_distance required, integer rig pixels, half-open band and positive maximum four-neighbour path length. Off when absent or empty. See [Bounded painting extension](#bounded-painting-extension-issue-848) |
|
|
157
157
|
| `assemble.patches` | assemble; `meshes`/`regions` keys may name them too | **authored**, optional: `[{name, box, alpha, draw}]` — an extra part cut from the **painting** itself, for figure no See-through layer holds (a hem both runs dropped). `box` is `[x0, y0, x1, y1]` in **rig** pixels, `x1`/`y1` exclusive — the space of `parts.json` and `recomposite_rig.png`, where the hole is found; `alpha` is `"silhouette"` (the painting's figure silhouette inside the box, the one `--seam silhouette` uses) or `"box"` (the whole box); `draw` is `"back"`, `"front"` or `{"before": "<plan part>"}`. A patch is always a region: its bone is `regions.<name>`, in the one place every region's bone lives, and a `meshes` entry for it is refused. `draw` sets assembled part order; an exclusively bound limb rider's final rig slot joins that limb's block (see the limbs subsection). Use [Source before scissors](#source-before-scissors) before a patch; §5 describes structural placement |
|
|
158
158
|
| `assemble.cuts` | assemble; `meshes`/`regions` keys may name the new parts too, and must (each is a part like any other) | **authored**, optional (issue #170): `[{from, into, polygon, draw, overlap, under, under_fill}]`, `under` and `under_fill` optional — a structural separation under [Source before scissors](#source-before-scissors), cut from a plan part's layer by the author's polygon: the pixels of plan part `from` whose **centre** lies inside `polygon` (even-odd; a centre exactly on an edge is outside) leave `from` and make the new part `into`, colour and alpha, so every pixel of the layer ends in exactly one of the two. `polygon` is `[[x, y], …]`, at least three points, non-negative integer **rig** pixels — the space of `parts.json` and of the patches' boxes. The file that shows the layer in those coordinates is `assemble`'s own `rig/parts/<from>.png`, placed at its `parts.json` `x`, `y` (the PNG's pixel `(i, j)` is rig pixel `(x + i, y + j)`), or `render/recomposite_rig.png`, the whole rig 1:1; the contact sheets (`sheet`) are scaled and carry no coordinates. `draw` is `"back"`, `"front"` or `{"before": "<plan part>"}`, as for a patch (to keep the setup pose, draw the piece immediately in front of `from` — `{"before": "<the plan part after from>"}`, or `"front"` when `from` is the last plan part; `{"before": "<from>"}` draws it behind `from`, which `under` refuses as `ASSEMBLE_UNDER_DRAW` because the fill would hide it). `from` must be a plan part (`CONFIG_NAME_RESOLVES`; a patch or another cut's piece is refused; a part a limb takes may be cut where no segment of the limb holds it, issue #564, §5 *Limbs*), `into` a new name (`CONFIG_PART_UNIQUE`), the polygon three or more integer points (`CONFIG_FIELD_TYPE`). The piece's `parts.json` record carries `from`'s `<run>:<tag>` and its own counts, each split from the layer's by where the pixel lies; it is a mesh or a region under its own name, and the coverage rule holds it like a plan part. What the config cannot know the stage refuses: a polygon point past the rig (`ASSEMBLE_CUT_INSIDE`), two cuts of one part sharing a pixel (`ASSEMBLE_CUT_OVERLAP`), a cut that takes none of the layer's opaque pixels or leaves `from` none (`ASSEMBLE_CUT_PIXELS`), a cut of a part a limb takes that takes a pixel a segment of the limb holds (`ASSEMBLE_CUT_CROSSES_LIMB`). `overlap` is required, a non-negative integer of rig pixels with no default (`CONFIG_FIELD_TYPE`): the **band** — the polygon's pixels within `overlap` px of its edge by Chebyshev distance (the polygon's mask less its erosion by a `2 * overlap + 1` square) — stays in `from` as well as going to the piece, so the piece's resampled edge has art under it; the counts stay a strict partition and the band is the base's extra copy, printed on the `cut:` line. At `0` the two abut and `check`'s seam bar judges the edge between them (`CHECK_SEAM_WITHIN_BAR`, §5). A band only covers the edge at rest: a piece that swings well clear of where it was painted shows the hole it leaves, and a thin piece's band shows a ghost of the piece. `under` (issue #193), optional, is the author's image of what lies under the piece: a PNG path relative to the config's directory (`CONFIG_FIELD_TYPE` unless a non-empty string), in rig pixels over the polygon's **bounding box** — the least and greatest polygon x and y, so the image is `max x − min x` by `max y − min y` and its pixel `(i, j)` is rig pixel `(min x + i, min y + j)`. Where the cut removed pixels from `from` — the piece's pixels (alpha above 0) less the band — `from` takes the image's pixel, colour and alpha wherever the image's alpha is at least the alpha the cut removed there (**filled**); elsewhere `from` stays empty there (**left empty**): a transparent pixel is the author's statement that nothing lies under it (the background, or a part drawn behind), and a less opaque one is not half-filled. The image is read nowhere else, so its pixels over the band, over the box outside the polygon or where the layer had no art never change `from`. The `cut:` line then ends `; under <n> px filled, <m> px left empty` (`n + m` is every removed pixel), so an unintended hole is a number in the log, not a guess; the filled pixels count in `from`'s `opaque_px` and `occluded_px` (the piece is drawn over them), never as visible or projected. The stage refuses: a file that is not there (`ASSEMBLE_UNDER_PRESENT`) or not a PNG (`ASSEMBLE_UNDER_DECODES`), an image not exactly the box's size (`ASSEMBLE_UNDER_SIZE`, both sizes given), an image that fills none of the removed pixels — all transparent there, or another file (`ASSEMBLE_UNDER_EMPTY`; to leave the whole hole, drop `under`), and a piece drawn behind `from` (`ASSEMBLE_UNDER_DRAW`: the fill would hide it; draw it `"front"` or `{"before": "<the plan part after from>"}`). Producing the image is the author's, by whatever means; absent, `from` keeps only its band. `under_fill` (issue #360), optional, is the one value `"colour"` (`CONFIG_FIELD_TYPE` on any other): the same pixels are filled and left empty, and a filled pixel takes the image's **colour** at the alpha the cut removed there instead of the image's alpha, so `from`'s alpha is the uncut layer's wherever the image fills and its silhouette does not grow — an opaque image over a soft edge leaves the edge soft. It applies to the part's hidden-art layer as well as to a file; a cut with neither is refused (`ASSEMBLE_UNDER_FILL_SOURCE`). The `cut:` line's filled count then says how many took the colour only: `; under 190 px filled (190 colour only, at the alpha the cut removed), 0 px left empty`. Absent, a filled pixel takes the image's colour and alpha, as above |
|
|
@@ -7965,3 +7965,97 @@ It does not authenticate a caller's chosen threshold or floor: consumers must
|
|
|
7965
7965
|
compare those to their own policy. The report does not choose which components
|
|
7966
7966
|
a consumer accepts. The named refusals are `DIFF_COMPONENTS_INPUT`,
|
|
7967
7967
|
`DIFF_COMPONENTS_BINDING` and `DIFF_COMPONENTS_REPORT` in the rule table.
|
|
7968
|
+
|
|
7969
|
+
|
|
7970
|
+
### Consumer check rows (issue #1089)
|
|
7971
|
+
|
|
7972
|
+
Every object in a row-bearing array in `check.json`, including nested observation
|
|
7973
|
+
arrays and alternate-set seam arrays, carries `row_scope` (`part`, `pair`, `rig`),
|
|
7974
|
+
`row_kind` (`finding`, `evidence`) and `row_subjects` (the named parts, in producer
|
|
7975
|
+
order; empty for rig scope). A pair is not a per-part flag. A bone, chain or
|
|
7976
|
+
authored observation region has rig scope: its name does not identify a part.
|
|
7977
|
+
The producer applies its existing bar or warning predicate; a block FAIL does
|
|
7978
|
+
not turn every row into a finding. Unavailable/unmeasured readings and raw
|
|
7979
|
+
reference readings are evidence. Most unavailable readings explain the gap in
|
|
7980
|
+
an existing reason, unread or unmeasured field, or an enclosing SKIP reason.
|
|
7981
|
+
The exception is `SEAM_OVER_MOTION.required.pairs`: unread or unbanded rows
|
|
7982
|
+
carry no row-level reason; their reason is reported in problems/stdout, with
|
|
7983
|
+
no new JSON key. A measured
|
|
7984
|
+
SKIP such as an art distance without a declared limit remains evidence.
|
|
7985
|
+
`WIND_BAND` pairs that do not hold throughout and steps that do not hold are
|
|
7986
|
+
findings past the declared gap/ghost bars; holding pairs and steps are evidence.
|
|
7987
|
+
|
|
7988
|
+
All six scope/kind combinations occur in the generated CLI fixture. Existing
|
|
7989
|
+
`scope` and `kind` fields keep their meanings and bytes. The document has no
|
|
7990
|
+
top-level spec/version tag to advance; these fields are additive under its
|
|
7991
|
+
existing contract. Removing only the three `row_` fields recovers legacy JSON.
|
|
7992
|
+
|
|
7993
|
+
The table is generated from the actual `checkRow` calls, including their finding
|
|
7994
|
+
predicates, by `bun tools/check_row_reference.ts --write`; the tree suite checks
|
|
7995
|
+
it against the producers and rejects a planted omission. Subjects are explicit
|
|
7996
|
+
in `row_subjects`; existing part/slot, front/back, a/b and parts fields remain
|
|
7997
|
+
unchanged. `seam_scope.whole_pairs` copies the `seam_pairs` producer rows without
|
|
7998
|
+
the picture, and `sets.*` reuses the same seam producers.
|
|
7999
|
+
|
|
8000
|
+
Scalar/string arrays (animations, frame indices, bones, constraint names and
|
|
8001
|
+
formatted chain/lag strings), numeric coordinate tuples, and aggregate blocks
|
|
8002
|
+
are not object rows and retain their shape. Singleton summaries (`worst`,
|
|
8003
|
+
`physics_on/off`, wind breaks, largest hole, viewport, unowned summary and
|
|
8004
|
+
no-reference-art totals) are fields of their parent reading, not independent
|
|
8005
|
+
row collections; they retain their existing shape. Arrays inside these records
|
|
8006
|
+
are still labelled (for example the level worst's `through` and posed joints).
|
|
8007
|
+
Changed drawing identities have rig scope because generated slots need not name a part.
|
|
8008
|
+
Internal `SeamSupport.drawings` never enters check JSON. Named requirement
|
|
8009
|
+
`lines` are the one dictionary of individual rows and are also labelled;
|
|
8010
|
+
`sets` is a dictionary of whole check blocks.
|
|
8011
|
+
|
|
8012
|
+
<!-- check-row-table:begin -->
|
|
8013
|
+
| Row family | row_scope | row_kind | row_subjects (producer expression) | Producer |
|
|
8014
|
+
| --- | --- | --- | --- | --- |
|
|
8015
|
+
| `ANIMATIONS_DO_NOT_FOLD.declared_not_folding` | 'part' | finding | [e.slot] | [check.ts:3479](../src/check.ts#L3479) |
|
|
8016
|
+
| `ANIMATIONS_DO_NOT_FOLD.folding` | 'part' | finding when entry === undefined; otherwise evidence | [slot] | [check.ts:3441](../src/check.ts#L3441) |
|
|
8017
|
+
| `ART_JOINT_DISTANCE.joints` | 'rig' | finding when status === 'FAIL'; otherwise evidence | [] | [artjoints.ts:86](../src/artjoints.ts#L86) |
|
|
8018
|
+
| `BOUNDARY_COLOUR_STEP.over` | 'pair' | finding | r.parts | [boundarycolour.ts:219](../src/boundarycolour.ts#L219) |
|
|
8019
|
+
| `BOUNDARY_COLOUR_STEP.unmeasured` | 'part' | evidence | [r.slot] | [boundarycolour.ts:220](../src/boundarycolour.ts#L220) |
|
|
8020
|
+
| `CLOTH_SETTLES.rows` | 'rig' | finding when speeds.length > 0 && s < speeds.length; otherwise evidence | [] | [check.ts:5764](../src/check.ts#L5764) |
|
|
8021
|
+
| `CUT_JOINT_MATERIAL.rows` | 'part' | finding when r.status === 'FAIL'; otherwise evidence | [r.part] | [cutmaterial.ts:280](../src/cutmaterial.ts#L280) |
|
|
8022
|
+
| `FEET_STAY_LEVEL.feet` | 'part' | finding when row.status === 'FAIL'; otherwise evidence | [row.part] | [check.ts:3680](../src/check.ts#L3680) |
|
|
8023
|
+
| `FEET_STAY_LEVEL.feet[].worst.through` | 'rig' | evidence | [] | [check.ts:3655](../src/check.ts#L3655) |
|
|
8024
|
+
| `LIMB_ONE_BONE.parts` | 'part' | finding when fail; otherwise evidence | [p.name] | [check.ts:3972](../src/check.ts#L3972) |
|
|
8025
|
+
| `PART_SUPPORT_REPORT.pairs` | 'pair' | evidence; finding when length > 0; otherwise evidence | [F.name, B.name] | [coincide.ts:114](../src/coincide.ts#L114), [coincide.ts:130](../src/coincide.ts#L130) |
|
|
8026
|
+
| `PART_SUPPORT_REPORT.raw_pairs` | 'pair' | evidence | [F.name, B.name] | [coincide.ts:110](../src/coincide.ts#L110) |
|
|
8027
|
+
| `PART_SUPPORT_REPORT.unowned.regions` | 'rig' | finding | [] | [coincide.ts:145](../src/coincide.ts#L145) |
|
|
8028
|
+
| `SEAM_OVER_MOTION.pairs` | 'pair' | evidence | [p.a, p.b] | [check.ts:5165](../src/check.ts#L5165) |
|
|
8029
|
+
| `SEAM_OVER_MOTION.required.pairs` | 'pair' | finding when open > 0; otherwise evidence | [p.a, p.b] | [check.ts:4573](../src/check.ts#L4573) |
|
|
8030
|
+
| `SEAM_OVER_MOTION.roots.unmeasured` | 'part' | evidence | [root.part] | [check.ts:5142](../src/check.ts#L5142) |
|
|
8031
|
+
| `SEAM_OVER_MOTION.rows` | 'pair' | finding when p.status === 'read' && opens.length > 0; otherwise evidence; finding when r.status === 'read' && r.opens.length > 0; otherwise evidence | [want.a, want.b]; pairs.filter(p => p.pair === r.pair).flatMap(p => [p.a, p.b]) | [check.ts:5104](../src/check.ts#L5104), [check.ts:5168](../src/check.ts#L5168) |
|
|
8032
|
+
| `SEAM_OVER_MOTION.rows[].cells` | 'pair' | evidence | [want.a, want.b] | [check.ts:5117](../src/check.ts#L5117) |
|
|
8033
|
+
| `SEAM_OVER_MOTION.rows[].joint_contact.reasons` | 'pair' | evidence | [want.a, want.b] | [check.ts:5107](../src/check.ts#L5107) |
|
|
8034
|
+
| `SEAM_OVER_MOTION.rows[].pose_at_worst.joints` | 'rig' | evidence | [] | [motionseampose.ts:53](../src/motionseampose.ts#L53) |
|
|
8035
|
+
| `SEAM_OVER_MOTION.worlds.*.rows` | 'pair' | evidence | [want.a, want.b] | [check.ts:5101](../src/check.ts#L5101) |
|
|
8036
|
+
| `SEAM_OVER_RANGE.joints` | 'part' | evidence; finding when poses.some(p => p.status === 'FAIL'); otherwise evidence | [j.part] | [check.ts:4296](../src/check.ts#L4296), [check.ts:4342](../src/check.ts#L4342) |
|
|
8037
|
+
| `SEAM_OVER_RANGE.joints[].poses` | 'part' | finding when fail; otherwise evidence | [j.part] | [check.ts:4340](../src/check.ts#L4340) |
|
|
8038
|
+
| `SETUP_MATCHES_PAINTING.regions` | 'rig' | finding when status === 'FAIL'; otherwise evidence | [] | [setuppainting.ts:174](../src/setuppainting.ts#L174) |
|
|
8039
|
+
| `SETUP_MATCHES_PAINTING.regions[].slots` | slot === '(uncovered)' ? 'rig' : 'part' | evidence | slot === '(uncovered)' ? [] : [slot] | [setuppainting.ts:175](../src/setuppainting.ts#L175) |
|
|
8040
|
+
| `STILL_REGIONS_DARK.*.crossing` | 'part' | finding | [sl.name] | [check.ts:8704](../src/check.ts#L8704) |
|
|
8041
|
+
| `STILL_REGIONS_DARK.*.still_slots` | 'part' | evidence; finding when r.max > tolerance; otherwise evidence | [slot] | [check.ts:8690](../src/check.ts#L8690), [check.ts:8695](../src/check.ts#L8695) |
|
|
8042
|
+
| `STRESS_OFF_CHAIN.not_read` | 'part' | evidence | [r.part] | [check.ts:3900](../src/check.ts#L3900) |
|
|
8043
|
+
| `STRESS_OFF_CHAIN.per_part` | 'part' | finding when poses.some(p => typeof p.reading === 'number' && p.reading > STRESS_RIGID); otherwise evidence | [r.part] | [check.ts:3888](../src/check.ts#L3888) |
|
|
8044
|
+
| `STRESS_OFF_CHAIN.per_part[].off_chain` | 'part' | evidence | [r.part] | [check.ts:3888](../src/check.ts#L3888) |
|
|
8045
|
+
| `STRESS_OFF_CHAIN.per_part[].poses` | 'part' | evidence; finding when shown > STRESS_RIGID; otherwise evidence | [r.part] | [check.ts:3856](../src/check.ts#L3856), [check.ts:3874](../src/check.ts#L3874) |
|
|
8046
|
+
| `TEXTURE_STRETCH.per_mesh` | 'part' | evidence; finding when severity > TEXTURE_STRETCH_CEILING; otherwise evidence | [m.slot] | [check.ts:9338](../src/check.ts#L9338), [check.ts:9348](../src/check.ts#L9348) |
|
|
8047
|
+
| `TIP_OVER_ROOT.parts` | 'part' | evidence; finding when !ok && !(!rigid && hanging.onLink && Math.max(c.root, c.tip) < TIP_TRAVEL_FLOOR); otherwise evidence | [p.name] | [check.ts:8120](../src/check.ts#L8120), [check.ts:8125](../src/check.ts#L8125), [check.ts:8146](../src/check.ts#L8146), [check.ts:8157](../src/check.ts#L8157) |
|
|
8048
|
+
| `WIND_BAND.pairs` | 'pair' | finding when !holdsAll; otherwise evidence | [p.a, p.b] | [check.ts:6268](../src/check.ts#L6268) |
|
|
8049
|
+
| `WIND_BAND.pairs[].steps` | 'pair' | finding when !s.holds; otherwise evidence | [p.a, p.b] | [check.ts:6279](../src/check.ts#L6279) |
|
|
8050
|
+
| `figure_openings.openings` | 'pair' | finding | [ps.under, ps.above] | [check.ts:5585](../src/check.ts#L5585) |
|
|
8051
|
+
| `loop_physics` | 'rig' | evidence | [] | [check.ts:7243](../src/check.ts#L7243) |
|
|
8052
|
+
| `requirements.lines.* (bone)` | 'rig' | finding when line.status === 'FAIL'; otherwise evidence | [] | [check.ts:7539](../src/check.ts#L7539) |
|
|
8053
|
+
| `requirements.lines.* (seam)` | 'pair' | finding when line.status === 'FAIL'; otherwise evidence | [r.part, r.neighbour] | [check.ts:7539](../src/check.ts#L7539) |
|
|
8054
|
+
| `requirements.lines.* (stretch)` | 'part' | finding when line.status === 'FAIL'; otherwise evidence | [r.slot] | [check.ts:7539](../src/check.ts#L7539) |
|
|
8055
|
+
| `seam_pairs` | pair[0] === SEAM_NO_ART ? 'rig' : pair[1] === SEAM_NO_ART ? 'part' : 'pair' | evidence | pair.filter(p => p !== SEAM_NO_ART) | [check.ts:2442](../src/check.ts#L2442) |
|
|
8056
|
+
| `seam_scope.changes` | 'rig' | evidence | [] | [check.ts:1921](../src/check.ts#L1921) |
|
|
8057
|
+
| `seam_scope.domain.states` | 'rig' | evidence | [] | [check.ts:2006](../src/check.ts#L2006) |
|
|
8058
|
+
| `seam_scope.pairs` | row.parts[0] === SEAM_NO_ART ? 'rig' : row.parts[1] === SEAM_NO_ART ? 'part' : 'pair' | evidence | row.parts.filter(p => p !== SEAM_NO_ART) | [check.ts:7153](../src/check.ts#L7153) |
|
|
8059
|
+
| `seam_scope.population.pairs` | 'pair' | evidence | row.parts | [check.ts:2377](../src/check.ts#L2377) |
|
|
8060
|
+
| `seam_scope.population.single_art` | 'part' | evidence | [row.part] | [check.ts:2378](../src/check.ts#L2378) |
|
|
8061
|
+
<!-- check-row-table:end -->
|
package/docs/STABILITY.md
CHANGED
|
@@ -719,3 +719,11 @@ A see-through `--source` with an opaque explicit painting reference was accepted
|
|
|
719
719
|
when donor geometry followed the reference and is now refused with
|
|
720
720
|
`INPUTS_PAINTING_OPAQUE` before the donor is read. The reference remains a colour
|
|
721
721
|
binding. The donor continues to be bound to the opaque PNG accepted by `inputs`.
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
The check document's row objects additionally carry `row_scope` (`part`,
|
|
725
|
+
`pair`, `rig`), `row_kind` (`finding`, `evidence`), and `row_subjects` (one part,
|
|
726
|
+
two parts, or an empty list respectively). These are additive; legacy `scope`,
|
|
727
|
+
`kind`, measurements, statuses and exit decisions are unchanged. There is no
|
|
728
|
+
top-level check spec/version tag to bump. See [Consumer check rows](AUTHORING.md#consumer-check-rows-issue-1089)
|
|
729
|
+
for the producer-derived family table and the boundary between rows and summaries.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spine-parts",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.17.0",
|
|
4
4
|
"description": "AI-authored 2D character parts from one anime painting and its See-through layer decomposition: measured parts, weighted-mesh rig specs, verified through rig-c before anything is written. A CLI for agents that cannot see the image.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/artjoints.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { checkRow } from './checkrow.ts';
|
|
1
2
|
/** Explicit art-joint measurements on a fixed skeleton (issue #880). */
|
|
2
3
|
import { refuseIfAny, type Problem } from './errors.ts';
|
|
3
4
|
import { cropToSpineY } from './coords.ts';
|
|
@@ -82,7 +83,7 @@ export function artJointLine(
|
|
|
82
83
|
if (!Number.isFinite(distance)) refuseIfAny([{ code: 'CHECK_ART_JOINT_MEASURED', object: `joint "${j.name}" (bone "${j.bone}")`, detail: 'has no finite art-to-setup distance; finite stage-pixel coordinates are required' }]);
|
|
83
84
|
const status = limit === undefined ? 'SKIP' : distance > limit ? 'FAIL' : 'PASS';
|
|
84
85
|
if (status === 'FAIL') problems.push({ code: 'CHECK_ART_JOINT_DISTANCE', object: `joint "${j.name}" (bone "${j.bone}")`, detail: `art at [${j.at.join(', ')}] is ${distance} stage px from setup origin [${boneAt.join(', ')}]; distance <= declared fixed_skeleton.within_px ${limit} px is required — correct the art measurement/correspondence if wrong, or supply art aligned to the fixed skeleton; bones are not moved` });
|
|
85
|
-
return { name: j.name, bone: j.bone, at: [...j.at] as [number, number], bone_at: boneAt, distance_px: distance, status };
|
|
86
|
+
return { ...checkRow('ART_JOINT_DISTANCE.joints', 'rig', status === 'FAIL', []), name: j.name, bone: j.bone, at: [...j.at] as [number, number], bone_at: boneAt, distance_px: distance, status };
|
|
86
87
|
});
|
|
87
88
|
return { status: limit === undefined ? 'SKIP' : joints.some(j => j.status === 'FAIL') ? 'FAIL' : 'PASS', instrument: 'rigc-geometry/1 setup.bones', source: fixed.source, within_px: limit ?? null, joints,
|
|
88
89
|
...(limit === undefined ? { reason: 'fixed_skeleton.within_px is absent; distances are measured, no limit is invented and no joint passes' } : {}) };
|
package/src/boundarycolour.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { checkRow } from './checkrow.ts';
|
|
1
2
|
/**
|
|
2
3
|
* Issue #942: the colour step across part boundaries, against the rig's own pieces.
|
|
3
4
|
*
|
|
@@ -215,8 +216,8 @@ export function measureBoundaryColour(api: Api, input: BoundaryColourInput, decl
|
|
|
215
216
|
frames: 1 + idle.length,
|
|
216
217
|
boundary_pairs: boundaryPairs,
|
|
217
218
|
worst,
|
|
218
|
-
over,
|
|
219
|
-
unmeasured,
|
|
219
|
+
over: over.map(r => ({ ...r, ...checkRow('BOUNDARY_COLOUR_STEP.over', 'pair', true, r.parts) })),
|
|
220
|
+
unmeasured: unmeasured.map(r => ({ ...r, ...checkRow('BOUNDARY_COLOUR_STEP.unmeasured', 'part', false, [r.slot]) })),
|
|
220
221
|
alternates: 'not measured',
|
|
221
222
|
};
|
|
222
223
|
}
|
package/src/build.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { withoutCheckRows } from './checkrow.ts';
|
|
1
2
|
import { readSetupFigureMask } from './setupfiguremask.ts';
|
|
2
3
|
import { EDGE_RESIDUAL_FILE, edgeResidualLines } from './edgeresidual.ts';
|
|
3
4
|
import { SUPPORT_DOMAINS_FILE, writeSupportDomains } from './supportdomains.ts';
|
|
@@ -1756,7 +1757,7 @@ export function packLines(r: CheckReport): string[] {
|
|
|
1756
1757
|
|
|
1757
1758
|
function showFigure(v: unknown): string {
|
|
1758
1759
|
if (Array.isArray(v)) return v.length === 0 ? 'none' : v.map(showFigure).join(' | ');
|
|
1759
|
-
if (typeof v === 'object' && v !== null) return Object.entries(v).map(([k, x]) => `${k} ${showFigure(x)}`).join(', ');
|
|
1760
|
+
if (typeof v === 'object' && v !== null) return Object.entries(v).filter(([key]) => !['row_scope', 'row_kind', 'row_subjects'].includes(key)).map(([k, x]) => `${k} ${showFigure(x)}`).join(', ');
|
|
1760
1761
|
return String(v);
|
|
1761
1762
|
}
|
|
1762
1763
|
|
|
@@ -1950,7 +1951,7 @@ export function clothLines(line: ClothLine, plant: { silent?: boolean } = {}): s
|
|
|
1950
1951
|
|
|
1951
1952
|
/** A requirement's line as the console prints it: its name and status, the reason first when NOT MEASURABLE, then its figures as check.json holds them. */
|
|
1952
1953
|
export function requirementText(name: string, line: RequirementLine): string {
|
|
1953
|
-
const rest = Object.entries(line).filter(([k]) => k !== 'status' && k !== 'reason');
|
|
1954
|
+
const rest = Object.entries(withoutCheckRows(line) as Record<string, unknown>).filter(([k]) => k !== 'status' && k !== 'reason');
|
|
1954
1955
|
return `${name}: ${line.status} — ${[...(line.status === 'NOT MEASURABLE' ? [String(line.reason)] : []), ...rest.map(([k, v]) => `${k} ${showFigure(v)}`)].join('; ')}`;
|
|
1955
1956
|
}
|
|
1956
1957
|
|
|
@@ -1995,7 +1996,7 @@ export function checkStage(input: CheckStageInput, rigc: RigcRunner, bin: string
|
|
|
1995
1996
|
);
|
|
1996
1997
|
if (setFig.seam_scope !== undefined) {
|
|
1997
1998
|
const scope = setFig.seam_scope;
|
|
1998
|
-
log(` seam scope (${setName}): ${scope.mode}, denominator ${scope.denominator_px} base source cells; union ${scope.domain?.viewport.pixelWidth}x${scope.domain?.viewport.pixelHeight}, numerator ${scope.domain?.numerator}; whole canonical ${scope.whole.px_over_40} px over ${SEAM_PX_LEVEL}, mean ${scope.whole.mean}; auto-frame raw ${scope.auto_frame_raw.px_over_40} at scale ${scope.auto_frame_raw.frame_scale} (diagnostic only); effects ${JSON.stringify(scope.effects)}, changes ${JSON.stringify(scope.changes)}${scope.unavailable === undefined ? '' : `; ${JSON.stringify(scope.unavailable)}`}`);
|
|
1999
|
+
log(` seam scope (${setName}): ${scope.mode}, denominator ${scope.denominator_px} base source cells; union ${scope.domain?.viewport.pixelWidth}x${scope.domain?.viewport.pixelHeight}, numerator ${scope.domain?.numerator}; whole canonical ${scope.whole.px_over_40} px over ${SEAM_PX_LEVEL}, mean ${scope.whole.mean}; auto-frame raw ${scope.auto_frame_raw.px_over_40} at scale ${scope.auto_frame_raw.frame_scale} (diagnostic only); effects ${JSON.stringify(scope.effects)}, changes ${JSON.stringify(withoutCheckRows(scope.changes))}${scope.unavailable === undefined ? '' : `; ${JSON.stringify(scope.unavailable)}`}`);
|
|
1999
2000
|
for (const pair of scope.pairs ?? []) log(` seam inheritance (${setName}): ${JSON.stringify(pair.parts)}, whole ${pair.whole_px_over_40}, affected ${pair.affected_px_over_40}, inherited from base ${pair.inherited_px_over_40} px over ${SEAM_PX_LEVEL}`);
|
|
2000
2001
|
}
|
|
2001
2002
|
const setPairs = setFig.seam_pairs ?? [];
|
package/src/check.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { checkRow } from './checkrow.ts';
|
|
1
2
|
import { readSetupFigureMask } from './setupfiguremask.ts';
|
|
2
3
|
import { readSetupBackdrop } from './setupbackdrop.ts';
|
|
3
4
|
import { COINCIDE_LINE, type SupportReport } from './coincide.ts';
|
|
@@ -1917,7 +1918,7 @@ export function seamEffectSelection(base: SeamSupport, selected: SeamSupport): S
|
|
|
1917
1918
|
const b = before.find(d => d.scope === scope && d.name === name), a = after.find(d => d.scope === scope && d.name === name);
|
|
1918
1919
|
const fields = b === undefined ? ['added'] : a === undefined ? ['hidden/removed'] :
|
|
1919
1920
|
(['identity', 'order', 'geometry', 'art'] as const).filter(k => b[k] !== a[k]);
|
|
1920
|
-
if (fields.length > 0) changes.push({ scope, drawing: name, reasons: fields });
|
|
1921
|
+
if (fields.length > 0) changes.push({ ...checkRow('seam_scope.changes', 'rig', false, []), scope, drawing: name, reasons: fields });
|
|
1921
1922
|
}
|
|
1922
1923
|
}
|
|
1923
1924
|
return { mask, cellReasons, reasons, changes };
|
|
@@ -2002,7 +2003,7 @@ export function seamStateBounds(build: string, state: string): SeamStateBounds {
|
|
|
2002
2003
|
}
|
|
2003
2004
|
}
|
|
2004
2005
|
}
|
|
2005
|
-
return { state, frames: frames.length, pieces, bounds,
|
|
2006
|
+
return { ...checkRow('seam_scope.domain.states', 'rig', false, []), state, frames: frames.length, pieces, bounds,
|
|
2006
2007
|
pose_sha256: digest.digest('hex') };
|
|
2007
2008
|
} catch {
|
|
2008
2009
|
refuseIfAny([{ code: 'CHECK_SEAM_DOMAIN', object: 'setup seam union state ' + JSON.stringify(state), detail: 'official selected candidate/still drawn-piece bounds are unavailable; no guessed or empty bounds are substituted' }]);
|
|
@@ -2373,8 +2374,8 @@ export function createSeamPopulation(parts: readonly PlacedAlpha[], rigSize: rea
|
|
|
2373
2374
|
const rows = [...pairs.entries()].sort(([a], [b]) => a - b)
|
|
2374
2375
|
.flatMap(([, lower]) => [...lower.entries()].sort(([a], [b]) => a - b).map(([, row]) => ({ ...row })));
|
|
2375
2376
|
return { basis: 'reference-alpha/top-two-of-2x2', measured_sample_px: measured,
|
|
2376
|
-
pair_count: rows.length, pairs: rows,
|
|
2377
|
-
single_art: [...singles.entries()].sort(([a], [b]) => a - b).map(([, row]) => ({ ...row })),
|
|
2377
|
+
pair_count: rows.length, pairs: rows.map(row => ({ ...row, ...checkRow('seam_scope.population.pairs', 'pair', false, row.parts) })),
|
|
2378
|
+
single_art: [...singles.entries()].sort(([a], [b]) => a - b).map(([, row]) => ({ ...row, ...checkRow('seam_scope.population.single_art', 'part', false, [row.part]) })),
|
|
2378
2379
|
no_reference_art: { ...noArt } };
|
|
2379
2380
|
},
|
|
2380
2381
|
rows: (seam: SeamFigures) => seamPairRowsFrom(seam, parts, rigSize, vp, at),
|
|
@@ -2438,7 +2439,7 @@ function seamPairRowsFrom(seam: SeamFigures, parts: readonly PlacedAlpha[], rigS
|
|
|
2438
2439
|
const pair: [string, string] = acc.a < 0 ? [name(acc.b), SEAM_NO_ART] : [name(acc.a), name(acc.b)];
|
|
2439
2440
|
const file = `${String(i + 1).padStart(Math.max(2, width), '0')}_${pair.map((n) => (n === SEAM_NO_ART ? 'no-art' : n)).join('_')}.png`;
|
|
2440
2441
|
const cut = acc.a >= 0 && parts[acc.a].from === parts[acc.b].from ? { cut: { from: parts[acc.a].from, differing_copies_px: acc.differing } } : {};
|
|
2441
|
-
return { row: { parts: pair, px_over_40: acc.over40,
|
|
2442
|
+
return { row: { ...checkRow('seam_pairs', pair[0] === SEAM_NO_ART ? 'rig' : pair[1] === SEAM_NO_ART ? 'part' : 'pair', false, pair.filter(p => p !== SEAM_NO_ART)), parts: pair, px_over_40: acc.over40,
|
|
2442
2443
|
...(acc.outside > 0 ? { outside_authored_px: acc.outside } : {}), px_over_80: acc.over80, frame_box: acc.f, rig_box: acc.r, ...cut, picture: `${SEAM_DIR}/${file}` }, pixels: acc.pixels };
|
|
2443
2444
|
});
|
|
2444
2445
|
}
|
|
@@ -3437,6 +3438,7 @@ export function foldsLine(
|
|
|
3437
3438
|
const onlyPhysicsOn = on !== undefined && off === undefined;
|
|
3438
3439
|
const constraints = onlyPhysicsOn ? meshPhysicsConstraints(rig, slot, attachment, physicsList) : [];
|
|
3439
3440
|
const row: FoldRow = {
|
|
3441
|
+
...checkRow('ANIMATIONS_DO_NOT_FOLD.folding', 'part', entry === undefined, [slot]),
|
|
3440
3442
|
animation: name,
|
|
3441
3443
|
slot,
|
|
3442
3444
|
attachment,
|
|
@@ -3474,7 +3476,7 @@ export function foldsLine(
|
|
|
3474
3476
|
detail: `rigc render --folds at ${fps} fps${physics}${sideClause}: ${r.line}; ${foldBonesText(rig, motion, r.slot, r.attachment, r.worst_frame, worstOf.get(r) ?? [], context)}; no triangle turned over against the setup pose is required — a fold the art means is declared in the --requirements file's may_fold, { "slot": "${r.slot}", "animation": "${r.animation}", "why": … }`,
|
|
3475
3477
|
});
|
|
3476
3478
|
}
|
|
3477
|
-
const declaredNotFolding = mayFold.filter((e) => !folding.some((r) => r.slot === e.slot && r.animation === e.animation)).map((e) => ({ slot: e.slot, animation: e.animation }));
|
|
3479
|
+
const declaredNotFolding = mayFold.filter((e) => !folding.some((r) => r.slot === e.slot && r.animation === e.animation)).map((e) => ({ ...checkRow('ANIMATIONS_DO_NOT_FOLD.declared_not_folding', 'part', true, [e.slot]), slot: e.slot, animation: e.animation }));
|
|
3478
3480
|
for (const e of declaredNotFolding) {
|
|
3479
3481
|
problems.push({
|
|
3480
3482
|
code: `CHECK_${FOLD_LINE}`,
|
|
@@ -3650,7 +3652,7 @@ export function levelLine(feet: readonly LevelFoot[], rig: Record<string, unknow
|
|
|
3650
3652
|
if (row.worst !== null && Math.abs(degrees) <= Math.abs(row.worst.degrees)) return;
|
|
3651
3653
|
const t = track(turned);
|
|
3652
3654
|
const through: Array<{ bone: string; inherit: string }> = [];
|
|
3653
|
-
for (let b: string | null = row.bone; b !== null && b !== turned; b = parentOf(b)) through.push({ bone: b, inherit: inheritOf(b) });
|
|
3655
|
+
for (let b: string | null = row.bone; b !== null && b !== turned; b = parentOf(b)) through.push({ ...checkRow('FEET_STAY_LEVEL.feet[].worst.through', 'rig', false, []), bone: b, inherit: inheritOf(b) });
|
|
3654
3656
|
row.worst = { animation: r.animation, frame: r.set.frames[i].index, time: t.times[i], degrees, turned, turned_degrees: round6(boneTurn(t.setup, t.frames[i])), through };
|
|
3655
3657
|
});
|
|
3656
3658
|
}
|
|
@@ -3675,7 +3677,7 @@ export function levelLine(feet: readonly LevelFoot[], rig: Record<string, unknow
|
|
|
3675
3677
|
}
|
|
3676
3678
|
const status: LevelLine['status'] = rows.some((r) => r.status === 'FAIL') ? 'FAIL' : rows.some((r) => r.status === 'PASS') ? 'PASS' : 'SKIP';
|
|
3677
3679
|
const names = readings.map((r) => r.animation);
|
|
3678
|
-
const line: LevelLine = { status, animations: names, fps, physics_left_out: physicsLeftOut, bar_degrees: LEVEL_BAR_DEGREES, bar: LEVEL_BAR_SOURCE, feet: rows };
|
|
3680
|
+
const line: LevelLine = { status, animations: names, fps, physics_left_out: physicsLeftOut, bar_degrees: LEVEL_BAR_DEGREES, bar: LEVEL_BAR_SOURCE, feet: rows.map(row => ({ ...row, ...checkRow('FEET_STAY_LEVEL.feet', 'part', row.status === 'FAIL', [row.part]) })) };
|
|
3679
3681
|
if (status === 'SKIP') {
|
|
3680
3682
|
line.reason = `no frame of ${names.map((n) => `"${n}"`).join(', ')} turns a bone above ${rows.map((r) => `"${r.bone}" (which "${r.part}" rides)`).join(', ')}, so no foot was seen while its leg was posed`;
|
|
3681
3683
|
}
|
|
@@ -3851,7 +3853,7 @@ export function stressLine(plan: StressPlan, geometry: (animation: string) => Id
|
|
|
3851
3853
|
);
|
|
3852
3854
|
const seen = m.filter((x) => x.max !== null && x.min !== null);
|
|
3853
3855
|
if (seen.length === 0) {
|
|
3854
|
-
poses.push({ turn, unmeasured: `the "${name}" render shows no mesh on slot "${r.part}"` });
|
|
3856
|
+
poses.push({ ...checkRow('STRESS_OFF_CHAIN.per_part[].poses', 'part', false, [r.part]), turn, unmeasured: `the "${name}" render shows no mesh on slot "${r.part}"` });
|
|
3855
3857
|
failed = true;
|
|
3856
3858
|
problems.push({ code: `CHECK_${STRESS_LINE}`, object: `mesh "${r.part}" with "${r.chain[0]}" turned ${turn}°`, detail: `the "${name}" render shows no mesh on slot "${r.part}", so its stretch was not read; a part not read is not a pass` });
|
|
3857
3859
|
continue;
|
|
@@ -3869,7 +3871,7 @@ export function stressLine(plan: StressPlan, geometry: (animation: string) => Id
|
|
|
3869
3871
|
}
|
|
3870
3872
|
const shown = roundStress(reading);
|
|
3871
3873
|
const a = at as StretchAt;
|
|
3872
|
-
poses.push({ turn, reading: shown, worst: { triangle: a.triangle, edge: a.edge, ratio: round3(a.ratio) } });
|
|
3874
|
+
poses.push({ ...checkRow('STRESS_OFF_CHAIN.per_part[].poses', 'part', shown > STRESS_RIGID, [r.part]), turn, reading: shown, worst: { triangle: a.triangle, edge: a.edge, ratio: round3(a.ratio) } });
|
|
3873
3875
|
if (worst === null || reading > worst.reading) worst = { part: r.part, link: r.chain[0], turn, reading };
|
|
3874
3876
|
if (shown > STRESS_RIGID) {
|
|
3875
3877
|
failed = true;
|
|
@@ -3883,7 +3885,7 @@ export function stressLine(plan: StressPlan, geometry: (animation: string) => Id
|
|
|
3883
3885
|
});
|
|
3884
3886
|
}
|
|
3885
3887
|
}
|
|
3886
|
-
rows.push({ part: r.part, link: r.chain[0], links: r.chain.length, off_chain: r.off_chain.map((o) => ({ ...o, largest_weight: round3(o.largest_weight) })), poses });
|
|
3888
|
+
rows.push({ ...checkRow('STRESS_OFF_CHAIN.per_part', 'part', poses.some(p => typeof p.reading === 'number' && p.reading > STRESS_RIGID), [r.part]), part: r.part, link: r.chain[0], links: r.chain.length, off_chain: r.off_chain.map((o) => ({ ...o, ...checkRow('STRESS_OFF_CHAIN.per_part[].off_chain', 'part', false, [r.part]), largest_weight: round3(o.largest_weight) })), poses });
|
|
3887
3889
|
}
|
|
3888
3890
|
const w = worst as { part: string; link: string; turn: number; reading: number } | null;
|
|
3889
3891
|
return {
|
|
@@ -3895,7 +3897,7 @@ export function stressLine(plan: StressPlan, geometry: (animation: string) => Id
|
|
|
3895
3897
|
worst: w === null ? null : { part: w.part, link: w.link, turn: w.turn },
|
|
3896
3898
|
bar: STRESS_RIGID,
|
|
3897
3899
|
per_part: rows,
|
|
3898
|
-
not_read: plan.notRead,
|
|
3900
|
+
not_read: plan.notRead.map(r => ({ ...r, ...checkRow('STRESS_OFF_CHAIN.not_read', 'part', false, [r.part]) })),
|
|
3899
3901
|
};
|
|
3900
3902
|
}
|
|
3901
3903
|
|
|
@@ -3967,7 +3969,7 @@ export function limbLine(parts: PartsFile, rig: Record<string, unknown>, problem
|
|
|
3967
3969
|
: `is weighted to ${others.map((b) => `"${b}"`).join(', ')} besides "${l.bone}"; a limb part rides its one bone with weight 1 — a bend is a rotation at the joint, never a deformed mesh — so a region on "${l.bone}" (config.regions.${p.name}), or a mesh whose segments name "${l.bone}" alone, is required`,
|
|
3968
3970
|
});
|
|
3969
3971
|
}
|
|
3970
|
-
return { part: p.name, limb: l.name, bone: l.bone, status: fail ? 'FAIL' : 'PASS', others, ...(regionBones.length === 0 ? {} : { region_bones: regionBones }) };
|
|
3972
|
+
return { ...checkRow('LIMB_ONE_BONE.parts', 'part', fail, [p.name]), part: p.name, limb: l.name, bone: l.bone, status: fail ? 'FAIL' : 'PASS', others, ...(regionBones.length === 0 ? {} : { region_bones: regionBones }) };
|
|
3971
3973
|
});
|
|
3972
3974
|
return { status: rows.some((r) => r.status === 'FAIL') ? 'FAIL' : 'PASS', parts: rows };
|
|
3973
3975
|
}
|
|
@@ -4291,7 +4293,7 @@ export function sweepLine(
|
|
|
4291
4293
|
const why = unread[i];
|
|
4292
4294
|
if (why !== null) {
|
|
4293
4295
|
problems.push({ code: `CHECK_${SWEEP_LINE}`, object: object(`over its range [${j.range.join(', ')}]`), detail: `is not read: ${why}; a joint not read is not a pass` });
|
|
4294
|
-
return { ...head, status: 'FAIL', poses: [], unread: why };
|
|
4296
|
+
return { ...head, ...checkRow('SEAM_OVER_RANGE.joints', 'part', false, [j.part]), status: 'FAIL', poses: [], unread: why };
|
|
4295
4297
|
}
|
|
4296
4298
|
const poses: SweepPose[] = sweepAngles(j.range).map((a) => {
|
|
4297
4299
|
const { under, bare } = frames(sweepAnimationName(j.part, a));
|
|
@@ -4335,9 +4337,9 @@ export function sweepLine(
|
|
|
4335
4337
|
// Issue #557: the contour step on the bent frame — a reading, recorded only where the cap is short.
|
|
4336
4338
|
const st = step(j, bare);
|
|
4337
4339
|
if (st !== null) printed.set(`${j.part} ${a}`, st);
|
|
4338
|
-
return { degrees: a, status: fail ? 'FAIL' : 'PASS', mean, px_over_40: f.over40, px_over_80: f.over80, rig_px_over_40: Number(seamRigPxText(f.over40, scale)), ...(st === null || j.short === undefined ? {} : { step_px: st }) };
|
|
4340
|
+
return { ...checkRow('SEAM_OVER_RANGE.joints[].poses', 'part', fail, [j.part]), degrees: a, status: fail ? 'FAIL' : 'PASS', mean, px_over_40: f.over40, px_over_80: f.over80, rig_px_over_40: Number(seamRigPxText(f.over40, scale)), ...(st === null || j.short === undefined ? {} : { step_px: st }) };
|
|
4339
4341
|
});
|
|
4340
|
-
return { ...head, status: poses.some((p) => p.status === 'FAIL') ? 'FAIL' : 'PASS', poses };
|
|
4342
|
+
return { ...head, ...checkRow('SEAM_OVER_RANGE.joints', 'part', poses.some(p => p.status === 'FAIL'), [j.part]), status: poses.some((p) => p.status === 'FAIL') ? 'FAIL' : 'PASS', poses };
|
|
4341
4343
|
});
|
|
4342
4344
|
const g = seen.grid;
|
|
4343
4345
|
return {
|
|
@@ -4568,7 +4570,7 @@ export function motionSeamRequired(line: MotionSeamLine, rows: readonly MotionBa
|
|
|
4568
4570
|
refuse(`${label} in "${animation}" at frame ${worst.index} (t = ${worst.time}s)`,
|
|
4569
4571
|
`background on ${r.hits.length} of ${r.frames} frame(s) read ${frameRuns(r.hits.map((h) => h.index))}: found ${worst.px} px (rigc gapOpen cells of ${worst.cell} world units, world box [${worst.box.join(', ')}]) on the worst frame, 0 required; ${why}`);
|
|
4570
4572
|
}
|
|
4571
|
-
out.push({ pair: p.pair, class: cls, frames, background_frames: open, max_px: max });
|
|
4573
|
+
out.push({ ...checkRow('SEAM_OVER_MOTION.required.pairs', 'pair', open > 0, [p.a, p.b]), pair: p.pair, class: cls, frames, background_frames: open, max_px: max });
|
|
4572
4574
|
}
|
|
4573
4575
|
const failed = problems.length - before;
|
|
4574
4576
|
return { status: failed === 0 ? 'PASS' : 'FAIL', mode: 'gap-open', bar_px: 0, pairs: out, failed };
|
|
@@ -5096,12 +5098,13 @@ function readSeamRows(dir: string, animations: readonly string[], fps: number, p
|
|
|
5096
5098
|
}
|
|
5097
5099
|
const contact = setup ? undefined : jointContactReading(p.jointContact, want.joints ?? [], set.written ?? set.sampled, at, problems);
|
|
5098
5100
|
if (contact === null) return;
|
|
5099
|
-
worldRows?.push({ pair: want.pair, animation, status: p.status, drawn: p.drawn, banded: p.banded, gap: kinds.gap, ghost: kinds.ghost });
|
|
5101
|
+
worldRows?.push({ ...checkRow('SEAM_OVER_MOTION.worlds.*.rows', 'pair', false, [want.a, want.b]), pair: want.pair, animation, status: p.status, drawn: p.drawn, banded: p.banded, gap: kinds.gap, ghost: kinds.ghost });
|
|
5100
5102
|
const opens = [...over.keys()].sort((x, y) => x - y);
|
|
5101
5103
|
rows.push({
|
|
5104
|
+
...checkRow('SEAM_OVER_MOTION.rows', 'pair', p.status === 'read' && opens.length > 0, [want.a, want.b]),
|
|
5102
5105
|
pair: want.pair,
|
|
5103
5106
|
animation,
|
|
5104
|
-
...(setup ? {} : { joint_contact: contact }),
|
|
5107
|
+
...(setup ? {} : { joint_contact: contact === undefined ? undefined : { ...contact, reasons: contact.reasons.map(r => ({ ...r, ...checkRow('SEAM_OVER_MOTION.rows[].joint_contact.reasons', 'pair', false, [want.a, want.b]) })) } }),
|
|
5105
5108
|
status: p.status,
|
|
5106
5109
|
drawn: p.drawn,
|
|
5107
5110
|
banded: p.banded,
|
|
@@ -5111,7 +5114,7 @@ function readSeamRows(dir: string, animations: readonly string[], fps: number, p
|
|
|
5111
5114
|
under_floor: (want.root === undefined ? p.opens : [...rootFrames].filter(f => cells.some(c => c.index === f && c.counted > 0))).filter((f) => !over.has(f)),
|
|
5112
5115
|
...(rootWorst === undefined ? {} : { worst: rootWorst }),
|
|
5113
5116
|
...(warnWorst === undefined || setup ? {} : { worst: warnWorst }),
|
|
5114
|
-
...(want.root === undefined ? {} : { cells }),
|
|
5117
|
+
...(want.root === undefined ? {} : { cells: cells.map(r => ({ ...r, ...checkRow('SEAM_OVER_MOTION.rows[].cells', 'pair', false, [want.a, want.b]) })) }),
|
|
5115
5118
|
});
|
|
5116
5119
|
});
|
|
5117
5120
|
}
|
|
@@ -5136,7 +5139,7 @@ export function motionSeamLine(pairs: MotionSeamPair[], animations: string[], fp
|
|
|
5136
5139
|
const row = rows.find(r => r.pair === p.pair && r.animation === a);
|
|
5137
5140
|
return row?.status === 'read' && row.banded > 0 ? [] : ['"' + p.pair + '" in "' + a + '": ' + (p.unread ?? (row === undefined ? 'no returned reading' : 'no band on any frame'))];
|
|
5138
5141
|
}));
|
|
5139
|
-
const unmeasured = unmeasuredRoots.map(root => ({ ...root, candidates: [...root.candidates] }));
|
|
5142
|
+
const unmeasured = unmeasuredRoots.map(root => ({ ...root, ...checkRow('SEAM_OVER_MOTION.roots.unmeasured', 'part', false, [root.part]), candidates: [...root.candidates] }));
|
|
5140
5143
|
const rootReasons = [...missing, ...unmeasured.map(root => 'root pair for ' + root.limb + ': ' + root.reason)];
|
|
5141
5144
|
const rootGate: MotionSeamLine['roots'] = roots.length === 0 && unmeasured.length === 0 ? undefined : {
|
|
5142
5145
|
status: failed.length > 0 ? 'FAIL' : rootReasons.length > 0 || reason !== undefined ? 'SKIP' : 'PASS',
|
|
@@ -5159,10 +5162,10 @@ export function motionSeamLine(pairs: MotionSeamPair[], animations: string[], fp
|
|
|
5159
5162
|
...(skipWhy === undefined ? {} : { reason: skipWhy }),
|
|
5160
5163
|
fps,
|
|
5161
5164
|
floor: MOTION_SEAM_FLOOR,
|
|
5162
|
-
pairs,
|
|
5165
|
+
pairs: pairs.map(p => ({ ...p, ...checkRow('SEAM_OVER_MOTION.pairs', 'pair', false, [p.a, p.b]) })),
|
|
5163
5166
|
animations,
|
|
5164
5167
|
warnings,
|
|
5165
|
-
rows,
|
|
5168
|
+
rows: rows.map(r => ({ ...r, ...checkRow('SEAM_OVER_MOTION.rows', 'pair', r.status === 'read' && r.opens.length > 0, pairs.filter(p => p.pair === r.pair).flatMap(p => [p.a, p.b])) })),
|
|
5166
5169
|
...(rootGate === undefined ? {} : { roots: rootGate }),
|
|
5167
5170
|
};
|
|
5168
5171
|
}
|
|
@@ -5579,6 +5582,7 @@ export function readFigurePairOpenings(
|
|
|
5579
5582
|
for (const ps of pairSetups) {
|
|
5580
5583
|
if (ps.opens.length > 0) {
|
|
5581
5584
|
openings.push({
|
|
5585
|
+
...checkRow('figure_openings.openings', 'pair', true, [ps.under, ps.above]),
|
|
5582
5586
|
pair: ps.pair,
|
|
5583
5587
|
under: ps.under,
|
|
5584
5588
|
above: ps.above,
|
|
@@ -5757,6 +5761,7 @@ export function clothRow(chain: { tip: string; root: string; links: number; leng
|
|
|
5757
5761
|
let s = speeds.length;
|
|
5758
5762
|
while (s > 0 && speeds[s - 1] < floor) s--;
|
|
5759
5763
|
return {
|
|
5764
|
+
...checkRow('CLOTH_SETTLES.rows', 'rig', speeds.length > 0 && s < speeds.length, []),
|
|
5760
5765
|
tip: chain.tip,
|
|
5761
5766
|
root: chain.root,
|
|
5762
5767
|
links: chain.links,
|
|
@@ -6260,6 +6265,7 @@ export function measureWindBand(
|
|
|
6260
6265
|
const worstGhost = perStep.reduce((best, s) => (s.ghostPx > best.ghostPx ? s : best), perStep[0]);
|
|
6261
6266
|
|
|
6262
6267
|
return {
|
|
6268
|
+
...checkRow('WIND_BAND.pairs', 'pair', !holdsAll, [p.a, p.b]),
|
|
6263
6269
|
pair: p.pair,
|
|
6264
6270
|
a: p.a,
|
|
6265
6271
|
b: p.b,
|
|
@@ -6270,7 +6276,7 @@ export function measureWindBand(
|
|
|
6270
6276
|
first_break_above: span === null ? breakAt(0) : span.end < wb.steps.length - 1 ? breakAt(span.end + 1) : null,
|
|
6271
6277
|
worst_gap: { x: worstGap.x, px: worstGap.gapPx, animation: worstGap.gapAnim, frame: worstGap.gapFrame },
|
|
6272
6278
|
worst_ghost: { x: worstGhost.x, px: worstGhost.ghostPx, animation: worstGhost.ghostAnim, frame: worstGhost.ghostFrame },
|
|
6273
|
-
steps: perStep.map((s) => ({ x: s.x, holds: s.holds, gap_max_px: s.gapPx, ghost_max_px: s.ghostPx })),
|
|
6279
|
+
steps: perStep.map((s) => ({ ...checkRow('WIND_BAND.pairs[].steps', 'pair', !s.holds, [p.a, p.b]), x: s.x, holds: s.holds, gap_max_px: s.gapPx, ghost_max_px: s.ghostPx })),
|
|
6274
6280
|
};
|
|
6275
6281
|
});
|
|
6276
6282
|
|
|
@@ -7144,7 +7150,7 @@ export function runCheck(rigDir: string, outDir: string, rigc: RigcRunner, parts
|
|
|
7144
7150
|
const affected = pixels.filter(q => effects.mask[q] !== 0).length;
|
|
7145
7151
|
const reasons: Partial<SeamEffects['reasons']> = {};
|
|
7146
7152
|
for (const q of pixels) { const reason = SEAM_EFFECT_REASONS[effects.cellReasons[q]]; reasons[reason] = (reasons[reason] ?? 0) + 1; }
|
|
7147
|
-
return { parts: row.parts, whole_px_over_40: row.px_over_40, affected_px_over_40: affected, inherited_px_over_40: row.px_over_40 - affected, reasons };
|
|
7153
|
+
return { ...checkRow('seam_scope.pairs', row.parts[0] === SEAM_NO_ART ? 'rig' : row.parts[1] === SEAM_NO_ART ? 'part' : 'pair', false, row.parts.filter(p => p !== SEAM_NO_ART)), parts: row.parts, whole_px_over_40: row.px_over_40, affected_px_over_40: affected, inherited_px_over_40: row.px_over_40 - affected, reasons };
|
|
7148
7154
|
}),
|
|
7149
7155
|
};
|
|
7150
7156
|
const altMean = round3(altSeam.mean);
|
|
@@ -7234,7 +7240,7 @@ export function runCheck(rigDir: string, outDir: string, rigc: RigcRunner, parts
|
|
|
7234
7240
|
pack_mode: { page_edges: mode.pageEdges, pack_shape: mode.packShape },
|
|
7235
7241
|
...(env === null ? {} : { environment: env }),
|
|
7236
7242
|
loop_max_diff: loop === null ? null : loop.max,
|
|
7237
|
-
...(loopPhysics === null ? {} : { loop_physics: loopPhysics }),
|
|
7243
|
+
...(loopPhysics === null ? {} : { loop_physics: loopPhysics.map(row => ({ ...row, ...checkRow('loop_physics', 'rig', false, []) })) }),
|
|
7238
7244
|
seam_mean: seam === null ? null : round3(seam.mean),
|
|
7239
7245
|
seam_px_over_40: seam === null ? null : seam.over40,
|
|
7240
7246
|
seam_px_over_80: seam === null ? null : seam.over80,
|
|
@@ -7530,7 +7536,7 @@ export function measureRequirements(inp: CheckInputs, file: RequirementsFile, bu
|
|
|
7530
7536
|
}
|
|
7531
7537
|
line = { ...followLine(r, d.poses, released.poses, full.poses), released_copy: door ?? 'built as forced: rig-c\'s gate passed it with no further declaration' };
|
|
7532
7538
|
}
|
|
7533
|
-
lines[r.name] = line;
|
|
7539
|
+
lines[r.name] = { ...line, ...(r.kind === 'seam' ? checkRow('requirements.lines.* (seam)', 'pair', line.status === 'FAIL', [r.part, r.neighbour]) : r.kind === 'stretch' ? checkRow('requirements.lines.* (stretch)', 'part', line.status === 'FAIL', [r.slot]) : checkRow('requirements.lines.* (bone)', 'rig', line.status === 'FAIL', [])) };
|
|
7534
7540
|
const p = requirementProblem(r, line);
|
|
7535
7541
|
if (p !== null) problems.push(p);
|
|
7536
7542
|
}
|
|
@@ -8111,12 +8117,12 @@ function tipLine(inp: FullInputs, geometryPath: string, frames: number, problems
|
|
|
8111
8117
|
let failed = false;
|
|
8112
8118
|
for (const p of swing) {
|
|
8113
8119
|
if (excepted.not_swinging.includes(p.name)) {
|
|
8114
|
-
rows.push({ part: p.name, unmeasured: "declared not swinging by the scene file's not_swinging, so it is not held to the bar" });
|
|
8120
|
+
rows.push({ ...checkRow('TIP_OVER_ROOT.parts', 'part', false, [p.name]), part: p.name, unmeasured: "declared not swinging by the scene file's not_swinging, so it is not held to the bar" });
|
|
8115
8121
|
continue;
|
|
8116
8122
|
}
|
|
8117
8123
|
// Issue #349: a limb segment is rigid on its one bone and turns at its joint; it does not hang, so no tip trails a root.
|
|
8118
8124
|
if (p.limb !== undefined) {
|
|
8119
|
-
rows.push({ part: p.name, unmeasured: p.limb.band !== undefined ? `a hybrid joint band (config.limbs.${p.limb.name}): it bends between adjacent carriers, does not hang, and is not held to a trailing-tip bar` : `a limb segment (config.limbs.${p.limb.name}), rigid on its one bone "${p.limb.bone}": it turns at its joint and does not hang, so it is not held to the bar` });
|
|
8125
|
+
rows.push({ ...checkRow('TIP_OVER_ROOT.parts', 'part', false, [p.name]), part: p.name, unmeasured: p.limb.band !== undefined ? `a hybrid joint band (config.limbs.${p.limb.name}): it bends between adjacent carriers, does not hang, and is not held to a trailing-tip bar` : `a limb segment (config.limbs.${p.limb.name}), rigid on its one bone "${p.limb.bone}": it turns at its joint and does not hang, so it is not held to the bar` });
|
|
8120
8126
|
continue;
|
|
8121
8127
|
}
|
|
8122
8128
|
const rises = excepted.rises.includes(p.name);
|
|
@@ -8137,7 +8143,7 @@ function tipLine(inp: FullInputs, geometryPath: string, frames: number, problems
|
|
|
8137
8143
|
const said = { ...(rests ? { declared: 'rests' } : {}), ...(rises ? { tip_half: tipHalf, tip_read: risesRead.get(p.name) as string } : {}) };
|
|
8138
8144
|
if (w.root === null || w.tip === null || c.root === null || c.tip === null) {
|
|
8139
8145
|
const half = w.root === null || c.root === null ? rootHalf : tipHalf;
|
|
8140
|
-
rows.push({ part: p.name, ...said, unmeasured: shown[0] === null ? 'its slot shows no attachment on idle frame 0' : `on idle frame 0 the ${half} half of its box holds no art its attachment draws` });
|
|
8146
|
+
rows.push({ ...checkRow('TIP_OVER_ROOT.parts', 'part', false, [p.name]), part: p.name, ...said, unmeasured: shown[0] === null ? 'its slot shows no attachment on idle frame 0' : `on idle frame 0 the ${half} half of its box holds no art its attachment draws` });
|
|
8141
8147
|
continue;
|
|
8142
8148
|
}
|
|
8143
8149
|
// Issue #987: a half that does not move against its carrier, read at the line's precision, is 0 and not the
|
|
@@ -8148,7 +8154,7 @@ function tipLine(inp: FullInputs, geometryPath: string, frames: number, problems
|
|
|
8148
8154
|
// Issue #245: a resting tip is held to the opposite relation — no further than its root, at the line's precision.
|
|
8149
8155
|
const rigid = t.root === 0 && t.tip === 0;
|
|
8150
8156
|
const ok = !rigid && (rests ? (ratio === null ? t.tip === 0 : ratio <= TIP_REST_RATIO_CEILING) : ratio === null ? t.tip > 0 : ratio >= TIP_RATIO_FLOOR);
|
|
8151
|
-
rows.push({ part: p.name, ...said, hang_from: hang, root_rig_px: round3(t.root), tip_rig_px: round3(t.tip), ratio, world_root_rig_px: round3(w.root), world_tip_rig_px: round3(w.tip), world_ratio: worldRatio });
|
|
8157
|
+
rows.push({ ...checkRow('TIP_OVER_ROOT.parts', 'part', !ok && !(!rigid && hanging.onLink && Math.max(c.root, c.tip) < TIP_TRAVEL_FLOOR), [p.name]), part: p.name, ...said, hang_from: hang, root_rig_px: round3(t.root), tip_rig_px: round3(t.tip), ratio, world_root_rig_px: round3(w.root), world_tip_rig_px: round3(w.tip), world_ratio: worldRatio });
|
|
8152
8158
|
// Structural 0 / 0 stays a failure before the link-only magnitude policy (issue #994).
|
|
8153
8159
|
if (!rigid && hanging.onLink && Math.max(c.root, c.tip) < TIP_TRAVEL_FLOOR) {
|
|
8154
8160
|
belowGrid++;
|
|
@@ -8681,12 +8687,12 @@ export function stillLine(inp: FullInputs, idle: FrameSet, geo: IdleGeometry | n
|
|
|
8681
8687
|
const tolerance = stillTolerance(coordMax, entryMax);
|
|
8682
8688
|
for (const { slot, r } of readings) {
|
|
8683
8689
|
if (r.max === null) {
|
|
8684
|
-
rows.push({ slot, unmeasured: 'no idle frame shows it' });
|
|
8690
|
+
rows.push({ ...checkRow('STILL_REGIONS_DARK.*.still_slots', 'part', false, [slot]), slot, unmeasured: 'no idle frame shows it' });
|
|
8685
8691
|
continue;
|
|
8686
8692
|
}
|
|
8687
8693
|
sumSq += r.sumSq;
|
|
8688
8694
|
weight += r.weight;
|
|
8689
|
-
rows.push({ slot, max_rig_px: sig4(r.max), rms_rig_px: sig4(r.weight > 0 ? Math.sqrt(r.sumSq / r.weight) : 0) });
|
|
8695
|
+
rows.push({ ...checkRow('STILL_REGIONS_DARK.*.still_slots', 'part', r.max > tolerance, [slot]), slot, max_rig_px: sig4(r.max), rms_rig_px: sig4(r.weight > 0 ? Math.sqrt(r.sumSq / r.weight) : 0) });
|
|
8690
8696
|
if (worst === null || r.max > worst.max) worst = { slot, max: r.max, frame: frameIndex(r.frame) };
|
|
8691
8697
|
if (r.max > tolerance) over.push({ slot, max: r.max, frame: frameIndex(r.frame) as number });
|
|
8692
8698
|
}
|
|
@@ -8695,7 +8701,7 @@ export function stillLine(inp: FullInputs, idle: FrameSet, geo: IdleGeometry | n
|
|
|
8695
8701
|
if (still.includes(sl.name) || !record.has(sl.name)) continue;
|
|
8696
8702
|
const c = crossingOf(artOf(sl.name), inp.stage, shownOf(sl.name), maps, region);
|
|
8697
8703
|
// Art that only touches the region within the arithmetic's tolerance has not entered it.
|
|
8698
|
-
if (c !== null && c.depth > tolerance) crossing.push({ slot: sl.name, depth_rig_px: round3(c.depth), area_rig_px2: round3(c.area), frame: frameIndex(c.frame) });
|
|
8704
|
+
if (c !== null && c.depth > tolerance) crossing.push({ ...checkRow('STILL_REGIONS_DARK.*.crossing', 'part', true, [sl.name]), slot: sl.name, depth_rig_px: round3(c.depth), area_rig_px2: round3(c.area), frame: frameIndex(c.frame) });
|
|
8699
8705
|
}
|
|
8700
8706
|
const rms = weight > 0 ? Math.sqrt(sumSq / weight) : 0;
|
|
8701
8707
|
return {
|
|
@@ -9329,7 +9335,7 @@ export function stretchLine(geo: IdleGeometry | null, path: string, problems: Pr
|
|
|
9329
9335
|
});
|
|
9330
9336
|
}
|
|
9331
9337
|
if (m.max === null || m.min === null) {
|
|
9332
|
-
rows.push({ slot: m.slot, triangles: m.triangles, unmeasured: 'no idle frame shows this attachment' });
|
|
9338
|
+
rows.push({ ...checkRow('TEXTURE_STRETCH.per_mesh', 'part', false, [m.slot]), slot: m.slot, triangles: m.triangles, unmeasured: 'no idle frame shows this attachment' });
|
|
9333
9339
|
continue;
|
|
9334
9340
|
}
|
|
9335
9341
|
const sMax = stretchSeverity(m.max.ratio);
|
|
@@ -9339,7 +9345,7 @@ export function stretchLine(geo: IdleGeometry | null, path: string, problems: Pr
|
|
|
9339
9345
|
if (worst === null || severity > worst.severity) worst = { mesh: m, at, severity };
|
|
9340
9346
|
maxAll = maxAll === null ? m.max.ratio : Math.max(maxAll, m.max.ratio);
|
|
9341
9347
|
minAll = minAll === null ? m.min.ratio : Math.min(minAll, m.min.ratio);
|
|
9342
|
-
rows.push({ slot: m.slot, triangles: m.triangles, max_ratio: round3(m.max.ratio), max_at: stretchAtText(m.max), min_ratio: round3(m.min.ratio), min_at: stretchAtText(m.min), severity });
|
|
9348
|
+
rows.push({ ...checkRow('TEXTURE_STRETCH.per_mesh', 'part', severity > TEXTURE_STRETCH_CEILING, [m.slot]), slot: m.slot, triangles: m.triangles, max_ratio: round3(m.max.ratio), max_at: stretchAtText(m.max), min_ratio: round3(m.min.ratio), min_at: stretchAtText(m.min), severity });
|
|
9343
9349
|
if (severity > TEXTURE_STRETCH_CEILING) {
|
|
9344
9350
|
failed = true;
|
|
9345
9351
|
const step = bound === undefined ? '' : weightStepText(bound.rig, m.slot, m.attachment, at.edge, bound);
|
package/src/checkrow.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Additive consumer metadata, assigned where a check row is produced (#1089).
|
|
2
|
+
* The family literal anchors the generated reference table; it is not serialized.
|
|
3
|
+
* Finding is the producer's existing bar/warning decision, never a status guess.
|
|
4
|
+
*/
|
|
5
|
+
export type CheckRowScope = 'part' | 'pair' | 'rig';
|
|
6
|
+
export interface CheckRowLabels {
|
|
7
|
+
row_scope: CheckRowScope;
|
|
8
|
+
row_kind: 'finding' | 'evidence';
|
|
9
|
+
/** Actual named parts only; rig observations have no implied part attribution. */
|
|
10
|
+
row_subjects: string[];
|
|
11
|
+
}
|
|
12
|
+
export function checkRow(_family: string, scope: CheckRowScope, finding: boolean, subjects: readonly string[]): CheckRowLabels {
|
|
13
|
+
return { row_scope: scope, row_kind: finding ? 'finding' : 'evidence', row_subjects: [...subjects] };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Legacy figures for human-readable formatters and compatibility oracles. */
|
|
17
|
+
export function withoutCheckRows(value: unknown): unknown {
|
|
18
|
+
if (Array.isArray(value)) return value.map(withoutCheckRows);
|
|
19
|
+
if (value !== null && typeof value === 'object') return Object.fromEntries(Object.entries(value)
|
|
20
|
+
.filter(([key]) => !['row_scope', 'row_kind', 'row_subjects'].includes(key))
|
|
21
|
+
.map(([key, entry]) => [key, withoutCheckRows(entry)]));
|
|
22
|
+
return value;
|
|
23
|
+
}
|
package/src/coincide.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { checkRow } from './checkrow.ts';
|
|
1
2
|
/** Report-only missing support observations on the native setup grid (#998). */
|
|
2
3
|
import { refuseIfAny } from './errors.ts';
|
|
3
4
|
import { connectedComponents } from './raster/components.ts';
|
|
@@ -106,11 +107,11 @@ export function supportReport(
|
|
|
106
107
|
if (x + 1 < width) { rawEdge(p, p + 1, x + 1, y, 0, 1); rawEdge(p + 1, p, x + 1, y, 0, 1); }
|
|
107
108
|
if (y + 1 < height) { rawEdge(p, p + width, x, y + 1, 1, 0); rawEdge(p + width, p, x, y + 1, 1, 0); }
|
|
108
109
|
}
|
|
109
|
-
if (rawLength > 0 || overlap > 0) raw_pairs.push({ front: F.name, back: B.name,
|
|
110
|
+
if (rawLength > 0 || overlap > 0) raw_pairs.push({ ...checkRow('PART_SUPPORT_REPORT.raw_pairs', 'pair', false, [F.name, B.name]), front: F.name, back: B.name,
|
|
110
111
|
boundary_length_px: rawLength, box: [rx0, ry0, rx1 - rx0, ry1 - ry0], overlap_area_px: overlap,
|
|
111
112
|
classification: 'ownership unknown, unclassified' });
|
|
112
113
|
if (domain === undefined || !('mask' in domain)) {
|
|
113
|
-
pairs.push({ front: F.name, back: B.name, status: 'unavailable', reason: `${B.name}: ${domain === undefined ? unavailableReason : domain.reason}`, boundary_length_px: null, box: null, continuation_candidate_area_px: null });
|
|
114
|
+
pairs.push({ ...checkRow('PART_SUPPORT_REPORT.pairs', 'pair', false, [F.name, B.name]), front: F.name, back: B.name, status: 'unavailable', reason: `${B.name}: ${domain === undefined ? unavailableReason : domain.reason}`, boundary_length_px: null, box: null, continuation_candidate_area_px: null });
|
|
114
115
|
continue;
|
|
115
116
|
}
|
|
116
117
|
let length = 0, area = 0, x0 = width, y0 = height, x1 = 0, y1 = 0;
|
|
@@ -126,7 +127,7 @@ export function supportReport(
|
|
|
126
127
|
if (x + 1 < width) { edge(p, p + 1, x + 1, y, 0, 1); edge(p + 1, p, x + 1, y, 0, 1); }
|
|
127
128
|
if (y + 1 < height) { edge(p, p + width, x, y + 1, 1, 0); edge(p + width, p, x, y + 1, 1, 0); }
|
|
128
129
|
}
|
|
129
|
-
pairs.push({ front: F.name, back: B.name, status: 'measured', boundary_length_px: length,
|
|
130
|
+
pairs.push({ ...checkRow('PART_SUPPORT_REPORT.pairs', 'pair', length > 0, [F.name, B.name]), front: F.name, back: B.name, status: 'measured', boundary_length_px: length,
|
|
130
131
|
box: length === 0 ? null : [x0, y0, x1 - x0, y1 - y0], continuation_candidate_area_px: area });
|
|
131
132
|
}
|
|
132
133
|
const unowned = unownedSupport(width, height, parts, paintedFigure);
|
|
@@ -141,7 +142,7 @@ export function unownedSupport(width: number, height: number, parts: readonly Su
|
|
|
141
142
|
if (paintedFigure !== null) {
|
|
142
143
|
const missing = paintedFigure.data.slice();
|
|
143
144
|
for (const part of parts) for (let p = 0; p < missing.length; p++) if (part.mask.data[p] !== 0) missing[p] = 0;
|
|
144
|
-
const regions = connectedComponents({ width, height, data: missing }, 4).stats.slice(1).map(s => ({ box: [s.left, s.top, s.width, s.height] as SupportBox, area_px: s.area }));
|
|
145
|
+
const regions = connectedComponents({ width, height, data: missing }, 4).stats.slice(1).map(s => ({ ...checkRow('PART_SUPPORT_REPORT.unowned.regions', 'rig', true, []), box: [s.left, s.top, s.width, s.height] as SupportBox, area_px: s.area }));
|
|
145
146
|
unowned = { status: 'measured', area_px: regions.reduce((sum, r) => sum + r.area_px, 0), regions };
|
|
146
147
|
}
|
|
147
148
|
return unowned;
|
package/src/cutmaterial.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { checkRow } from './checkrow.ts';
|
|
1
2
|
import { edgeLength } from './length.ts';
|
|
2
3
|
import { createHash } from 'node:crypto';
|
|
3
4
|
/** Source support at declared joints (#888). Geometry is in stage pixels, y down.
|
|
@@ -276,7 +277,7 @@ export function checkJointMaterial(declarations: readonly JointMaterial[] | unde
|
|
|
276
277
|
const read=materialRows(req.part,req,(original as MaterialSource).edges,[],piece);
|
|
277
278
|
if(read.every(r=>r.rays===0))refuseIfAny([{code:'CHECK_CUT_MATERIAL_MEASURED',object,detail:'no opaque cut interface within declared reach; correct the explicit joint correspondence/reach or supply source material; no PASS is invented'}]);
|
|
278
279
|
for(const r of read.filter(r=>r.rays>0)){
|
|
279
|
-
rows.push(r);
|
|
280
|
+
rows.push({ ...r, ...checkRow('CUT_JOINT_MATERIAL.rows', 'part', r.status === 'FAIL', [r.part]) });
|
|
280
281
|
if(r.status==='FAIL')problems.push({code:'CHECK_CUT_JOINT_MATERIAL',object,detail:`edge [${r.edge.map(p=>p.join(',')).join(' -> ')}], opaque edge length ${r.edge_length_px} px (${r.within_reach_px} px within reach): material found ${r.found_px} px, required ${r.required_px} px by bend [${req.bend_degrees.join(', ')}] degrees within reach ${req.reach_px} px; source art past the joint is required — follow AUTHORING Source before scissors; no crop or under-piece repair`});
|
|
281
282
|
}
|
|
282
283
|
}
|
package/src/motionseampose.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { checkRow } from './checkrow.ts';
|
|
1
2
|
/** Posed-axis evidence from one stock seam render, never sampled source keys. */
|
|
2
3
|
import type { GeometryFile } from '@rig-c/core/render-shared';
|
|
3
4
|
import type { FrameSet } from './check.ts';
|
|
@@ -49,7 +50,7 @@ const regular = (m: SeamMatrix): boolean => {
|
|
|
49
50
|
/** World axes remain evidence even when local-range equivalence is unavailable. */
|
|
50
51
|
export function seamJointPose(bone: string, parent: string | null, inherit: string, setup: SeamMatrix, posed: SeamMatrix,
|
|
51
52
|
parentSetup: SeamMatrix | null, parentPosed: SeamMatrix | null, range: [number, number] | null, rangeReason?: string): SeamJointPose {
|
|
52
|
-
const out: SeamJointPose = { bone, parent, world_x_axis_degrees: posed.a === 0 && posed.c === 0 ? null : angle(posed.a, posed.c),
|
|
53
|
+
const out: SeamJointPose = { ...checkRow('SEAM_OVER_MOTION.rows[].pose_at_worst.joints', 'rig', false, []), bone, parent, world_x_axis_degrees: posed.a === 0 && posed.c === 0 ? null : angle(posed.a, posed.c),
|
|
53
54
|
parent_relative_setup_axis_delta_degrees_mod360: null, static_range: range, comparison: 'unavailable' };
|
|
54
55
|
if (inherit !== 'normal') return { ...out, reason: `inherit ${inherit}: parent-relative local-range comparison unavailable` };
|
|
55
56
|
if (parent === null || parentSetup === null || parentPosed === null) return { ...out, reason: 'no parent frame for a local-range comparison' };
|
package/src/setuppainting.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { checkRow } from './checkrow.ts';
|
|
1
2
|
/** Authored source-painting limits over actual renderer setup pixels (#887). */
|
|
2
3
|
import { refuseIfAny, type Problem } from './errors.ts';
|
|
3
4
|
import type { Raster } from './raster/types.ts';
|
|
@@ -170,8 +171,8 @@ export function setupPaintingLine(
|
|
|
170
171
|
else { row.pixels++; row.x0 = Math.min(row.x0, x); row.y0 = Math.min(row.y0, y); row.x1 = Math.max(row.x1, x + 1); row.y1 = Math.max(row.y1, y + 1); }
|
|
171
172
|
}
|
|
172
173
|
const status = r.max_pixels === undefined ? 'SKIP' : count > r.max_pixels ? 'FAIL' : 'PASS';
|
|
173
|
-
const result: SetupPaintingReading = { ...r, status, pixel_count: count, limit: r.max_pixels ?? null,
|
|
174
|
-
slots: [...rows].map(([slot, row]) => ({ slot, box: [row.x0, row.y0, row.x1 - row.x0, row.y1 - row.y0], pixel_count: row.pixels })) };
|
|
174
|
+
const result: SetupPaintingReading = { ...r, ...checkRow('SETUP_MATCHES_PAINTING.regions', 'rig', status === 'FAIL', []), status, pixel_count: count, limit: r.max_pixels ?? null,
|
|
175
|
+
slots: [...rows].map(([slot, row]) => ({ ...checkRow('SETUP_MATCHES_PAINTING.regions[].slots', slot === '(uncovered)' ? 'rig' : 'part', false, slot === '(uncovered)' ? [] : [slot]), slot, box: [row.x0, row.y0, row.x1 - row.x0, row.y1 - row.y0], pixel_count: row.pixels })) };
|
|
175
176
|
if (status === 'FAIL') {
|
|
176
177
|
for (const row of result.slots) problems.push({ code: 'CHECK_SETUP_MATCHES_PAINTING', object: `region "${r.name}" slot "${row.slot}"`, detail: `box [${row.box.join(', ')}], pixelcount ${row.pixel_count}; region pixelcount ${count} > declared limit ${r.max_pixels}, RGB tolerance ${declared.rgb_tolerance}; compare the actual setup to the source painting on the declared stage grid` });
|
|
177
178
|
}
|