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.

NodeBox 3From the old forum

python import > how to create a point?

3 replies Last reply

  1. Hello,
    I tried to create a point using python but it did not work well.
    How should I do it? Please let me know. Thank you.

    Best,
    ky

    Copy link
  2. NodeBox team

    Hi,

    You're intuition was right, but NodeBox is wrong :-)

    We're currently reworking the graphics API so that you can just create a map containing X/Y and have it be represented as a point. For now you have to use the Point object:

    from nodebox.graphics import Point
    
    def my_point(x, y):
        return Point(x, y)
    

    Again, since the API is in flux I can't guarantee this code will keep working in the future.

    Kind regards,

    F

    Copy link
  3. Thank you for your response. I just downloaded the latest version of Nodebox3 and I realized the attached Nodes are not appeared on the menu. Could you give us some tips? Thank you :-)

    Best,
    ky

    Copy link
  4. NodeBox team

    The nodes won't automatically appear on the menu. This is not supported yet. If you want to use them in another document, you have to copy-paste them.

    Obviously, this is not ideal. We're working on a fix for this.

    Copy link

Know something that helps?

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

Sign in to reply