Finding the lowest and highest points in a surface

I have got a terrain model in rhino and i want to exactly locate the lowest and highest point in the terrain to act as reference points but i cant seem to be able to do that.
I have tried using bounding box to locate the points but it is of no use.
Can someone help me out?

Why not? If you use Intersect between the bounding box and the terrain surface/mesh, you should get points at the highest and lowest spots.

Using intersect between meshes/surfaces should create a curve or it might just fail unless the BB is scaled smaller? Anyways alternative method could be populating the lowest and highest surfaces with points and with mesh/brep closest point find the points with least distance, this method might lose some accuracy but should be pretty bulletproof and doesn’t require C#/python knowledge.

Why should it fail? There should be an intersection within tolerance with the bounding box, that’s what its purpose is. With a mesh, the most likely result will be points - with a NURBS surface probably some small curves. This also appears to be a basic Rhino question, not scripting or Grasshopper.

I’ve had several inexplainable failures of different intersections and boolean operations in GH. Guess it could usually be because of document tolerances or overlapping surfaces, either way I wouldn’t trust finding an intersection between a surface/mesh and it’s default BB :o

Sending us the file might help if GH cannot find a bounding box.

Is the object a long distance from 0,0,0? Is the object quite large? What are the units? The tolerance?

Does running the boundingbox command in Rhino over the object return a result?

Site1.3dm (471.3 KB)
The site is small and is located just above the origin
There’s not much difference in contour levels
Units are in feet
Tolerance is 0.01 units

Exactly!!
It usually generates the box a little above the surface or below it
In my case it generated a little above the lowest point and instead of getting an exact point or a small portion, it gave a large circle which is not ideal for calculating the exact height difference.
I don’t know why it does that but is there some way around it?

This looks like it’s depending on both the file tolerance (expected) as well as the mesh settings of the surface - which it shouldn’t actually, but I think that is how BoundingBox may work in this case. If you set the file tolerance to 0.001 and much finer mesh settings, you will get a more accurate bounding box. @scottd this case should probably be looked at…

Intersect will then give you two intersections, both closed curves. You can probably just use the curve centroids for the highest and lowest points.

Site1-msh.3dm (1.2 MB)

image

That will do for now!
Thanks!

I cranked the tolerance in the file down from 0.01 feet down to 0.0001 . If you are looking for accruacy, tolerance needs to be atleast 10x smaller then the smallest value you are concerned about. This is a very important setting.

I get a low point of -24.72445,-148.28142,2.32116 feet.
I get a high point of -395.01510,-39.29044,11.17853 feet

Is that about what you expect?

Site1-msh_sd.3dm (1.2 MB)

You cannot evaluate the accruacy of the values based on the display of the intersection between the Shaded surface and the line intersection. The shading and linework for display is done by the GPU on the video card and it limited Zbuffer capabilities.

Many Zbuffers have a limited 256 layers to display front and back objects.

You can look at the bounding box linework in elevation compared to the high point of the bounding box.

The real key is to use a good Tolerance, bounding box and extract the exact point location gets you what you need.

This solution is based on Rhino 7. First draw flat, horizontal surface above (or below) your curved surface.

Next run PointDeviation command between these surfaces.
PointDeviation

Next use minimum and maximum distance from this command to draw two more flat surfaces: one slightly below your curved surface, the other slightly above your curved surface.

Finally, use Clash command to find the lowest and highest points.

Yep, but you used my file with the mesh settings cranked up for your example. Try it on the original with your higher tolerances but the mesh settings as they were in the original… There will be a difference of 3/4" between the lower curve centroid and the actual surface. The original file tolerance was 0.01 feet = 0.12" so it’s already greater than that. The new file tolerance is 100x less, or around 1/1000th of an inch, and it’s still out by 3/4". That is the problem. It’s mesh setting reliant.

Thanks !

Yep !
Thanks !

Have you tried with Grasshopper?

@scottd - did you test this at all?

I simply take the surface and run BoundingBox on it. I get a max height of 11.178533’ and a min of 2.388637’

What is the right answer supposed to be?

Still not real clear what a mesh has to do with it?

The right answer is that the calculation of the bounding box is mesh setting dependent, as per my previous post with detailed instructions how to test. This is a bug IMO. You used my file with the mesh settings already changed for your calculation, not the OP’s.