ThatOpen / web-ifc-three

The official IFC Loader for Three.js.
https://ifcjs.github.io/info/
MIT License
506 stars 132 forks source link

Subset does not have any children. #151

Open ThomasvanHoutum opened 1 year ago

ThomasvanHoutum commented 1 year ago

I am working in a Vue 3 project with IFCjs. Whenever I create a new subset, it does not add the given ID's under the subset. When I log the ID's it gives me the right expressID's from that category, and the category is also correct.

createSubsetOfType: async function (category) {
      const ids = await this.getAllIDs(category);
      console.log("IDs for category: " + category + "\n" + ids);
      let scene = this.IFCManager.scene;
      let customID = this.getName(category);
      let subset = this.IFCManager.ifcLoader.ifcManager.createSubset({
        modelID: 0,
        scene,
        ids,
        removePrevious: true,
        customID,
      });
      subset.name = this.getName(category);
      console.log(subset);
      return subset;
    },

    getAllIDs: async function (category) {
      return this.IFCManager.ifcLoader.ifcManager.getAllItemsOfType(0, category, false);
    },

When I log the subset, it is complete except for the fact that it has nothing under it. The parent and type are all correct.