-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Description
When exiting the Simulation Visualization mode, the workspace geometry does not return to its original state; specifically, the geometry appears significantly smaller than the original design. Furthermore, because simulation results (SQLite) do not contain the original project definitions (JSON), the app loses the "source of truth" when viewing results in isolation.
Current Behavior
- User enters "View Simulation" mode.
- Upon closing the visualization, the original workspace geometry is rendered at an incorrect, reduced scale.
- The simulation result package lacks the project configuration, making it impossible to reconstruct the full context without the original JSON.
Proposed Solutions & Requirements
1. UI State Cleanup (The "Clean Slate" Approach)
- Upon deactivating "View Simulation" mode, the application must perform a full teardown of the visualization layers.
- Requirement: Ensure all temporary scaling matrices or viewport transformations used by the visualizer are cleared.
2. Persistent Scale Normalization
- If the geometry is kept in memory, it must maintain a consistent 1:1 scale with the project coordinates.
- Requirement: Verify if the visualizer is modifying the global
Transformof the geometry objects rather than just the camera/overlay layer.
3. Project-Result Coupling (The "Simulation Package")
- To ensure the geometry and settings are always available, we should treat the simulation result as a self-contained bundle.
- Requirement: Modify the export logic so that the
.jsonproject file is automatically included inside the simulation results ZIP file. - Requirement: When loading an SQLite result, the app should look for the bundled JSON to restore the correct geometry, scale, and environment settings.
Technical Tasks
- Reset Hook: Add a
onExitVisualizationcallback to reset the workspace zoom and scale factors. - ZIP Packer Update: Update the backend/client-side zipping function to include
project_config.json. - Loader Logic: Update the results loader to parse the bundled JSON first to set the scene bounds before overlaying the SQLite data.
Acceptance Criteria
- Closing the visualization returns the user to the editor with the geometry at its original 1:1 scale.
- Every simulation ZIP file contains both the SQLite results and the source JSON.
- Loading a results ZIP in a fresh session correctly reconstructs the project environment.
- Loading a standalone sqlite file should be supported too. Users might just want to visualise some old results not necessarily produced with the app but with jupedsim
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request