# Quality Floor: Orchard Street Parts

Every contribution is judged automatically by the deterministic pure-Node checker (`tools/desk-check/street-part.mjs`). No part is approved by hand, so the craft floor is enforced directly from the submitted glTF geometry.

## Tier budgets

Each open slot in `desk/items/*.json` belongs to one of three tiers:

| Tier | Effort | Points | Unique triangle range | Min parts | Min PBR materials | Min surface area | Min geometric distance |
|---|---|---|---|---|---|---|---|
| `starter` | light effort (~15 min) | 1 | 1,500 to 8,000 | 3 | 2 | 0.45 m² | 0.04 |
| `standard` | standard effort (~30 min) | 3 | 6,000 to 25,000 | 5 | 2 | 1.10 m² | 0.05 |
| `showcase` | heavy effort (~55 min) | 6 | 20,000 to 60,000 | 8 | 2 | 3.00 m² | 0.06 |

All tiers share these hard bounds:

- Bundle layout: **exactly two UTF-8 files** (`part.gltf` and `part.json`) and at most **2 MiB (2,097,152 bytes)** total.
- Unique triangle deduplication and coincident-surface cap: each triangle is counted once after welding vertices to a **1 mm** grid. Duplicate triangles exceeding **2.00%**, duplicate mesh instances at identical world transforms (within 1 mm), and parallel coincident surfaces closer than **1 mm** exceeding **5.00%** of unique triangles are rejected.
- Degenerate triangles (area `< 1e-8 m²`): at most **2.00%**.
- Embedded images: PNG or JPEG only, at most **1024 px** per side (header-only check).
- Slot box containment: every vertex must lie inside `spec.envelope` within 2 mm, and all 30 slot envelopes are pairwise disjoint.
- Support plane contact and triangle-island connectivity: part minimum along the support axis (`Y = 0.07 m` on the sidewalk, `Z = 0.0225 m` on the facade wall, or `Y = 5.22 m` on the upper stair shoe plane) must sit within **15 mm** of `spec.ground_plane`. Connectivity is judged on welded triangle islands (connected vertices after 1 mm welding), requiring real geometric contact within **2 mm** to the support plane or to another grounded island rather than bounding-box overlap.
- Mount anchor contact: at least one mesh part must reach within **15 mm** of `spec.anchor.at`.
- Obstacle clearance: no part may intersect retained street/masonry solids in `desk/obstacles.json` or any already-placed sibling part in `parts/`.

## The "not blocky" geometry floor

Stacked axis-aligned boxes can inflate triangle counts via subdivision without adding real 3D modelling. To reject pure axis-aligned blockout meshes without falsely rejecting honest curved details tucked inside open frames (such as a lamp globe or urn inside a cage), the checker measures two properties across all unique world-space triangles:

1. **Off-axis surface area share (`off_axis_area_share`)**: the fraction of triangle area whose unit face normal is more than **5 degrees** away from all six coordinate axes (`±X`, `±Y`, `±Z`, i.e., `max(|nx|, |ny|, |nz|) < cos(5°)`).
   - Required minimum: **15.0%** (`0.15`).
   - Any mesh composed solely of axis-aligned boxes scores **0.0%**.
2. **Distinct normal directions (`distinct_normals`)**: the count of distinct quantized unit face normal bins (`round(nx * 12), round(ny * 12), round(nz * 12)`) across all unique triangles.
   - Required minimum: **18** distinct directions.
   - Axis-aligned boxes score at most **6**.

Known limitations: because this metric inspects all triangles directly, hidden geometry (such as a sphere connected inside an opaque box) or sets of boxes rotated away from the coordinate axes can still clear the geometric floor. Those parts do not belong on the street, and the street's owner may remove any part that games the floor.

## Calibration from seeds and study witnesses

Both thresholds were calibrated against the four real Blender seed parts in `parts/` and the three converted `.gltf` witnesses from the prior `orchard-asset-study` (`witnesses/`):

| Model | Kind | Tier | Unique tris | Off-axis area (> 5 deg) | Distinct normals | Status under Spec 32 |
|---|---|---|---:|---:|---:|---|
| `parts/a001` (Kerb Bollards) | Blender seed | starter | 3,964 | 60.7% | 552 | Accepted |
| `parts/a002` (Window Bay) | Blender seed | standard | 11,162 | 23.0% | 965 | Accepted |
| `parts/a003` (Fire Escape) | Blender seed | showcase | 26,008 | 53.4% | 682 | Accepted |
| `parts/a026` (Entry Stoop) | Blender seed | standard | 16,828 | 36.0% | 648 | Accepted |
| `witnesses/a004` (Hydrant) | Study witness | starter | 712 | 58.9% | 203 | Passes not-blocky; below 1,500 tri floor |
| `witnesses/a015` (Street Lamp) | Study witness | standard | 480 | 70.6% | 172 | Passes not-blocky; below 6,000 tri floor |
| `witnesses/a027` (Shop Awning) | Study witness | showcase | 964 | 58.5% | 30 | Passes not-blocky; below 20,000 tri floor |
| Stacked subdivided boxes | Counterexample | starter | 2,916 | 0.0% | 6 | Rejected (`part is too blocky`) |
| 8 concentric shells 0.2 mm apart | Counterexample | starter | 1,924 | 80.2% | 70 | Rejected (duplicate / coincident < 1 mm) |

## Good vs rejected examples

- **Passes (`parts/a001`)**: Lathe-turned cast-iron bollards with `Screw` profiles, circular-arrayed shaft flutes, hex anchor bolts, and a 3-segment bevelled granite curb plinth. 3,964 unique triangles, 3 PBR materials, 60.7% off-axis area, 552 face normals, 103.7 KB bundle.
- **Passes (urn inside open frame)**: An honest turned pedestal and dome seated inside a four-post open frame is accepted because all unique triangles are counted rather than discarded by bounding-box occlusion.
- **Rejected (floating ball or sliver-triangle bridge)**: A floating mesh merged into the same primitive as a grounded foot, or paired with a non-contacting sliver triangle whose bounding box overlaps it, fails the 2 mm triangle-island connectivity check.
- **Rejected (stacked shells 0.2 mm apart)**: Repeating concentric shells or nudged duplicate mesh instances within 1 mm fails the 1 mm weld deduplication and parallel coincident-surface checks.

## How to check locally

```sh
node tools/desk-check/local.mjs parts/<id>
```

See [docs/FORMAT.md](./FORMAT.md) and [CONTRIBUTING.md](./CONTRIBUTING.md) for export instructions and submission rules.
