# SDF sculptures ## What this builds A small set of sculptures defined as signed-distance functions, extracted to meshes. Fixture SDFs must produce manifold, watertight meshes whose bounding boxes match documented sizes. A few renders are written. No physical print is required. The forms are original. Read `spekkr.inputs.json` first. `resolution` is the extract grid. `size` scales the default piece. `set` chooses how many fixtures. `smooth` and `stand` change the mesh. `tool` is the extractor. ## Out of scope - A general SDF editor with a live gallery, in this version. - A physical print. - A commercial scan or a copyrighted statue. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. Meshes - Each fixture in `fixtures/sdfs/` extracts to a watertight, manifold mesh. The bounding box matches the file within 0.5 mm, or 1% after a smooth pass, whichever the file says. - If `stand` is on, a base facet sits on Z = 0, with a documented area. - A known bad SDF (a fixture with a hole) fails the watertight check, so the checker is known to work both ways. Accept when: every good fixture is manifold and in tolerance, the stand sits, and the bad SDF fails. ### R2. Renders and files - Renders of each shipped sculpture and a family view. One command extracts, checks, and writes the renders. No print. Accept when: the command passes for both tools at resolution 64 and 128, and the four named renders are written for the `three` set. ### R3. Inputs - Numeric inputs are read from `spekkr.inputs.json` and must stay inside the ranges in the Inputs table in `design.md`. - A value outside a range is refused before modelling, with a message that names the key. - Options add or remove the features in that table. The `tool` swap selects CadQuery or OpenSCAD; both must meet the same numbers. Accept when: default and one out-of-range value are handled as above, and a second legal input set still matches the formulas in `design.md`. ### R4. Checks and report - One command builds the model at the defaults and at the person's inputs, measures it against `design.md`, and writes a short report. - A model broken on purpose, for example a wall thinner than `wall`, must fail the report. - The command exports the files this spec asks for (STL, and STEP when the tool can). No physical print is required. Accept when: the report says pass at the defaults and at the person's inputs, and fail on a deliberately broken model. ## Verification Fixture SDFs produce manifold meshes within documented dimension tolerances. A bad open SDF fails the watertight check. A few sculptures are rendered. No physical print is required. ## Definition of done - Every acceptance check above runs from one command, and all pass at the person's inputs. - A README says how to extract a mesh, how to add an SDF, and that a print is optional.