Openbim

openbim dictionary

Index

E

F

G

H

L

U

Z

#E

Events

    highlighter.events.select.onHighlight.add((res)=>{
      console.log('click')
      console.log(res)
    })    

    highlighter.events.select.onClear.add(() => {
      console.log('click again')
      propertiesProcessor.cleanPropertiesList()
    })

#F

Fragments Group

data: [expressID: number]: [keys, rels] keys is fragment, rels[0] buildingstoreyID, rels[1] typeID or ifcClass id https://github.com/IFCjs/components/blob/main/src/ifc/ifc-category-map.ts https://github.com/IFCjs/components/blob/main/src/fragments/FragmentClassifier/index.ts#L175-L201 const guid= model.properties[expressID]?.GlobalId?.value

#G

Geometry

you have to get wall geometry similar here: https://github.com/IFCjs/components/blob/main/src/fragments/FragmentHighlighter/index.ts#L459-L505

H

Hihglight selection

There is a method found in FragmentsGroup called getFragmentMap where you can pass a list of expressIDs and then it returns the FragmentIdMap.

const data=model.data
const keyFragments=model.keyFragments
const fragmentElement: FragmentIdMap = {}
for ( const fragID of data[expressID][0] ) {
  const fragmentID = keyFragments[fragID];
  if ( fragmentID ) {
    if ( !fragmentElement[fragmentID] ) fragmentElement[fragmentID] = new Set<string>()
    fragmentElement[fragmentID].add( expressID )
  }

#L

Load model

When model loaded, we ignore geometries in properties https://github.com/IFCjs/components/blob/main/src/ifc/IfcJsonExporter/index.ts#L33.

#U

UI

Drag and drop

const dragAndDrop = new OBC.DragAndDropInput(components, {
  subTitle: "drag a IFC file",
});
components.ui.add(dragAndDrop);

Z

Zoom

const myFragment = fragment;
let _tempMatrix = new Matrix4();
const { instanceID } = myFragment.getInstanceAndBlockID(
        myFragId
    );
myFragment.getInstance(instanceID, _tempMatrix);
const center = [
        _tempMatrix.elements[12],
        _tempMatrix.elements[13],
        _tempMatrix.elements[14]
    ];
OBC_camera.controls.moveTo(center[0], center[1], center[2]);
Written on November 20, 2023