The new NodeBox forum is live! Everything from support.nodebox.net moved here: sign in with the same email to pick up your old posts. Something not working? Write to forum-support@nodebox.net.

Show your WorkFrom the old forum

Relation Node

1 reply Last reply

  1. Sometimes you need to know about the spatial relationship between two shapes. This is another one of those things a child can see instantly but a computer struggles with.

    Given two shapes, A and B, there are five possibilities:

    • They can overlap
    • A can be entirely inside B
    • B can be entirely inside A
    • They can be separate
    • They can be the same shape

    The relate node can reveal this relation between any two shapes you give it. Demo and screenshot attached.

    The node does assume both shapes are closed. Open shapes like curves will be treated as close shapes (just as they would if you tried to colorize them with a fill color). If you pass a straight line in it to one or both ports, it will falsely return a "same" reading.

    The result is a string which begins with a digit (0 to 4) and a colon. If you want to feed this into a switch node, you can just carve off the first character.

    Copy link
  2. thank you John

    I'm sure this will be helpful

    gottfried

    Copy link

Know something that helps?

Sign in with your email address to reply. No password needed.

Sign in to reply