Display IfcGridAxis
The IFC files have their own grid axes drawn directly in the model. Could we display them as lines (dotted?) with their names as well? I did a test here by exporting them as a separate gltf and displaying the name as CSS2DObject :

const ifcGridLoader = new GLTFLoader();
ifcGridLoader.load("../5-grid/IfcGrid.glb", function (gltf) {
const model = gltf.scene;
model.traverse(function (child) {
if (child instanceof Line) {
const ifcGridAxisName = child.name;
const ifcGridAxisShortName = ifcGridAxisName.substring(
ifcGridAxisName.lastIndexOf("IfcGridAxis") + 11
);
const firstLabel = document.createElement("span");
firstLabel.textContent = ifcGridAxisShortName;
const ifcGridAxisFirstLabel = new CSS2DObject(firstLabel);
ifcGridAxisFirstLabel.position.set(
child.geometry.attributes.position.array[0],
child.geometry.attributes.position.array[1],
child.geometry.attributes.position.array[2]
);
viewer.context.getScene().add(ifcGridAxisFirstLabel);
const secondLabel = document.createElement("span");
secondLabel.textContent = ifcGridAxisShortName;
const ifcGridAxisSecondLabel = new CSS2DObject(secondLabel);
ifcGridAxisSecondLabel.position.set(
child.geometry.attributes.position.array[3],
child.geometry.attributes.position.array[4],
child.geometry.attributes.position.array[5]
);
viewer.context.getScene().add(ifcGridAxisSecondLabel);
}
});
viewer.context.getScene().add(model);
});
The main work to do in web-ifc here is we have no way to get the 2d geomety directly out - we need some functionality to allow us to call GetGometry with an express ID of some 2D element
@beachtom Is there a way to generate 2d geometries (like IfcGrid and IfcAnnotation)? This is a common case that additional infos were placed as annotations in a model. What do you think?
Yeah it should be possible - we just don't expose it to the typescript interface in any way - so it will need some work
@beachtom That would be very nice! Do you have any plans / timeline to do this?
@beachtom Do you have any updates on this? It would be very useful to have 2D geometries available to replace tranditional drawings and extend models with annotations. Thanks a lot!
No update yet I am afraid. There is a need to some some refactoring to expose the 2d geometries - which is in progress - but not ready yet
Thanks a lot for your effort!