vinipdiass / ITwin

0 stars 0 forks source link

Imodels are hidden #1

Open linasburneika opened 9 months ago

linasburneika commented 9 months ago

Hi, you have a copy/paste code which explicitly hides imodel geometry. Please remove this line from GlobalDisplayApp.tsx

viewport.view.modelSelector.models.clear()

https://github.com/vinipdiass/ITwin3/blob/54acda62f454db63af09aeb35ef20bcf15520121/src/GlobalDisplayApp.tsx#L26C1-L26C52

vinipdiass commented 9 months ago

Thank you so much!

vinipdiass commented 9 months ago

Sorry to bother you again, but can you test it with that last commit? We did erase that if statement, but it still doesn't work

linasburneika commented 9 months ago

Hi I pulled your latest changes, I can clearly see the recycle bins

image

linasburneika commented 9 months ago

Oh I see now, I also removed the line in the viewer setup:

viewportOptions={viewportOptions}

vinipdiass commented 9 months ago

Thanks! Now that i removed that line i can also see them! Thank you so much :)

linasburneika commented 9 months ago

The reason is that viewportOptions returns a GlobalDisplayApi.getInitialView(iModelConnection), which is very specific to imodel from Bentley samples. It has hardcoded view coordinates and model ids, which are different than those in your iModel.

Basically you don't need to have GlobalDisplayApi.getInitialView, unless you want to fine tune the initial view