Algorithm to add control points in the Deform componet

I am trying to deform multiple-Brep surfaces to fit measured point clouds.
Free-form deformation (FFD), which looks like CageEdit in Rhino, might be useful.
In my understanding of FFD, control points in the Brep surface are moved to obtain an objective Brep.
If there are not enough control points in the surface of a Brep, more control points are needed to fit surfaces with less error.
Deform command in grasshopper automatically add control points to make smooth surfaces according to extent of the deformation.
Then, I would like to know what values given by the algorithm of the Deform command determine the addition of control points.
Thus, I could add by applying rebuild command in U and V properties to the surfaces automatically.
Would you explain this algorithm?

‘Point Deform’ is the component required to move control points of Nurbs surfaces.

You want to move points iterative, this is why you probably should script or use something like Anemone loop.

Ideally your first guess is already a good fit, so you should interpolate the surface (Greville-Points). No function available for this one.It will require scripting and a good understanding of Nurbs (you’ll need something like the “DeBoor” algorithm in reverse, or you use Linear Regression).

You don’t want to rebuild but increase the degree instead. This returns you more control points without changing the shape. You only rebuilt for smoothing out.

And you need a way to smooth in general. it doesn’t make any sense to perfectly fit a surface, if the surface is of bad quality after this operation.

You also need to rematch anything if you deal with multiple surfaces. But this is impossible to do in Grasshopper, unless come up with an own surface matching component. This is where GH and Rhinocommon are really weak.

As you said, you can also Cage deform, but again there is no component and the outcome of this operation might be really bad…

In other words, don’t even try if you think you are missing basic knowledge. If not it will definitely be hard. You are probably faster and cheaper by using specialized commercial applications or you keep doing these things manually…

1 Like

Thank you for your many advices.

Keeping conectivity between surfaces is essential to treat Brep including multiple surace,
as you mention rematch.
I saw that Deform component deforms multiple Breps keeping conectivity during deformation.
In the Help of Deform, it deforms a Geometry using all points in the spatial definition.
I guess the points are control points in case of Brep.
The weight seems to be defined with the inverse distance from the points.
I would like to remodel Breps consisting of more than 100 surface fitting with measured point clouds.
It was successful by using deform component with heuristic approach without position constaints, but it spent so much time.
FFD starts from defined points, it might take less time withoud using heuristic approach.
If deform component just access to control points of breps, how it determines to add control points, also needs to conect breps …