snap node

flame's Avatar


25 Feb, 2015 12:16 PM


is it possible to modify the snap node or access the grid it uses, to change it ?

  1. Support Staff 1 Posted by Frederik De Ble... on 25 Feb, 2015 07:45 PM

    Frederik De Bleser's Avatar

    Hmm, the snap's node functionality is written in Java. Currently it is impossible to change the implementation easily.

    You can examine the code by looking at the Java source here, and the math implementation here.

  2. Support Staff 2 Posted by Frederik De Ble... on 25 Feb, 2015 08:00 PM

    Frederik De Bleser's Avatar

    Couldn't resist, and re-implemented the snap functionality in Python. That allows you to look at the implementation and change it.

    There's no built-in text editor, but you can use an external editor, then press Command-R in NodeBox to reload the implementation.

  3. Support Staff 3 Posted by Frederik De Ble... on 25 Feb, 2015 08:01 PM

    Frederik De Bleser's Avatar

    Obligatory screenshot:

  4. 4 Posted by flame on 27 Feb, 2015 01:30 AM

    flame's Avatar


    I think I missed part of this but how do you get custom implementations/nodes into the system ?

  5. Support Staff 5 Posted by Frederik De Ble... on 28 Feb, 2015 10:03 AM

    Frederik De Bleser's Avatar

    The example .ndbx file already has this link. 

    The trick is to write a Python file, then in your NodeBox file, link to the code using File > Code Libraries…

    Check out the example I sent you. It should work.



Reply to this discussion

Internal reply

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

Attaching KB article:


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

23 May, 2023 02:09 PM
12 May, 2023 10:17 PM
07 May, 2023 11:53 PM
07 May, 2023 04:43 PM
17 Apr, 2023 11:34 AM


15 Apr, 2023 01:31 AM
15 Apr, 2023 01:23 AM
14 Apr, 2023 02:54 AM
11 Apr, 2023 03:53 PM
08 Apr, 2023 09:59 PM
08 Apr, 2023 08:14 AM