Skip to content

Single place to convert your 2D floor plans to 3d model (no LLM)

Python

Ceilings: no hole where an open court upstairs sits over a room

23f200563917e59a0dc550
diff --git a/blender/gen.py b/blender/gen.py
index 78aa9ee..3e3fb22 100644
--- a/blender/gen.py
+++ b/blender/gen.py
@@ -332,7 +332,11 @@ for k, f in enumerate(floors):
mesh_from_boxes("plinth", [(bb[0] - 0.2, bb[1] + 0.2, bb[2] - 0.2, bb[3] + 0.2, -0.6, -0.02, "concrete")])
else:
prev = floors[k - 1]
- holes += [(*r, -9, 99) for zn in prev["rooms"] if zn["type"] in OPEN_SKY for r in zn["rects"]]
+ # open only where it is open on both storeys: a court over a room is that room's ceiling, a room over a
+ # court stands on the slab
+ rooms = lambda fl: [(*r, -9, 99) for zn in fl["rooms"] if zn["type"] not in OPEN_SKY for r in zn["rects"]]
+ holes = subtract_all(holes, rooms(prev)) + subtract_all(
+ [(*r, -9, 99) for zn in prev["rooms"] if zn["type"] in OPEN_SKY for r in zn["rects"]], rooms(f))
sb = stair_box_prev
if sb:
holes.append((*sb, -9, 99))
diff --git a/jobs.py b/jobs.py
index 89d7395..d177066 100644
--- a/jobs.py
+++ b/jobs.py
@@ -11,7 +11,7 @@ BUILD_TIMEOUT = 2 * 3600 # seconds; a high-quality build of a large house
ID = re.compile(r"^[a-f0-9]{12}$")
# raise ENGINE when a change to the build (blender/, furnish.py, themes.py) fixes or changes what a house looks like:
# houses built before it are then marked out of date in the review page and the walkthrough
-ENGINE = 1
+ENGINE = 2
import catalog, detect, fetch_assets, furnish, themes # noqa: E402
os.makedirs(JOBS, exist_ok=True)