---
description: This component was programmed by Moritz Heimrath
---

# 3.9.1: Mesh Breps

![Fig. 3.9.1.1: Unified mesh generated from Breps using the “MeshBreps”-component](https://442610158-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MCkDlhlZpqUmakSqOrp%2Fsync%2Fbc4c833188d158c71ed362f822a874a64966ac21.png?generation=1595316044152191\&alt=media)

In Karamba3D the geometry of shells is represented by meshes. Each mesh face corresponds to a finite element. The element nodes determine its connectivity to the other parts of the structure. Thus point-loads, supports, point-masses and the like can only be attached to mesh vertices. When two meshes have common boundaries they need to have identical vertices there in order to be structurally connected.

The **“MeshBreps”**-component ensures the connectedness of meshes generated from multiple breps. It also allows you to define points on those breps where mesh vertices shall result. Fig. 3.9.1.1 shows the unified mesh based on four breps and one predefined point.

{% hint style="info" %}
The "MeshBreps"-component assumes that surfaces to be meshed have a characteristic size larger than 5mm.
{% endhint %}

These input-plugs control mesh generation (see fig. 3.9.1.1):

|                            |                                                                                                                                                                                                                                                                                                                                                                                             |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **"Brep"**                 | List of breps to be joined and meshed                                                                                                                                                                                                                                                                                                                                                       |
| **"IPts"**                 | Points on breps or at their boundaries where mesh vertices shall be generated. If a point’s shortest distance to the nearest brep exceeds 0.00001m it will be discarded.                                                                                                                                                                                                                    |
| **"MRes"**                 | Target size of mesh faces in meter.                                                                                                                                                                                                                                                                                                                                                         |
| **"EdgeRefinementFactor"** | Multiplication factor for **“MRes”** that determines the target edge length of faces at brep-boundaries.                                                                                                                                                                                                                                                                                    |
| **"PointReduction"**       | If “True” vertices in overly dense areas get culled. Such regions may result from a distorted UV-space in the underlying brep. Points closer than half of **“MRes”** to their next neighbor get removed.                                                                                                                                                                                    |
| **"SStep", "SIter"**       | These two parameters let you control mesh relaxation. Triangular finite shell elements give better results when having sides of approximately equal length. The smoothing algorithm tries to improve the mesh in that direction: It moves each vertex towards the center of gravity of those faces it is part of. During mesh relaxation vertices always remain on the brep they belong to. |

The output of the **“MeshBreps”**-component consists of meshes with identical vertices at common boundaries. The output of the **“MeshBreps”**-component consists of meshes with identical vertices at common boundaries. The **“Info”** output-plug provides information regarding the meshing process.

{% hint style="info" %}
Grasshopper has no "Stop"-Button. In case the target mesh resolution (**"MRes"**) is chosen very small the meshing algorithm may take a long time to complete.
{% endhint %}



{% file src="https://442610158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MCkDlhlZpqUmakSqOrp-2335387569%2Fuploads%2F47qgkWcvwNCxTceXvrlQ%2FMeshBreps.gh?alt=media&token=4ac85af6-a979-4594-b555-4509a2963099" %}
