Move_to Node

john's Avatar

john

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.

Enjoy!

John

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
  • move_to_node.zip 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

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

19 Jul, 2021 12:05 PM
13 Jul, 2021 01:04 PM
13 Jul, 2021 04:11 AM
12 Jul, 2021 11:40 PM
12 Jul, 2021 09:17 PM

 

07 Jul, 2021 02:14 AM
30 Jun, 2021 08:55 PM
30 Jun, 2021 03:32 AM
29 Jun, 2021 12:55 PM
29 Jun, 2021 07:18 AM
20 Jun, 2021 07:19 AM