Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThreeJSForwardTranslator adds unnecessary RenderingColor objects for AirLoopHVAC #5309

Open
macumber opened this issue Nov 29, 2024 · 0 comments
Labels
Triage Issue needs to be assessed and labeled, further information on reported might be needed

Comments

@macumber
Copy link
Contributor

Issue overview

ThreeJSForwardTranslator adds unnecessary RenderingColor objects for AirLoopHVAC

Current Behavior

ThreeJSForwardTranslator adds new colors for every AirLoopHVAC even if the expected colors already exist.

Expected Behavior

ThreeJSForwardTranslator should only add new RenderingColors if the expected colors do not already exist.

Steps to Reproduce

  1. Call ThreeJSForwardTranslator::modelToThreeJS on a model
  2. Check RenderingColors in the model
  3. Call ThreeJSForwardTranslator::modelToThreeJS on the same model again
  4. Check RenderingColors in the model, note duplicates

Possible Solution

Add code to check if the RenderingColor already exists for the AirLoopHVAC before adding a new object at: https://github.com/NREL/OpenStudio/blob/develop/src/model/ThreeJSForwardTranslator.cpp#L133

Context

Reported at openstudiocoalition/OpenStudioApplication#768

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triage Issue needs to be assessed and labeled, further information on reported might be needed
Projects
None yet
Development

No branches or pull requests

1 participant