I am trying to get the location of the different elements I have in an IFC file.
Once I get the element I want (i.e wall, slab, column, etc), I think that the placement/location is coming using element->ObjectPlacement(), is that right? (I am checking if it has an object placement before hand, just in case)
in case that is ok (which seems it is as I can print the data inside the IfcObjectPlacement and looks like the data I need), how do I get the data inside it?
the print of the object placement returns a #818=IfcLocalPlacement(#149,#817) , which is the data I want, but then when I want to access to data inside #818, I cannot get anything.
inside IfcObjectPlacement I can only access objectPlacement->PlacesObject() and objectPlacement->ReferencedByPlacements(). The later returns a list of size 0, and the first one returns a list with 1 element which is the original element (a wall in this case #847=IfcWall('1JMjYabfzCH9po57TAAhNT',#42,'Wall1',$,'Basic Wall:Wall-Ext_102Bwk-75Ins-100LBlk-12P',#818,#843,'320381',.NOTDEFINED.) )
I tried to cast the data using the .as<> method into a local placement, axis2placement2d, axis2placement3d, gridplacement, but all of those casts fail so I cannot get the data.
I tried with other elements in the IFC, just in case this one was generated wronly, but no luck.
Can you tell me if I have a problem in the IFC file, or I am doing something wrong to access the data I want to get?
I am trying to get the location of the different elements I have in an IFC file.
Once I get the element I want (i.e wall, slab, column, etc), I think that the placement/location is coming using
element->ObjectPlacement(), is that right? (I am checking if it has an object placement before hand, just in case)in case that is ok (which seems it is as I can print the data inside the
IfcObjectPlacementand looks like the data I need), how do I get the data inside it?the print of the object placement returns a #818=IfcLocalPlacement(#149,#817) , which is the data I want, but then when I want to access to data inside
#818, I cannot get anything.inside
IfcObjectPlacementI can only accessobjectPlacement->PlacesObject()andobjectPlacement->ReferencedByPlacements(). The later returns a list of size 0, and the first one returns a list with 1 element which is the original element (a wall in this case #847=IfcWall('1JMjYabfzCH9po57TAAhNT',#42,'Wall1',$,'Basic Wall:Wall-Ext_102Bwk-75Ins-100LBlk-12P',#818,#843,'320381',.NOTDEFINED.) )I tried to cast the data using the
.as<>method into a local placement, axis2placement2d, axis2placement3d, gridplacement, but all of those casts fail so I cannot get the data.I tried with other elements in the IFC, just in case this one was generated wronly, but no luck.
Can you tell me if I have a problem in the IFC file, or I am doing something wrong to access the data I want to get?