scene_ingest
Turn a scanned mesh the caller fetched into one welded integer stage mesh and one sealed provenance row, or a named refusal. The caller posts the bytes (bytes_b64, or an ASCII STL as text), the URL and HTTP status they came from, and the catalog's raw license response; the court reads the license field from that response itself (Commons imageinfo License.value, else LicenseShortName.value when License is absent; EDAN metadata_usage.access; Natural Earth LICENSE.md line 1) and admits exactly pd, cc0, CC0, Public domain or Everything here is public domain. Order: http_status not 200 is REFUSED_SOURCE; a binary STL whose length is not 84 + 50 x count is REFUSED_TRUNCATED before anything is hashed; an unreadable or inadmissible license is REFUSED_LICENSE_UNREADABLE or REFUSED_LICENSE before a vertex is decoded; then StageMeshIngestLaw reads every float32 word by bit pattern at the declared unit (REFUSED_NAN, REFUSED_RANGE for a vertex past 2147483647 um, REFUSED_EMPTY), StageWeldLaw welds at weld_cell_um and doubles the cell up to 12 times until faces fit face_budget (REFUSED_BUDGET), and SceneProvenanceLaw seals the canonical row. INGESTED returns usda (one def Mesh with int2[] px pairs, the welded mesh as sealed; the pose in the row is applied by scene_compose), seal_row, digest (sha256 of the row), source_sha256, triangles_in, faces_out, points_out, weld_cell_um, mesh_fnv1a, placement (HELD when a second rights field such as a Smithsonian copyright is recorded) and sealed_by. It fetches nothing, reads no clock and writes nothing on the cell; nine cells return the same bytes for the same call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | what the bytes are: stl (binary or ASCII). obj, ply, glb, geojson_coast, elevation_rows and star_rows are later steps and answer REFUSED_FORMAT. e.g. stl | |
| name | Yes | the asset's name, recorded in the seal row; the stage names the mesh Scan/<name>. e.g. 3d_model_of_Sphere | |
| text | No | an ASCII STL's text, in place of bytes_b64. e.g. solid t facet normal 0 0 1 outer loop vertex 0 0 0 vertex 1 0 0 vertex 0 1 0 endloop endfacet endsolid t (one keyword group per line, LF endings) | |
| unit | Yes | the unit the mesh coordinates are in, declared by the caller and never inferred (the header's UNITS=MM is recorded as evidence only); udeg is the coordinate lane of later kinds and is refused for an STL. e.g. mm | |
| dx_um | No | optional: the placement's x offset in micrometres, recorded in the row and applied by scene_compose, default 0. e.g. 2500000 | |
| dy_um | No | optional: the placement's y offset in micrometres (the stage is Y-up), default 0. e.g. 0 | |
| dz_um | No | optional: the placement's z offset in micrometres, default 0. e.g. -4000000 | |
| mirror | No | optional: true flips every face to index order 0,2,1 (recorded in the row), default false. e.g. false | |
| tone_rgb | No | optional: the mesh tone r,g,b, each 0 to 255, default 180,180,180; it is part of mesh_fnv1a. e.g. 200,190,170 | |
| bytes_b64 | No | the asset's bytes exactly as fetched, base64 (RFC 4648 alphabet, padded; blanks and line breaks skipped). Send this or text, not both. e.g. U1RMIGZpbGU= | |
| self_test | No | optional: 1 asks the court to run its own self-test over both scene tools instead of ingesting - every arm first shown a planted defect; answers SCENE_COURTS_SELFTEST_OK with arms_total, arms_ok and the report lines. e.g. 1 | |
| source_url | Yes | the URL the bytes were fetched from, recorded in the seal row. e.g. https://upload.wikimedia.org/wikipedia/commons/b/b9/3d_model_of_Sphere.stl | |
| face_budget | No | optional: the most faces the welded mesh may keep, default 80000. e.g. 80000 | |
| http_status | Yes | the HTTP status of that fetch as a decimal string; anything but 200 is REFUSED_SOURCE. e.g. 200 | |
| license_api | Yes | which catalog answered the license question, so the court knows where the field sits. e.g. commons_imageinfo | |
| weld_cell_um | No | optional: the weld cell in micrometres as a decimal string, 1 to 524287, default 1000; doubled up to 12 times while faces exceed face_budget, so the widest cell reached is 524287 x 4096. e.g. 1000 | |
| yaw_milli_deg | No | optional: the turn about +Y in milli-degrees, recorded in the row and applied by scene_compose, default 0. e.g. 90000 | |
| rights_document | No | optional: a second rights document fetched beside the license response (the Smithsonian scene.svx.json), raw; a copyright string in it is recorded as rights_conflict and the placement is HELD. e.g. {"asset":{"copyright":"(c) Smithsonian Institution. All rights reserved."}} | |
| license_response | No | the catalog's raw license response, verbatim (the Commons imageinfo JSON, the EDAN record, Natural Earth's LICENSE.md). The court extracts the field and records its name and value; a response with no field is REFUSED_LICENSE_UNREADABLE. e.g. {"query":{"pages":{"1":{"imageinfo":[{"extmetadata":{"License":{"value":"pd"}}}]}}}} |