I am new to working with .ifc files in python. What is the best way to create a triangle mesh when I have two arrays - one with vertices and one with faces - in a new .ifc file and how can I do this with python with the ifcopenshell package?
I have searched the documentation endlessly and was not able to find it. I would be very thankful if someone can point me in the right direction.
I want to have a similar script like this but instead of creating a wall I just want to create a triangle surface https://blenderbim.org/docs-python/ifcopenshell-python/code_examples.html#create-a-simple-model-from-scratch. I however have not found the right "ifc_class" with the corresponding parameters for that.
If you're targeting IFC4 (and above) you can use IfcTriangulatedFaceSet which is specifically designed for a triangulated surface such as this.
Here is an example for creating an a triangulated face set with Python and IfcOpenShell (sample data from documentation):
If you need to support IFC2x3 (which doesn't have the above entity), you probably want IfcShellBasedSurfaceModel - a more generalized entity that can perform the same thing.