FireDynamics / FireDynamics/fdsvismap

build_obstructions_array() silently erases manually added visual obstructions

Open Beginner friendly
#46 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11
Forks
6
Avg merge
8m
Merged PRs (30d)
4

Description

`build_obstructions_array()` rebuilds `obstructions_array` from `obstructions_collection` and assigns over the old array, so any walls added earlier via `add_visual_obstruction()` are discarded without warning. The implicit contract — build first, add after — holds in the `read_fds_data` flow (which builds last thing) and is now noted in `set_grid`'s docstring on #41, but the method itself neither documents nor preserves manual walls; for a synthetic scene (`obstructions_collection` empty) a stray call wipes everything back to zeros.

Cheapest: a docstring warning on `build_obstructions_array` itself. Better: merge instead of overwrite (`|=` onto the freshly built array), which preserves manual walls in both flows and cannot break existing callers that follow the contract. Found while reviewing #41; pre-existing behaviour, so filed rather than folded in.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating build_obstructions_array() and reading how read_fds_data and set_grid use it, alongside add_visual_obstruction(). Confirm the current rebuild discards manually added walls, then preserve those walls or document the contract as appropriate; verify that synthetic scenes and the existing read_fds_data flow retain their expected obstructions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.