Created by: portnov
refs #3603 (closed)
Given a net of intersecting curves, this node generates a surface which passes through all given curves.
A net of curves is two sets of curves, one set along one direction and one set along another. One set of curves is called "U-curves" (curves along U direction) and another set of curves is called "V-curves" (curves along V direction).
Apart of curves grid, this node requires intersection points of curves provided explictly. Intersection points can be calculated by use of "Intersect NURBS curves" node. Note: that node uses numeric algorithms to calculate intersections, so it can fail to find intersections, or give imprecise results. So, if you have intersection points in advance, it's better to use them.
This node generates a NURBS surface from NURBS curves according to algorithm known as "Gordon Surface".
Gordon surface algorithm has a number of restrictions:
- All input curves must be NURBS or NURBS-like. More specifically, only non-rational curves are supported - i.e., without weights (or all weights equal).
- All U-curves must have "the same" direction; all V-curves must also have "the same" direction.
- There must be N curves along one direction, and M curves along another direction, which must exactly intersect at
N x M
points. - intersection points must be located evenly in parameter spaces of curves. For example, V-Curve
C_v
must intersect all U-curvesC_u
at the same value of U parameter. - U-curves must be ordered along direction of V-curves, and vice versa. For example, if U-curve
C_u1
intersects V-curveC_v
atv = v1
, and another U-curveC_u2
intersects the same V-curveC_v
atv = v2
, andv1 < v2
, then in input curves list,C_u1
must be provided beforeC_u2
.
One relatively easy way to build a correct curves net is to draw a number of Bezier curves, which intersect exactly at their node points.
Planned developments:
-
Add "implementation" parameter to "Interpolate NURBS Surface" node. Currently this node depends on Geomdl. Now two implementation will be available: Sverchok (built-in) and Geomdl. -
New "Intersect NURBS Curves" node. It will have two implementation: SciPy (algorithm in Sverchok, which uses SciPy minimization routines) and FreeCAD, and some settings about precision / tolerance. -
New "NURBS Surface from Curves Net" node. It will have mandatory "Intersections" parameter, because finding curve intersections is a separate task, for which there will be specialized node with it's own parameters.
Preflight checklist
Put an x letter in each brackets when you're done this item:
-
Code changes complete. -
Code documentation complete. -
Documentation for users complete (or not required, if user never sees these changes). -
Manual testing done. -
Unit-tests implemented. -
Ready for merge.