Corner Node
The attached node finds one of the four corners - or four edge midpoints - of a a rectangle or the rectangular bounds of a shape. Just plug in the shape, choose one of the eight options, and the node returns that point.
Very simple, but surprisingly useful. I will include it in the next release of my node library.
I have three types of node in library:
- Something useful that can't be done in Nodebox - for which I include custom code in Python or Clojure
- Something useful that is hard to do in Nodebox - which I provide as a subnetwork
- Something useful that is easy to do in Nodebox - but still worth providing as a subnetwork
This corner node is the third type. It's not that hard to do, but it's very useful, and it's faster to just copy-paste it from the library and choose one of the eight settings that write it from scratch each time. Wrapping this function in a single node also keeps your overall code cleaner and easier to follow.
I've been surprised how often I've used this node over the last few months. Very handy for positioning titles or callouts , doing geometric drawings, labelling bar charts, setting the pivot point for rotations, etc.
Enjoy!
John
-
corner_screenshot.png 270 KB
- corner_demo.zip 1.59 KB
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