Skip to content

PDF fill annotation controls (#4406)

The two pages are original CC0 test artwork generated by tools/texture-authoring/pdf-fill-controls.py (MPL-2.0 source). The generator uses ReportLab 4.4.3; generated PDF SHA-256 is 926f9c6229913f0fde6e0c732f37edc3c17b4125e52118b63108f0b718541f92. No external building accuracy is asserted. The declared control calibration is one model metre per 30 PDF units.

The committed requests are actual output of the pinned PDF.js adapter. Both pages contain a red rectangle crossing the CropBox and later blue paint. Page 1 uses even-odd filling to leave a hole; page 2 uses nonzero filling with matching ring winding. The native planner resolves the page clip and paint order, then creates colored IfcAnnotationFillArea geometry through canonical processing.

oracle.json records independent PyMuPDF 1.26.5 source rendering versus native triangle support/color at every pixel centre in the checked control resolution, without excluding boundary pixels. The two PNGs show source and native support for page 1; white is comparison background, not fabricated white geometry. These checked controls agree; this is not a general PDF fidelity proof.

The plans were applied using StoreEditor and exported using StepExporter. IfcOpenShell 0.8.2 independently reopened those exports, checked one annotation, containment, original Name, fill styles and area. The large generated PDF/IFC files are retained as local artifacts rather than committed fixtures. The actual WASM host regression consumes these requests and verifies canonical export and reopen, stale worker-result refusal and cancellation.

Reproduce from a built checkout with fresh WASM and Python dependencies listed above (the evidence runner uses the normal PDF decoder and host authoring path):

python tools/texture-authoring/pdf-fill-controls.py /tmp/pdf-fill-control.pdf
TSX_TSCONFIG_PATH=apps/viewer/tsconfig.json node --import tsx --import ./apps/viewer/src/test/vite-module-hooks.mjs tools/texture-authoring/pdf-fill-evidence.mjs /tmp/pdf-fill-control.pdf /tmp/pdf-fill-proof
python tools/texture-authoring/pdf-fill-oracle.py /tmp/pdf-fill-proof /tmp/pdf-fill-control.pdf

Final verification includes the full native workspace, strict all-target clippy, fresh WASM contracts and an independently installed PyO3 wheel matching the four committed parity fixtures (with the existing halfspace density advisory). native-load.json records exact-source normal-load A/B/A/B samples and identical ordered mesh fingerprints. It does not measure vector-page worker throughput.