Mesh brep per face with matching borders

hi there,

I would like to mesh each face in a brep so that vertices at borders align with the neighboring mesh.
As far as I know Rhino/GH only allows to mesh a brep/polysurface as a whole, resulting in one mesh that spans across all faces of the brep.
Or mesh each brep individually, but mesh borders won’t align to each other.

Now I think that Trimesh may be able to help here, but that doesn’t allow for adaptive polygon size.

Here is my attempt at unwelding and exploding a mesh based on the surface border of the original brep face, but that fails at corners:

gh file: (108.6 KB)

Another issue is the division along the curve, which will need to be smaller than the smallest edge length of the mesh.

Geometry I’m dealing with is similar to the one in the gh file: one main large face with kind of a fillet all around.

I’m happy for any input on this as I’m a bit lost right now.


Hi @Bernd_Möller

Cull mesh faces can help you here. (95.5 KB)

1 Like

2023-06-23_mesh_brep Edited (98.7 KB)

1 Like

@Erik_Beeren thanks, cull mesh faces does help here, not sure why I didn’t think of that. I ended up checking the distance of the vertices as I ran into the following issue where faces are culled that shouldn’t be and small faces aren’t culled that should be:

gh file with both: (77.3 KB)

@Quan_Li thank you, also a good aproach, though I need to deal with curves surfaces as well.

The Mesh.CreateFromBrep method outputs an array of meshes, one per surface


and you can add the meshing settings like this (73.2 KB)


Great, I can’t thank you enough for this!

1 Like