3

我有兴趣从 IFC 模型中提取坐标,例如WALL 坐标(在 python 中)和/或至少一些几何图形,然后在 cgal 库(python 版本)中使用它们。(我是 ifcopenshell 包和 ifc 格式的新手)。

有人知道该怎么做吗?我已经开始使用这段代码:

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'

也许这不是一个正确的方法,我真的希望有人能帮助我。

这是我的模型的结构。

在此处输入图像描述

谢谢!

4

0 回答 0