Hi all,
Recently I asked John this question: What is the best way to edit the handles of points? Meaning the red dots that function as control points. Nodebox numbers them seperately. But how would one change the position of just a selection of soms of these red dots, without adjusting the regular blue points. As far as I know I can't select the red ones, without converting them to blue.
Johns answer contained the following (@John: I hope you don't mind me repeating it here):
If you really start mucking with curves you will need to understand the three point types NodeBox uses: 1 to start a curve, 2 to end it, and 3 for the two control points. Lookup "type" of a point to see what each point is.
You can definitely select and move the red (type 3) points without moving the end points. Take any curve (use my curve node or make a short arc), break it into four points, use first and last to pull out the end points, use slice to pick one or both control points, move the control points using a translation node, recombine the four points with a combine node, then feed that into a connect node with closed unchecked. Voila! A modified curve. The red dots move but remain red.
In a list of points you can also separate out the red ones by using a lookup "type" to find the type, convert to number and compare = 3 with a cull node to pick the just the red ones. You can change their locations, but you have to put them back where you found them. One way of doing that is by building a 3 column table where one column holds an index (0,1,2,...), on holds points, and the third holds the type (1, 2, or 3). You can filter on type=3, muck with locations and rewrite those rows of the table, then append them back, sort by index, lookup all the points, and connect.
In the attached example I've tried the suggestion above, but apparently I'm not doing it correctly (it looks cool though), because the red dots are still converted to blue. Can you help me out?
Also, I find myself returning to the 2.2 library for the fit_curve node. It was omitted once, but what's the best alternative?
Floris