opensourceBIM / BIMsurfer

The latest version of the BIM Surfer WebGL viewer for IFC
MIT License
382 stars 132 forks source link

Rotate model to specific face #69

Closed TitouanGisle closed 10 months ago

TitouanGisle commented 4 years ago

Hello !

I have been looking into the code for a few hours now trying to find a way to display the model with a specific side facing the camera. (top side, left side, and so on)

All my attempts have been unsuccessful so far, so I turn to you, hoping that you might have a hint.

I have tried with bimserverViewer.viewer.camera.viewFit(), and applied all kind of transformation to the bounding box it takes as a parameter, but it doesn't do the trick.

Do I have to manually calculate the camera's position according to the model's face ? If so, do you know how to get the model's faces ?

Thanks for your consideration !

saadaiforsite commented 10 months ago

hi @TitouanGisle , how were you able to use bimserverViewer.viewer.camera.viewFit() i have been trying but it says its not a function. can you share some relevant code. thanks

TitouanGisle commented 10 months ago

Hi ! We've stopped using BIMsurfer around 4 years ago, so I'm afraid I can't help you. Best of luck.