Interface converted to light (theme set in .streamlit/config.toml as well as
CSS so Streamlit's own widgets follow), with larger type throughout and the
editor canvas converted to match. Functional Zoning under-counted because
pooja_room and walk_in_closet had no band and were silently dropped - both are
now banded, so every room is judged. Doors are generated on the utility and
common washroom; only the passage stays without one. Connectivity graph and the
edited-plan comparison reduced in size.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pin the sidebar, enlarge the room key, shrink gallery-tile labels
Sidebar is pinned to the viewport so the room key stays visible while scrolling
the gallery, and the key is set in larger type that fills the column. Gallery
tiles render text at 0.55 scale with dimensions omitted via a new `text_scale`
argument on draw_plan — full-size labels were larger than the rooms on a tile.
AppTest: zero exceptions.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sidebar reduced to plot / road / plan type / Generate (rooms decided by type).
Header is solid navy on white text; average panel shows every metric; removed
Best-Plan-Improvement and the success banner; the selected plan shows scores +
a vertical legend on the left with the plans on the right; PNG/DXF download and
carpet area moved to the bottom; the edited-plan before/after is one table with
an expander. DXF fits room labels inside rooms and adds a north arrow + title
block on TEXT/TITLE layers. AppTest: zero exceptions.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
DXF exports walls/doors/windows and edits; opening rules, sizes, breakdown
The editor now returns {rooms, openings, walls}, so the DXF draws walls, door
swings and windows on their own layers using the edited rooms. Opening rules:
no door on passage/utility/common washroom, no balcony window, one window per
room; standard sizes (door 3.0', window 4.0') with preset buttons, a size
readout and Delete. Both washrooms are now PRIVATE for zoning. The edit
comparison gains a breakdown of each metric's weighted effect on the fitness,
and access-graph labels use leader lines. Generation untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Connectivity: directional access rules, clearer graph; doors on rooms only
Access is now directional — a step a->b exists only when a is in b's permitted
entry list — so a plan can no longer "reach" the passage by crossing a bedroom.
Entry rules are stated as an explicit table. The access graph uses small dots
with names beside them, solid lines for usable doorways and dotted red lines for
touching-but-illegal pairs. Doors are placed on every room; only the passage
carries none. Weight 0; generation untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Connectivity: reachable only via circulation, not through private rooms
A room is reachable only from the circulation spine (living/dining/passage)
or a room-specific allowed neighbour, never by crossing an unrelated private
room. Access edges require a doorway-wide shared wall AND a permitted link;
BFS from the entry. Exceptions: Utility<-kitchen, Balcony<-bedrooms,
Pooja<-kitchen, attached bath<-its bedroom. Weight 0; generation untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Calculation/display only. Adjacency final line clarifies "total possible" is
the max weighted score (not the pair count). Connectivity now exposes and
renders the access graph (nodes=rooms, edges=doorway walls; entry/reachable/
isolated colouring + verdict). Editor hides the green locked-adjacency lines
while the Walls overlay is on so walls look uniform. Generation untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Zoning per-room bands (normalised), Vastu plain+weighted, size Deviation
Functional Zoning is now a per-room band check on the staircase-centroid
distance NORMALISED by the farthest staircase-to-corner distance (plot-size
independent): Common <= 0.40 / Transitional <= 0.55 / Private > 0.55, a room
Satisfied when in its ideal band or an adjacent one. Vastu table shows Tier
+ Counts + TOTAL and BOTH plain-compliance and weighted %. Room Size gains a
signed Deviation column and is documented as MAPE. Generation untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adjacency/Constraints/Room-Width tables rebuilt with Tier text, Status,
Counts, a TOTAL row and an explicit final-calc line; Aspect Ratio gains
its final calc; Connectivity gets its own per-room table. Constraints
dropped from SCORING: min_room_sizes, pooja_near_square, rooms_on_boundary
(the last stays enforced in the generation model). Plan render uses one
uniform, smaller, non-bold room label so text no longer spills. Editor
rectangles show only name + dimensions; lock reason and allowed actions
moved to a top info panel, labels un-bolded. Generation model untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Aspect-ratio score: penalise from a perfect square, not from 1.8:1
Displayed aspect now scores 1.0 only at a true square and tapers
linearly to 0 across 1.0-2.5 (score = (2.5 - aspect) / 1.5), so aspect
1.05 reads 96.7% instead of a misleading 100%. Generation is untouched:
_passes_gates uses a private _gate_aspect_ok that keeps the historical
up-to-1.8:1 curve at the 0.795 threshold, so the SAME plans pass and
every BHK still yields 20 tagged plans.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Scoring-calculation & UI changes: staircase-centroid zoning, Required/Predicted room-size columns, room-width as its own metric, drop compactness+circulation (keep connectivity), remade vastu/adjacency tables, DXF/DWG note. Generation model untouched.
Fix template fallback on all road sides (stale gpt_planner import + hard gate emptying the population); gate now a preference with bath-safe fill and tier-aware ranking; All-Plans average-score panel
Finalised Scoring System: 5-tier vastu, weighted adjacency, 12+2 constraints, proportions-driven sizes, official fitness weights; plans ranked by the finalised fitness; per-metric calculation break-up in the UI
The SDK reports every network fault as a bare 'Connection error.'. Walk the
exception chain and probe DNS/TLS once after both attempts fail, so the logs
say whether it is DNS, egress/TLS, or the API itself. Adds diagnose_api.py.
Fix 2BHK never generating the master's attached bathroom
attached_bathroom is a core room, so it never appears in selected_optional;
the 2BHK generator filtered for it there and so always dropped it. Moved to
its required list, where 3BHK/4BHK already had it.
Hybrid layout engine, twelve evaluation metrics, 4BHK third washroom
- Deterministic backbone designs every plan with no API key; the optional
model proposer only adds structural variety on top. Both go through one
geometry engine and one scorer.
- Twelve evaluation metrics (core/metrics.py) with a room-size model
(core/size_model.py), surfaced in the app as an AI-generated vs optimised
comparison table.
- 4BHK now has three washrooms: common, one attached to the master, one
attached to bedroom_01 -- each verified to share a wall with its bedroom.
- torch/torchvision dropped from the image (optional pipeline only, imported
behind try/except), cutting ~2 GB from the build.
- Config is now LAYOUT_API_KEY / LAYOUT_MODEL / LAYOUT_TIMEOUT, with the
legacy variable still read as a fallback.
gpt_planner quality: fixed pooja, no strip rooms, loud failures
Pooja fixed-depth + narrow-column + box cap + column reorder (never beside a
washroom); depth ceilings kill strip rooms; GPT failures loud and never
cached; app shows which engine produced the plans.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
GPT full authority: gpt_planner designs all 20 plans A-to-Z
GPT (gpt-5.2) designs every plan; a deterministic tiler renders it exactly
(no gaps/overlaps by construction) with tiling-safe fixes: staircase exactly
12x10 beside the living, tiny pooja never touching wet rooms, master =
biggest bedroom, every requested room present, no strip rooms. Imperfect
plans rank last instead of being rejected. Templates remain only as the
no-API-key fallback. Audited: 80/80 plans pass every rule on 40x60.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Show GPT-engine status; fix pooja gap without flattening variety
App shows whether GPT or templates is active. Pooja capped to a small niche
on every path with the freed space reclaimed; heavy gap-fill runs only when a
real gap remains so GPT's varied 100%-tiled plans aren't normalised.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Guarantee small pooja + present utility/study (template fallback too)
make_floorplan caps pooja to ~28 sqft on every path; build_from_template
protects and guarantees the user's selected optional rooms. Fixes the big
pooja and missing utility/study on the template fallback.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Oversized passages absorbed into rooms; strip-room / staircase-not-touching-
living become ranking penalties (best plans shown); staircase snap guarded so
it never swallows a neighbour; prompt tightened (staircase touches living,
wide-enough columns, thin passages). Verified 0 overlaps, all rooms, pooja NE.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Lock staircase to its fixed 12x10 size in GPT plans
The staircase is a fixed structural block; the light GPT render now snaps it
to 12x10 and never resizes it. Verified across plot sizes and road sides.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fully tile the flat (no gaps); realistic single passage
100% tiled plans (apartment flat, not a house): rooms grow into every void
and leftover interior pockets become one small passage (never on the outer
wall, never a dead-end). GPT prompt updated to tile the whole plate.
Verified 2BHK 30x40 & 3BHK 40x60: 100% fill, 0 overlaps, all rooms present,
pooja in NE, <=1 interior passage.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GPT plans: guarantee kitchen + all requested rooms; light render
Every home always has a kitchen and every requested room (pooja/study) is
guaranteed present. GPT specs render through a light pipeline so their small
rooms are not squeezed away. Verified 0 missing kitchen/pooja/study, 0
overlaps, 0 spills, pooja in NE, living>washroom, 9-13 distinct plans.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GPT-designed layouts: Vastu-correct, diverse, no overlaps
GPT designs each plan's structure (Vastu zones, proportions, column
arrangement); the deterministic tiler + repair pipeline renders exact
rectangles and enforces every rule. Pooja always NE/N/E and smallest,
living never smaller than a washroom, master biggest bedroom, no overlaps
or out-of-box rooms, and 10-12 genuinely distinct layouts per 20. Falls
back to templates when OPENAI_API_KEY is not configured.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pooja always in NE/N/E + smallest; per-plan variation
Pooja is relocated to the sacred NE/N/E zone on every plan and kept the
smallest room (never south/west). Added a seeded proportional variation so
the cycled templates no longer render as identical plans. Still 0 overlaps,
0 spills, living never smaller than a washroom.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Optimised plans are gapless AND overlap-free (no jitter); nothing crosses
the inner setback rectangle (intersection clamp).
- Living room never smaller than a washroom; oversized washroom/utility
capped; master always the largest bedroom.
- 2BHK no longer collapses to 2 plans; added 2BHK/3BHK/4BHK templates ->
6-7 distinct plans per BHK.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>