Display IFCGRID in 3D view
Description 📝
Right now we can see geometries and alignments. It would be awesome to be able to display IFCGRIDs.
Suggested solution 💡
Generate the IFCGRID geometry in the IFCLoader code.
Alternative ⛕
No response
Additional context ☝️
No response
Validations ✅
- [X] Read the docs.
- [X] Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.
@agviegas,
Awesome that feature request is considered. This will help to explore the building and measure the orientation of the elements visually. Looking forward to seeing the IfcGrid in the viewer.
Is there any way to build out this functionality ourselves? Building out elements within That Open viewer with visual references would greatly benefit the AEC ecosystem!
@emmyxth Yep! Our libraries allow to read all IFC data. So you need to:
- Get an IFC with a grid
- Open the IFC with a text editor and see how the grid is expressed
- Think of a strategy to build it with Three.js geometries
- Do it
We'd love to view IfcGrid/IfcGridAxis elements in the viewer too. We'd be keen to support building out this feature as well!
@emmyxth - have you made any progress building out this functionality? If yes, is there anything we could support? @agviegas - to support these elements, do we need to make changes in web-ifc related to 2d geometry as well? Noting that there's an open issue that appears to be related to handling IfcGridAxis elements here: https://github.com/ThatOpen/engine_web-ifc/issues/386
@jenessaman the grid is fundamentally different to a mesh, so it can't be handled just like the rest of IFC objects. IMO we should approach this problem the same way we approached civil alignments. That is, create a specific function (e.g. getIfcGrid) that returns the geometry buffer necessary to build the grid in 3D
Hey again @agviegas!
I am trying to take a quick stab at this and made some progress. I am able to load the IFC grid lines at their local coordinate system position but am still trying to wrap my head around PlacementRelTo. I believe I need to walk the entire relative placement chain to calculate the true world coordinates of the grid lines. After this step I can use gridGeometry.applyMatrix4(model.coordinationMatrix); to align with my model since I am also using COORDINATE_TO_ORIGIN = true.
So my questions are:
- Does this seem like a reasonable approach?
- Is there a more efficient way to map elements from their local to world positions? For example, IFCOpenShell provides the option USE_WORLD_COORDS to avoid walking the entire relative placement chain. This might be more of a question for ThatOpen/engine_web-ifc.
- Can you point me to any code that does this remapping?
This is the state when drawing the grid lines in their local coordinate system while COORDINATE_TO_ORIGIN = true:
Models that don't have any relative placements seems to map correctly just by using gridGeometry.applyMatrix4(model.coordinationMatrix); such as:
Thanks!
I think I sorted out how to extract the world coordinates. The 2nd model is still causing issues though.
2 sets of grids with different z heights (they were originally rendering on-top of another prior to applying the relative transforms):
Apologies for the spam but I got it resolved at least for grids composed of polylines.
Hey @alfarok fantastic progress! I think you already answered some of your own questions. Is there anything I can help you with?
All set on this topic, thank again!