I am interested in extracting coordinates from an IFC model, like WALL coordinates (in python) and/or at least some geometry and later use them in cgal library (python version). (I'm newbie to ifcopenshell package and ifc format).
Does someone know how to do that? I have started wit this code:
import ifcopenshell as ifc
from ifcopenshell import geom
file = ifc.open("/home/myIFC.ifc")
settings = geom.settings()
settings.set(settings.USE_PYTHON_OPENCASCADE, True)
# Get a list of all walls in the file
walls = file.by_type("IfcWall")
# Create a list of wall representation shapes
wall_shapes = []
for wall in walls:
shape = geom.create_shape(settings, wall).geometry
wall_shapes.append((wall, shape))
geom.utils.display_shape(shape) # Line does not work: Got an error: AttributeError: 'NoneType' object has no attribute 'DisplayShape'
Maybe it is not a proper way to do this, I really hope someone could help me.
This is the structure of my model.
Thank you!