Calculate surface deviation after rebuild

Hi,

How would I go about calculating the maximum deviation from a rebuild surface and it’s original in RhinoCommon?
To prevent costly calculations by brute-force sampling the deviations, I’d like to know if there are some mathematical rules that limit the number of points to sample and still get an accurate result.
My first guess would be to sample only the deviations at both the surfaces ControlPoints, but I like to know if that assumption is correct.

Basically I’m looking for a way to get the Maximum deviation as calculated in the The Rebuild command :

image

Thanks -Willem

Hi @Willem,

To show you how this is calculated, I’ll need to add a new helper function to RhinoCommon for SR3.

https://mcneel.myjetbrains.com/youtrack/issue/RH-44517

Once this is in, I’ll post some source code.

– Dale

1 Like

Hi @Willem,

If you install the SR3 RC, you can test this:

https://github.com/mcneel/rhino-developer-samples/blob/6/rhinopython/SampleRebuildSrfDeviation.py

– Dale

1 Like

Thanks Dale, really appreciate your quick update!
-Willem

how can i use this in rhino?

Hi,

I needed it to do automated rebuilds with an efficient way to calculate the deviation after rebuilding.

-Willem

Hi,
I need that script to show me the deviation of a surface that i modified manually. as far as know and see there is not a tool for surface deviation am i wrong?

regards

Hi - you could try and see if the PointDeviation command does what you need.
-wim