Hi there,
I’m trying to access all the faces of an IFC model loaded in SketchUp. I want to retrieve (through Ruby) their coordinates exactly as they are displayed in the viewer, no matter what transformation happened.
To do so, I go through all entities of a model looking for the Sketchup::Face ones. I am aware of the required successive transformations of the faces based on the ComponentInstance/Group that they belong to. So for each of them, I go down to it’s root ComponentDefinition.
This is where things get funny. While this seems to work fine for other input formats, for IFC things go wrong, specifically for the IfcFurnishingElement entities (I tried a few IFC2x3 files, same issue). I took 2 top view images (with the model in green and the points of the retrieved faces in orange) to illustrate the cases where I apply the successive transformations (with-transformation hosted at ImgBB — ImgBB) and the one I don’t (Without_transformation hosted at ImgBB — ImgBB).
When there is no transformation applied, all the shapes are concentrated around the origin (expected because IFC entities have their own local coordinates and need to be placed in a the global coordinate ref of the model itself, which SketchUp is already doing as everything is in place in the input model). But when the transformations are applied, all the points of the model are at the right place, except for the furnishing elements.
What am I missing here? Looks like there is transformation bit that I am missing on those specific entities.