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

fix(createFaceFromPoints): fix calculating intersectedFaces #364

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

macintoshpie
Copy link

I found an issue in loading an exported floorplan (see file Performance Degradation.json in this thread #348 ).
It throws the following exception:

TypeError: coords[0] is undefinedapp.js line 726 > eval:61:7
    toTurfPoly http://localhost:8080/app.js line 726 > eval:61
    setOperation http://localhost:8080/app.js line 726 > eval:274
    intersection http://localhost:8080/app.js line 726 > eval:295
    intersectedFaces http://localhost:8080/app.js line 2784 > eval:122
    filter self-hosted:318
    newGeometriesOfOverlappedFaces http://localhost:8080/app.js line 2784 > eval:121
    createFaceFromPoints http://localhost:8080/app.js line 2784 > eval:94
    wrappedActionHandler http://localhost:8080/app.js line 768 > eval:706
    dispatch http://localhost:8080/app.js line 768 > eval:428
    boundDispatch http://localhost:8080/app.js line 768 > eval:334
    overrideDispatch http://localhost:8080/app.js line 2868 > eval:94
    saveRectangularFace http://localhost:8080/app.js line 2736 > eval:487
    boundFn http://localhost:8080/app.js line 606 > eval:191
    addPoint http://localhost:8080/app.js line 2736 > eval:235
    boundFn http://localhost:8080/app.js line 606 > eval:191
    gridClicked http://localhost:8080/app.js line 2736 > eval:64
    boundFn http://localhost:8080/app.js line 606 > eval:189
    contextListener http://localhost:8080/app.js line 1026 > eval:124

Steps to replicate:

  • Run most recent version of floorspace.js (dev server or build for production)
  • Load the Performance Degredation.json file
  • Click "+" to create a new space, then click somewhere on map to create it

For some reason this model has some faces with no vertices, so we need to check if that's the case and skip it if so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant