Redo Contour Node

john's Avatar

john

04 Feb, 2025 05:04 AM

Last year I introduced a new node, pair_contour, that allowed you to join two contours into a single path with no external code module required:

http://support.nodebox.net/discussions/show-your-work/769-pair_cont...

I am now replacing that node with a better one: redo_contour!

Redo_contour takes a list of up to SIX contours and assembles them into a single path, again with no external code module required. It is built out of pair_contour nodes, and is perfect for reassembling a character textpath you have torn asunder and messed with. If you give it more than six contours, it will only take the first six.

Since characters are by far the most common paths with contours, and since all normal characters I know of in any font I've seen have no more than six contours (a % sign has five), this node turns out to be quite useful even with its six-contour limitation.

I will remove pair_contour from the next edition of my library, but will retain it inside the demo for redo_contour.

The attached NDBX file shows a new demo for redo_contour along with the old one for pair_contour (see screenshot).

For the new demo, I take an ABC texpath, break it into six contours with my contours node, then use my clockwise node to separate the inner contours from the outer contours. I then replace the inner contours with resized versions of the outer contours - utter mischief. Then the magic: I reassemble the six modified contours into a single path with redo_contour and colorize it to prove that it's now just one path again.

Incidentally, if you try to reassemble this particular list of contours with the join_contours node, it won't work. This is because join_contours needs to have inner contours going the opposite direction of outer contours in order to combine them correctly. Redo_contour doesn't care.

Enjoy!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • redo_contour_screenshot.png 560 KB
  • redo_contour_demo.ndbx.zip 7.52 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

06 Feb, 2025 01:37 AM
04 Feb, 2025 06:32 AM
04 Feb, 2025 05:04 AM
30 Jan, 2025 09:31 AM
30 Jan, 2025 09:08 AM

 

30 Jan, 2025 08:40 AM
24 Jan, 2025 07:50 AM
22 Jan, 2025 11:42 PM
21 Jan, 2025 09:43 AM
21 Jan, 2025 09:41 AM
21 Jan, 2025 09:36 AM