How to convert mesh into Brep face?

example:A➡B


mesh23.gh (13.4 KB)

Your mesh is pretty messy, but here’s a quick brute force approach (that stills has several triangles):


mesh23_AHD.gh (17.1 KB)

1 Like

Thank you very much! This is a model export from tekla, and I will study how to merge triangles again.

Something like this:
Merging the faces could last an eternity, if there is a lot of them.

 private void RunScript(Mesh x, object y, ref object A)
  {
    var brep = Brep.CreateFromMesh(x, true);
    brep.MergeCoplanarFaces(0.01);
    A = brep;
  }

3 Likes

Better from tekla you can export to sketchup format, then import to rhino as “Trimmed planes”. It will create brep in Rhino.
Sketchup import

There is a process for exporting solids out of Tekla

1 Like

Thank you for your advice. I’ll try it.

Thanks to your algorithm,which solved my problem.
Thank you very much.

1 Like

Thank you for your reply. I’ll try to learn.