Closed mato5 closed 3 years ago
Hi @mato5, the viewer-sample app does have the ability to view iModels from connect.bentley.com. To help diagnose the issue can you provide a bit more detail on what is not working. Please provide any errors you are receiving in the console.
Hey @granvilj, this is the process we followed in order to get the iModel to the connect.bentley.com:
This is how the app looked after signing-in via the "Use Native OIDC Client" route. :
And this is the error we've encountered shortly afterwards, after clicking on the Fit View button:
@kabentley what do you think calculateFocusCorners
ought to be doing if computeWorldToNpc
produces an undefined map due to non-invertible matrix? Right now it just asserts that will never happen and throws this exception when it does.
@kabentley what do you think
calculateFocusCorners
ought to be doing ifcomputeWorldToNpc
produces an undefined map due to non-invertible matrix? Right now it just asserts that will never happen and throws this exception when it does.
probably we should make computeWorldToNpc
never return undefined
. One of the extents must be zero, I'd guess. How did the view get in this state? Judging by the fact that @mato5 says this was from a fit view
i'm guessing a null project extents. Or, looking at the other image, the viewport size is zero in one or both dimensions. Either way, hardening computeWorldToNpc
won't help, something else will just fail I suspect.
@mato5 I was unable to produce the issue when testing with a couple files I have locally that I ran through the synchronizer. Would you be able to provide the full console log and the network traffic?
Steps are here for logs and here for network if you haven't done it before.
Also, you may want to grep for "name": "authorization"
in the resulting har file from the network info and remove all of the values with a Bearer token before attaching it here.
@mato5 , can you please try to use the latest version of the iTwin Viewer React package (6.0.4) in your app and let us know if it resolves your issue? https://www.npmjs.com/package/@bentley/itwin-viewer-react/v/6.0.4
We've just updated the iTwin Viewer package as the @kckst8 suggested and tested it with 2 different iModels. First iModel was the one we used earlier and the issue persisted. The second iModel was a different one and it worked correctly. It works with iModel created in OpenRail Designer CE 10.09 with "Metric Standards" Workspace delivered with program installation. Problem persists with iModel created in OpenRoads Designer CE 10.09 with "CZ Standards" Workspace active and with DGN created in local Slovak coordinates, which means that all model is located in III. quadrant (-x, -y).
Could this be the root of our problem?
It seems like there may be an issue with one of your models, yes. Perhaps try to re-synchronize your data?
closing due to no further updates
Hey,
this is not really an issue but a feature-related question. There are 2 different projects/iModels that I work with, one created through the itwinjs.org portal and the other one created by iTwin Synchronizer and uploaded to connect.bentley.com portal. However, I am unable to view the iModel from the connect.bentley.com vie the viewer-sample app provided in this repository. I've changed the iModel GUID and Context GUID in the .env file to open this iModel. When I tried to open the Project/iModel created through itwinjs.org, everything worked correctly. So my question is whether it's possible to view projects/iModels created through connect.bentley.com portal.
Best regards