Last iteration reported e303_wep_01 as inflated 30-110x by assemble_ship. Wrong: the composite nodes carry scale 1.0 and orthonormal matrices, and under the current decoder the turret places as 49x23x42 at +/-179. The 1600x2100x4800 box only appears with XBG7_COVER_SLACK=4 -- the exact-coverage fix had already repaired the turret too. The error came from comparing a deliberately pre-fix render against post-fix measurements. The containment screen's blindness therefore has a mundane cause: one mis-decode inflated the envelope and hid another. Kept as a forward-looking invariant with that caveat. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
21 lines
914 B
Rust
21 lines
914 B
Rust
//! Dump a composite's scene nodes with their scale — the transform the static
|
|
//! assembler copies verbatim into a placement.
|
|
//! Usage: node_scale <container.xpr> <composite name>
|
|
use sylpheed_formats::mesh::scene_world_nodes;
|
|
fn main() {
|
|
let a: Vec<String> = std::env::args().collect();
|
|
let bytes = std::fs::read(&a[1]).expect("container");
|
|
for n in scene_world_nodes(&bytes, &a[2]) {
|
|
// Row norms of `m`: a rotation has all three at 1.0; anything else is a
|
|
// scale baked into the matrix, which `s` does not show.
|
|
let norm = |r: [f32; 3]| (r[0] * r[0] + r[1] * r[1] + r[2] * r[2]).sqrt();
|
|
println!(
|
|
"{:<26} s[{:7.3}{:7.3}{:7.3}] |m rows|[{:7.3}{:7.3}{:7.3}] t[{:9.1}{:9.1}{:9.1}]",
|
|
n.resource,
|
|
n.s[0], n.s[1], n.s[2],
|
|
norm(n.m[0]), norm(n.m[1]), norm(n.m[2]),
|
|
n.t[0], n.t[1], n.t[2]
|
|
);
|
|
}
|
|
}
|