Gordon NURBS Surface node
Created by: portnov
Also known as "surface from net of curves". We have a number of curves along U direction, another number of curves along V, they are intersecting at some number of points. Discussed in #3571 (closed).
Algorithm is looking very simple:
- Find intersection points of each of M U-Curves with each of N V-Curves, to have MxN intersection points. I expect this to be the trickiest part. In many cases the curves will just pass near one another at very small distance instead of intersecting. First idea how to do this is to use solvers from scipy, similar to how it is implemented in existing "intersect *" nodes.
- Build Nurbs surface L1 = loft between all U-curves. Use v-degree = number of V-curves - 1.
- Build Nurbs surface L2 = loft between all V-curves. Use u-degree = number of U-curves - 1.
- Build Nurbs surface I = interpolation between all intersection points. It will have degrees (M-1) x (N-1), the same as L1 and L2 by construction.
- Unify u- and v- knot vectors of L1, L2, I surfaces by adding new knots. Probably, have an option to do not add knots if existing knots have very similar values - use average value of knot in such cases.
- Calculate resulting surface control points = L1 + L2 - I.
and then fight bugs for some time :)