Single place to convert your 2D floor plans to 3d model (no LLM)
Python
Merge pull request #15 from 23f2005639/refactor/furniture-module
Shreyas_2706b24a8ba1790b
diff --cc AGENTS.mdindex e3bf484,4ebea6d..833af56--- a/AGENTS.md+++ b/AGENTS.md@@@ -56,19 -57,9 +57,19 @@@ CHROME=/path/to/chromium node tests/tesRun it after any change to `web/`, `server.py` or `blender/`.If you change `examples/make_sample.py`, run it to rewrite the PDF and keep its `EXPECT` in step.+**Refactors (code moves, behaviour stays):** prove the house is the same. On `main`, then on your branch:++```bash+python3 tests/same_house.py snapshot before.json [jobs/<id>/plan.json] # the sample in every theme (+ a storeyed plan: stairs, roof)+python3 tests/same_house.py snapshot after.json [jobs/<id>/plan.json]+python3 tests/same_house.py compare before.json after.json # must print SAME HOUSE+```++It builds without baking (about 20 s a house) and compares every Blender object (name, box, vertices, materials) and `meta.json`.+## How to change things- - **A new furniture item:** write the builder in `blender/gen.py` (or `lib.py`), add it to `CALLS` and to `ITEM_FNS` in `server.py` (what the review page may send), place it from a rule in `furnish.py` with its footprint `box`. Add it to `themes.SLOTS` (and its size to `catalog.py`) if themes should be able to change it.+ - **A new furniture item:** write the builder in `blender/furniture.py`, add it to `CALLS` and to `ITEM_FNS` in `server.py` (what the review page may send), place it from a rule in `furnish.py` with its footprint `box`. Add it to `themes.SLOTS` (and its size to `catalog.py`) if themes should be able to change it.- **A model for the themes:** measure it as Blender imports it (feet, front facing -y after `turn`), add it to `themes.LIBRARY` with the slots it may fill; `fetch_assets.py` downloads every library model. Large ones: keep it under about 30k triangles.- **A new theme:** an entry in `themes.THEMES`. Furniture rules read only sizes from it (`Room.sizes`), so a model that does not fit falls back to the built-in piece in the theme's colours. Check it with `tests/test_themes.py` and look at a build: rules can be right and a room still look wrong.- **A new built-in piece style:** a `style=` branch in its builder, listed in `themes.STYLES`. New materials go in `lib.py`; a coloured one goes in `PAINT` in `gen.py` so themes repaint it.