# How to Create a Solid with Thickness from consecutive geological layers using IfcOpenShell

Dear all,

I'm currently working on creating a solid representation from consecutive geological layers. Each layer is represented by its vertices and faces, which I've already defined as meshes using IfcOpenShell:

```
representation_layer1 = run(
"geometry.add_mesh_representation",
model,
context=body,
vertices=vertices_layer1,
faces=faces_layer1,
edges=[[]],
)
```

I want to fill the voids between these layers. How to create vertical faces (sides) between the adjusted vertices of consecutive layers to close the sides of the solid?

And How to combine these layers into a single solid entity?

Any idea on implementing this using IfcOpenShell would be greatly appreciated!

Best regards

Ahmed

Tagged:

## Comments

IfcOpenShell may be used to create a thick solid from successive geological layers by iterating through each layer, suitably offsetting its geometry, and then integrating these offset geometries into a solid. This procedure guarantees that layered structures in geological modeling are accurately represented.

Fm Whatsapp

What's the point in copy/pasting a tautology from chatGPT ? Begs the question :)

Topologically you can detect the outside edges since they are the only edges that are connected to excactly one face, provided you mesh was constructed with no holes, which it seems it wasn't. It's much easier if your layers contain the same number of vertices and faces and they were constructed the same way, ie vertex index 0 is at the same XY location for every layer, etc. then you just have to create triangle between layer n-vertex 0, layer n-vertex 1, layer n+1-vertex 0, and another with layer n-vertex 1, layer n+1-vertex 0, layer n+1-vertex 1, etc.

Or you can import the meshes into Blender using the BlenderBIM addon, select and join the objects with CTRL + J, select the outer edge ring with ALT + Left click, SHIFT + ALT + leftclick the next layer edge ring and F3 > Bridge edge loops :) However this will creater a non-manifold object (with inside faces) which may yields artifacts when rendering the mesh. So you might want to duplicate every layer, join every layer with its N+1 and bridge every pair to create only manifold meshes.