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

bug(viewer): Top and Bottom viewpoints cannot determine the view orientation for Top or Bottom views. #1404

Open
5 tasks done
jsdbroughton opened this issue Feb 22, 2023 · 0 comments
Labels
bug Something isn't working [ viewer ] issues related to the 3d viewer package

Comments

@jsdbroughton
Copy link
Contributor

jsdbroughton commented Feb 22, 2023

Prerequisites

What package are you referring to?

Viewer

Describe the bug

Viewpoints are included with a commit as Objects.BuiltElements.View: Objects.BuiltElements.View3D. These are correctly found and displayed as additional views to the canonical views.

image

In most cases, these can be correctly replicated to the viewer, assuming that model geometry describes what should be up in the viewer and that the origin and target properties are sufficient to present the view to the user.

Sending viewpoints that are directly down (Top) or directly up (Bottom) where the only difference between origin and target is a different Z property leaves the orientation of the model in the viewer indeterminate. No account is taken by the viewer of the forwardDirection or the upDirection properties of the View3D class, even when these are set.

To Reproduce

  1. Commit includes 2 View3D objects with matching origin and target properties. img width="646" alt="Screenshot_20230222_134529" src="https://user-images.githubusercontent.com/760691/220638800-a50799f8-a30c-4c0a-971d-3a5fa41257e4.png">
  2. Each View3D has a different forwardDirection and upDirection vector. image
  3. Selecting these views in turn will have no difference when selected in the frontend. Or will display at undetermined rotations if looked at in separate browser sessions.image

Expected behavior

The viewer should rotate the model to the orientation sent in the View3D

Proposed Solution (if any)

If a forward and up vector are included, the viewer should use these to determine view orientation where the forward direction vector is X:#, Y:#, Z:(-)1

Test commits

A - https://speckle.xyz/streams/7ce9010d71/commits/afda4ffdf8
B - https://speckle.xyz/streams/7ce9010d71/commits/acad1bd506

@jsdbroughton jsdbroughton added bug Something isn't working [ viewer ] issues related to the 3d viewer package labels Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working [ viewer ] issues related to the 3d viewer package
Projects
None yet
Development

No branches or pull requests

1 participant