ThatOpen / web-ifc-three

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

Highlighting IfcSpace. #46

Closed hellok-coder closed 2 years ago

hellok-coder commented 3 years ago

Hi !
Can you highlight IfcSpace? If yes, is there any way? I got all the expressIDs of IfcSpace in the working model.

hellok-coder commented 3 years ago

Hi !!! Have you considered this issue? thank you.

agviegas commented 3 years ago

On it! Sorry, it's been a busy week. Will try to get my hands on this tomorrow!

hellok-coder commented 3 years ago

The following operations were performed to highlight IfcSpace. 0002

0003 However, the following error occurred. 0001

hellok-coder commented 3 years ago

Pilot project 3.zip This is my test file.

harrycollin commented 3 years ago

The following operations were performed to highlight IfcSpace. 0002

0003 However, the following error occurred. 0001

The error here is a duplicate of https://github.com/IFCjs/web-ifc-three/issues/53

agviegas commented 2 years ago

Hi, this should be solved from 0.0.72 or newer:

const spaces = await this.ifcLoader.ifcManager.getAllItemsOfType(0, IFCSPACE, false);
console.log('Captured spaces: ', spaces);
this.ifcLoader.ifcManager.createSubset({
  modelID: 0,
  ids: spaces,
  scene: this.scene,
  removePrevious: true,
  material: new MeshLambertMaterial({transparent: true, depthTest: false, opacity: 0.2, color: 0xff00ff})
});

image

agviegas commented 2 years ago

Please, let us know if you fave any issues with this! Sorry for the delay.