Generating approximate surface from discrete measurement points

Hey amazing Grasshopper gurus. I’m trying to automate building a surface from a few discrete measurment points. The surface is fairly organic but it isn’t possible to scan it when it is in full application. However, we will be able to take measurements from an external surface. I’m having trouble building a smooth surface from these points in space. The example code below is the only method that I can think of pulling the control points of an approximate surface to these measured points however, this leaves the surface bumpy and inconsistent (comparing to the actual sample scaned surface).

Is there a better way of generating a surface from distinct points? The current method produces a faceted surface and when smoothing the surface then shrinks really distorting it from the actual surface. Is there a way of 1: creating a surface from splines generated by these points. I’m hoping that this could produce a smooth transition between these points best matching the true surface. 2: a better method of smoothing a surface. In my head the measurementment points should always stay in place but I can’t find a smoothing method that will lock those parts of the surface in place. Every method I have used causes the surface to shrink and thus deviating from the measurement points in the first place.

Any help you can provide on this would be great. Thanks.

Surface Approximation (4.1 MB)

program is written to provide visual comparison to actual surface. The multicolored surface represents how far the “generated” surface is from the actual surface geom. You can change the sample points on the surface by setting new points in the “Sample Points” Point collector by right clicking. The flattened red surface is where you would input these points as an approximation of these samples.