NREL / floorspace.js

Other
66 stars 35 forks source link

Floorspace JS Components don't work on duplicated stories #416

Open apope9 opened 1 year ago

apope9 commented 1 year ago

Issue overview

When drawing a building in floorspace JS, components do not get duplicated when you duplicate a story. When attempting to place new components on the duplicated story, nothing shows up/places at all.

Current Behavior

Components are not duplicated when a story is duplicated, and it is impossible to place new components on the duplicated story.

Expected Behavior

Components should be duplicated when a story is duplicated.

Steps to Reproduce

  1. Draw a single story in floorspace JS, with multiple components (windows, doors)
  2. Duplicated that story using the duplicate function.
  3. View the 3d view - and note none of the components were duplicated to the second story.
  4. Attempt to place new components on the second story. None of them will place.

Possible Solution

I don't know...

Details

Environment

Some additional details about your environment for this issue (if relevant):

Context

Especially obnoxious for 3 story multifamily building modeling, because I can't just use the zone multiplier. I have to redraw each space on each story and replace components on each level without using the duplicate story tool. All stories are supposed to be identical. In reality, I should be able to duplicate the first story 2x, then just assign new thermal zones to the top two stories.

THank you to anyone that can help!

tijcolem commented 1 year ago

I think this belongs in the floorspace repo. I am going to transfer this.

macumber commented 9 months ago

Here is the error I see in the console

snapping.js:186  Uncaught TypeError: Cannot read properties of undefined (reading 'v1')
    at m (snapping.js:186:13)
    at a.denormalizeWindowOrDoor (app.eae99d58c421cf9eff1d.js:5636:35)
    at app.eae99d58c421cf9eff1d.js:5587:28
    at Array.map (<anonymous>)
    at a.windowCenterLocs (app.eae99d58c421cf9eff1d.js:5583:11)
    at a.currentComponentTypeLocs (app.eae99d58c421cf9eff1d.js:5620:22)
    at a.componentToSelect (methods.js:85:14)
    at a.highlightComponentToSelect (methods.js:144:28)
    at a.highlightComponentToPlaceOrSelect (methods.js:330:14)
    at a.highlightSnapTarget (methods.js:266:12)