Skip to content

Multi-Level IFC Staging and Active Storey Switching #49

@chraibi

Description

@chraibi

Description

Currently, when an IFC file with multiple storeys is loaded, the user is forced to pick a single level via a modal before the import completes. Because JuPedSim is currently 2D-focused, this decision is permanent for the session, preventing users from exploring the building's layout or verifying they've selected the correct storey for simulation.

We need to implement a "Staging" workflow where all detected levels are loaded into memory, allowing the user to switch the active view before finalizing the simulation geometry.

Current Behavior

  • IFC import triggers a "Select Building Storey" modal.
  • Selecting a storey and clicking "Import" discards the data for all other levels.
  • Switching levels requires a full re-import of the IFC file.

Expected Behavior

  • Staged Loading: All IfcBuildingStorey entities from the IFC file should be parsed during initial load.
  • Storey Switcher: A new UI element (e.g., a "Level" dropdown or stack selector) should appear in the main workspace.
  • Dynamic View: Switching the level in the UI should immediately update the 2D workspace to render that specific storey's geometry (spaces, doors, obstacles) based on OMA IDS height sampling.
  • Simulation Lock: Only when the user is satisfied with the selected level do they "Commit" to the simulation context, locking that level's geometry for the JuPedSim engine.

Technical Tasks

  • Data Model Expansion:

  • Update the IfcProject state to hold an array of storeys rather than a single active object.

  • Map each storey to its respective elevation and geometric entities.

  • Workspace Layering:

  • Implement a filtering mechanism in the renderer that only draws elements associated with the activeStoreyId.

  • Ensure that "Journeys" and "Agent Sources" are cleared or updated when switching levels to avoid cross-floor data pollution.

  • UI Implementation:

  • Add a Storey Selector (similar to the list in your screenshot) to the sidebar or top toolbar.

  • Show a preview of the "Walking Height" sample for the selected level to ensure openings (doors) are correctly detected at that specific elevation.

Acceptance Criteria

  1. User can import a multi-storey IFC and immediately see the "Keller" level.
  2. User can use a dropdown to switch to "Erdgeschoss" and see the geometry update instantly without a re-import.
  3. The simulation only runs on the currently visible level when the "Start Simulation" button is pressed.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions