Move_to Node

john's Avatar


13 Jul, 2021 04:11 AM

This happens often: I have a shape, not centered on the origin, and I want to move it to a particular location.

To do this very simple thing I have to:

  • find the centroid of the shape
  • calculate the relative position change. The easiest way to do this is:
    • open Cartan Node Library
    • copy my rel_change node
    • paste it back in my project
  • add a translate node and translate the shape using the output of rel_change

When this happened for the twelve hundredth time I finally decided just to make a new node to do this in one fell swoop. Saves time and also results in cleaner code.

move_to will appear in the next release of the Cartan Node Library. But if you need to move a shape now, you can copy it from the attached demo.



  1. Support Staff 1 Posted by john on 03 Jul, 2022 11:08 PM

    john's Avatar

    Well, this is embarrassing.

    After ALL these years using Nodebox almost every day, and after using the align node in almost every network I make, I somehow never noticed that align already does everything my move_to node does and more!

    I always thought of align as a tool for centering things or left-justifying them or whatever. In my mind moving a single shape to a new location was a totally different function. I simply ignored the position port of the align node and always left it set to the origin.

    But of course it you put a different value there it will move the shape to that position. Even better you can center on that position, or align the top left or whatever. Nice.

    So there is simply no need for a move_to node. I will therefor deprecate it and remove it from version 3.1 of my library.

    It's strange how the human mind works. In retrospect it seems bizarre that I never noticed this before. My arbitrary mental categories created a blind spot.

    Of course it doesn't help that there is so little documentation about each node. I have sometimes been tempted to write a book with a short chapter on each node, exploring it in depth, showing how its used, and coming up with a whimsical demo for each one. But it would take me a year to write such a book and it would probably have an audience of a only a few dozen hangers on.

    So much to do, so little time.


Reply to this discussion

Internal reply

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

Attaching KB article:


Already uploaded files

  • move_to_screenshot.png 387 KB
  • 3.6 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


? 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

29 May, 2024 05:47 AM
29 May, 2024 05:15 AM
29 May, 2024 05:12 AM
28 May, 2024 07:37 PM
25 May, 2024 11:52 AM


24 May, 2024 07:39 AM
16 May, 2024 02:11 AM
14 May, 2024 01:29 AM
12 May, 2024 07:46 PM
05 May, 2024 04:38 PM
03 May, 2024 06:50 AM