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

fix: Optional categories reset after initial loading in FragmentIfcLoader #269

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions resources/openbim-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -100923,8 +100923,8 @@ class FragmentIfcLoader extends Component {
const before = performance.now();
await this.readIfcFile(data);
await this.readAllGeometries();
await this._geometry.streamAlignment(this._webIfc);
await this._geometry.streamCrossSection(this._webIfc);
this._geometry.streamAlignment(this._webIfc);
this._geometry.streamCrossSection(this._webIfc);
const items = this._geometry.items;
const civItems = this._geometry.CivilItems;
const model = await this._converter.generate(this._webIfc, items, civItems);
Expand Down Expand Up @@ -100994,7 +100994,7 @@ class FragmentIfcLoader extends Component {
async readAllGeometries() {
this._converter.saveIfcCategories(this._webIfc);
// Some categories (like IfcSpace) need to be created explicitly
const optionals = this.settings.optionalCategories;
const optionals = [...this.settings.optionalCategories];
// Force IFC space to be transparent
if (optionals.includes(IFCSPACE)) {
const index = optionals.indexOf(IFCSPACE);
Expand Down
6 changes: 3 additions & 3 deletions src/fragments/FragmentIfcLoader/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ export class FragmentIfcLoader
await this.readIfcFile(data);

await this.readAllGeometries();
await this._geometry.streamAlignment(this._webIfc);
await this._geometry.streamCrossSection(this._webIfc);
this._geometry.streamAlignment(this._webIfc);
this._geometry.streamCrossSection(this._webIfc);

const items = this._geometry.items;
const civItems = this._geometry.CivilItems;
Expand Down Expand Up @@ -221,7 +221,7 @@ export class FragmentIfcLoader
this._converter.saveIfcCategories(this._webIfc);

// Some categories (like IfcSpace) need to be created explicitly
const optionals = this.settings.optionalCategories;
const optionals = [...this.settings.optionalCategories];

// Force IFC space to be transparent
if (optionals.includes(WEBIFC.IFCSPACE)) {
Expand Down
Loading