Skip to content

Commit

Permalink
fix: Optional categories reset after initial loading in FragmentIfcLo…
Browse files Browse the repository at this point in the history
…ader (#269)
  • Loading branch information
HoyosJuan authored Jan 17, 2024
1 parent 8997b2a commit 29313fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit 29313fb

Please sign in to comment.