Skip to content

Fix plan view offsets for coordinated IFC models#264

Open
javi-codeworks wants to merge 1 commit into
ThatOpen:masterfrom
javi-codeworks:fix-plan-view-offsets-coordinated-models
Open

Fix plan view offsets for coordinated IFC models#264
javi-codeworks wants to merge 1 commit into
ThatOpen:masterfrom
javi-codeworks:fix-plan-view-offsets-coordinated-models

Conversation

@javi-codeworks

@javi-codeworks javi-codeworks commented May 21, 2026

Copy link
Copy Markdown

Fixes #126.
Also helps #102 by centering plan-view camera moves on the selected model instead of assuming the model is at world origin.

Summary

  • Use the active ifcManager.state.coordinationMatrix for plan/storey elevation offsets when a coordination matrix has been applied to loaded geometry.
  • Center the initial plan-view camera target on the selected model bounds.
  • Reposition the plan camera when switching between models so a second model does not reuse the first model's cached plan target.

Verification

  • npm.cmd install --legacy-peer-deps --ignore-scripts
  • npm.cmd run build --workspace viewer

Jest was attempted with --runInBand --passWithNoTests, but the repo's Jest 27 setup cannot load its TypeScript ESM jest.config.ts under the current npm workspace install. No viewer test files were present.

@agviegas

Copy link
Copy Markdown
Collaborator

Hi @javi-codeworks

We have officially released the new library components on September 20 2023. This library substitutes web-ifc-three and web-ifc-viewer. Both WIV and WIT will remain up, but they will be deprecated and won't be maintained any longer. You can find the new docs here.

All our efforts are going towards components now. The API is very similar, so I strongly suggest you make the leap and start using it. If you still face this issue with it, you can open an issue there and we'll take a look.

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.

Plan view feature: when loading the second model in the viewer it cut it's plans at the wrong offset

3 participants