Skip to content

Registered PDF CropBox contacts (#4458)

The original controlled PDF is generated by controlledPdf() in apps/viewer/src/lib/appearance/pdf/fixtures.ts and retained as /tmp/pdf-lineage-control.pdf. SHA-256 is recorded in oracle.json. Its CropBox is [10,20,110,92], UserUnit is 2 and intrinsic rotation is 90 degrees. The committed request comes from actual host calibration, not an invented alignment. Original PDF decoding is repeated and deep-compared with that frozen request before native planning. The effective IFC source hash is also verified.

Previously, source green rectangle y=0 touched CropBox y=0. A standalone native self-classification changed that boundary to y=1.6653345369377348e-16, and the next clip refused a topology change. Raw source intersection with the same CropBox succeeded. Repeated independently centred floating adapters introduced this false distinction. A regression retains the exact registered request at five tolerances plus repeated native classify/clip identity.

The canonical composition now qualifies all original page contours once on a shared lattice and retains integer coordinates through all intermediate boolean operations. Each stage retains finite-edge topology/intersection guards. A change of side relative to a remote infinite line is irrelevant only when both original and quantized finite segment boxes remain separated beyond the existing error margin. Original endpoint collapse and near contacts still refuse.

Actual pinned PDF.js → native WASM → StoreEditor/StepExporter output is read by IfcOpenShell 0.8.2. Annotation Name, containment and solid fill styles agree; independent area is 2.4 square metres, four triangles. MuPDF 1.26.5 independently renders the original page with CropBox/UserUnit/rotation; all 28,800 pixel centres match native triangle support and colour without exclusions. This control is not a claim of arbitrary PDF conversion fidelity. Straight/curved control oracles were replayed separately; existing unsupported-paint refusals remain.

Reproduce from a built checkout with fresh WASM and the retained original files:

TSX_TSCONFIG_PATH=apps/viewer/tsconfig.json node --import tsx --import ./apps/viewer/src/test/vite-module-hooks.mjs tools/texture-authoring/pdf-registered-fill-evidence.mjs /tmp/pdf-lineage-control.pdf /tmp/pdf-annotation-real-source.ifc docs/architecture/evidence/pdf-composition-lattice/registered-request.json /tmp/registered-proof
python tools/texture-authoring/pdf-registered-fill-oracle.py /tmp/registered-proof /tmp/pdf-lineage-control.pdf