Skip to content

Implement Multi-Story Building Generator#15

Merged
Xyrces merged 3 commits intomainfrom
jules/multi-story-building-3287640896329691124
Dec 20, 2025
Merged

Implement Multi-Story Building Generator#15
Xyrces merged 3 commits intomainfrom
jules/multi-story-building-3287640896329691124

Conversation

@google-labs-jules
Copy link
Copy Markdown
Contributor

This PR implements a procedural generation system for multi-story buildings using the ResPlan dataset.

Key features:

  1. Building Models: Introduced Building and BuildingFloor classes to represent stacked structures.
  2. Building Generator: A new BuildingGenerator class that takes a list of plans and stacks them.
    • Logic: Sorts plans by area (largest first), then iteratively finds the next largest plan that fits within the current floor's footprint (>95% containment).
    • Alignment: Normalizes all plans by centering their "front door" to (0,0), simulating a vertical shaft.
    • Rotation: Attempts 4 cardinal rotations to find the best fit.
  3. Stair Core: Automatically generates a 4x3m stair core geometry adjacent to the front door for every floor, satisfying the requirement for "stairs and corridors".
  4. Rendering: Updated PlanRenderer to support RenderFloor, which visualizes both the unit plan and the generated common areas (stairs).
  5. Safety: Implemented deep cloning of Plans to ensure the generator does not mutate the original dataset objects.

This functionality addresses the challenge of making "upper floors fit on lower floors" and adding "stairs".


PR created automatically by Jules for task 3287640896329691124 started by @Xyrces

- Added `Building` and `BuildingFloor` models to `ResPlan.Library`.
- Implemented `BuildingGenerator` to stack plans based on area sorting and geometric containment.
- Added procedural stair core generation to satisfy vertical circulation requirements.
- Updated `PlanRenderer` to support rendering full building floors with additional geometries.
- Added comprehensive tests for building generation and alignment logic.
- Ensured Plan mutation safety during generation by cloning objects.
@google-labs-jules
Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

- Implemented `BuildingGenerator` class to procedurally stack plans.
- Logic includes sorting plans by area and enforcing geometric containment with rotation support.
- Added `Building` and `BuildingFloor` data models.
- Updated `PlanRenderer` to support rendering building floors with additional geometries (e.g. stairs).
- Added procedural stair core generation to satisfy vertical circulation needs.
- Updated documentation with new architecture, models, and usage examples.
- Added unit tests for building generation.
- Implemented `BuildingGenerator` to proceduraly stack plans with rotation support and stair core generation.
- Added `Building` and `BuildingFloor` domain models.
- Updated `PlanRenderer` to support rendering building floors.
- Added comprehensive XML documentation for public APIs.
- Fixed a race condition in `PythonEnvManager` causing CI failures by adding thread locking.
- Added pure C# unit tests for building generation logic, decoupled from Python.
- Updated documentation with new architecture diagrams and details.
@Xyrces Xyrces merged commit f8872e0 into main Dec 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant