# Topography from curves/points

Hello,
i have made a topo surface out of curves, but i find it extremely heavy with patch - is there a lighter way to make this surface without making it less accurate?
topo site_ex.gh (326.1 KB)
also, does someone knows how i can make out of the same curves / the surface made of the curves, the topography as horizontal slices??

Just spotted that one. Iâ€™ll give you a brief description upon how to attempt to do that (2000 pts in less than 20 ms using a standard - on purpose - ultra slow I5).

1. Assume that you have these blue rnd points (either from topo crvs or just pts on a given Surface).

2. Then using user defined x/yRes values do that (i.e. â€śpizelizeâ€ť your points thus ending in a flat 2 dim Tree (the centers of the shown Rectangles) - this should use nullable Point3d Type where null indicates a void : a Rectangle that does not contain any point) :

3. For each null pos in the 2 dim Tree get the center of the imaginary Rectangle and the first non null N/E/S/W neighbor pts. Then interpolate that center using these (classic weighting etc). Thus you end -up in a x/y grid in space where all positions are occupied from points (i.e. the existed â€śroundedâ€ť ones [step2] and the new interpolated ones).

A Plan view:

A Perspective one:

1. Then the rest are elementary (shown a Mesh and a Nurbs result).

PS: While the shown are strictly internal I could provide a C# for the interpolation job.

3 Likes

Hi, thank you Peter.
i would love a C#

As I said the C# combo that does the job is strictly internal.

Anyway: this simple C# is about interpolating (using â€śweightsâ€ť so to speak).

BTW: 1 to 10 what is your C# level ? (including dealing with Classes, thread safe Parallel, Matrix ops, P/LINQ etc etc)

BTW: The general case of this (any boundary [or no boundary ] + holes) is using [case: no boundary crvs] a Concave (not Convex) Hull algo and some other rather tricky stuff to find the terrain limits.

No boundary + pts (result: Nurbs solid):

Boundary + pts (result: Nurbs solid):

Pfff i would say 3, not a big C# expertâ€¦

My system crashes with your file, but a conventional and relatively fast method is to subdivide the contour curves and mesh the resulting points using Delaunay triangulation. Since your contours are actually polylines, you can get their vertices without â€ślosingâ€ť any accuracy. You can also remesh the result to get a nicer looking/smoother mesh, but this does not add model accuracy (edit: one can also preserve features in this step e.g. points/curves, see last image). You can also trim/split/cull the result to whatever you need (in my example I just cull faces outside a boundary curve, but you can also e.g. trim the mesh in Rhino):

230327_TopographyFromPolylines.gh (331.5 KB)

I extracted the curves and ran it through TerrainMesh (you can find my plugin in the PackageManager) and it completed the task in 2.2 sec:

I have a grasshopper version of it too that will make it into the next release, but for now you have to use the static command.

2 Likes

I meshed it with the default setting of 1 point per unit(meter)

and after that if you need a light mesh you can use ReduceMesh to get a great and light result. Here reduced with 90% (which will loose details of course, but sometimes light weight is more important)

Or you can use 10 as the sample value:

2 Likes

Hi Thank you, that is great!

Hi, Thank you very much,
when trying to install it from food 4 rhino, i get an error message, saying rhino should be install on the computer.
i have rhino 6, can it be the reason??

1 Like

Is that using Delaunay triangulation? I missed this plugin, itâ€™s great to have an option like this for our design teams that donâ€™t want to use Grasshopper/scripts

1 Like

Well â€¦ @#@# happens as they say.

BTW: the Rule N1 in our trade is: donâ€™t fire all your bullets at once. Having this in mind see attached (d does an â€śelevationâ€ť for vis purposes if your contours are rather flatish). Smallest Box is using a very naive Method â€¦ but we live in naive Times anyway.

BTW: Del Mesh algo is written for flat (or flatish) collections. Meaning: avoid using it for Grand Canyon (or for Everest or when in Mars).

Ah, yes, I guess this only works for Rhino 7. Sorry about that.

Yes, it is Delaunay, or 2.5D as it is loosely called. (For those who wonder: It calculates the mesh in 2D space and then adds the Z value after. The plane it uses for 2D does not need to be World XY, but it needs to be a plane, TerrainMesh use the XY plane, this was added in the last update)

1 Like