Convert mesh (terrain) into surface

Hello.

Does anybody know how to convert this mesh (with its particular shape) into a surface?
MeshToSurface.gh (7.0 MB)

Hi,

would something like this work? To be honest the surface becomes really heavy and slow
 Maybe there are better ways to do it :sweat_smile:.

MeshToSurface.gh (7.0 MB)

Impossible to work with such amount of data. I have tried to extude it and it is still working after 10 minutes. Thanks anyways!

Any other approach?

That mesh has half a million faces! (469 K) It’s also far from the origin, which can cause problems.

You can sample it at lower resolution, if that’s what you want? Many examples on this forum.


MeshToSurface_2024Feb5b.gh (7.1 MB)

But why extrude it? You can project the edges to a plane to create sides and bottom, making an enclosed volume with the terrain on top. Mesh will be faster than NURBS though.


MeshToSurface_2024Feb5a.gh (6.4 KB)
(without mesh)

Because there’s a minimum spacing of 10 units in your terrain, you can divide the longest edge of your untrimmed boundary, which is close to 7,000 units, by that amount (10), then perform a trick similar to what Joseph shows you to form a surface grid. Your computer will either crash or take forever.

I know it’s a GH question
nonetheless, the Drape command in Rhino, with a spacing of 700 for both U and V, will give you a surface, which you can then trim to the boundaries of your mesh:

It’ll be faster because Rhino will tap into more computer power.

Real advice, don’t do it, stick to meshes, they can be lovable :laughing:

3 Likes

terrainsrf.3dm (14.3 MB)

Thanks. But I would like to preserve the original resolution.

Mesh union, intersection and difference operations don’t work perfect. I find more troubles than operating with solids (breps)

Thanks René!

1 Like

MeshToSurface_2024Feb5a.gh does preserve the original resolution. I removed your mesh only to avoid posting another HUGE file. Copy / paste the mesh param from your original file into my version ‘Feb5a’ and it will use it to create the volume below.

I mean I would like to preserve the resolution while obtaining a surface.

Not gonna happen. You can convert the mesh face boundaries to surfaces and join them to get a polysurface that preserves resolution, but a polysurface is not a surface.

Or you can play games with the original mesh vertices (235440 of them!) but if you look closely, they are not a consistent grid.

By some very careful analysis I have determined that when the mesh vertices do form a consistent grid, they are 10 units apart when projected to the XY plane. So values of U=693 and V=478, version ‘Feb5b’ will give you a surface with the same resolution. Attached as MeshToSurface_2024Feb6b.gh.
MeshToSurface_2024Feb6b.gh (7.0 MB)

How did you do that?

Drape command in Rhino.

Would be interesting to know which method comes closest to the mesh, which is an approximation anyway. I’ll take a wild guess that the difference is negligible between sampling the mesh at different “resolutions” beyond a certain point.

1 Like

Right - and we’d be chasing our tail(s) too? I wanted to implement contouring and attempt to ensure true ‘fidelity’ using the “10 x 10” grid, but it eventually ‘shifts’ in some areas:


Lol, maybe double the resolution so the surface gets monstrous :laughing:

I say your Feb6 method is fine, or go manual

There is a combination of version ‘Feb5a’, which produced a mesh, and version ‘Feb6b’ which produced a SrfGrid (Surface From Points). Like ‘Feb6b’, this version uses SrfGrid and like ‘Feb5a’, this version produces an enclosed volume, a ‘Closed Brep’ here instead of a mesh.

It does it by projecting an offset curve (slightly smaller) onto the SrfGrid and splitting it, then joining lofted sides and a bottom. And like ‘Feb6b’, this is at maximum resolution.


MeshToSurface_2024Feb7a.gh (7.1 MB)

P.S. FYI, I internalized the ‘Closed Brep’ and right-clicked the mesh to “Clear values”, then saved the file. It is only 2.36 MB without the mesh instead of 7.1 MB with the mesh!