Paper size node for penplotters

florisdejonge's Avatar

florisdejonge

05 Jun, 2021 07:50 AM

I made a node to simulate the paper size and the width of the pens or markers and to correctly position and scale the artwork before plotting. This could also be useful for printing artwork. It was earlier mentioned here.

  1. Support Staff 1 Posted by john on 05 Jun, 2021 10:17 AM

    john's Avatar

    Thanks, Floris. This looks quite useful.

  2. 2 Posted by florisdejonge on 14 Mar, 2024 06:12 PM

    florisdejonge's Avatar

    Does anyone know whether changing the paper size in a Node like aforementioned or another number that is used as a variable within the network can be used to automatically change the canvasHeight and canvasWidth in the Document Properties?

  3. Support Staff 3 Posted by john on 14 Mar, 2024 07:17 PM

    john's Avatar

    Floris,

    I wish there was a way to programmatically update canvas size, but I don't see how. The canvas node in my Cartan Node Library can determine the current canvasHeight and CanvasWidth (using an external Python code library), but cannot set those values.

    The canvas height and width are manually set in the document properties dialog and stored inside the .ndbx file as XML properties. A node which changed these values (using an external Python module) would have to overwrite and save these values in the ndbx file. For this to work, merely running a node (by rendering it or a node below it) would actually have to force a file save. I don't think that is possible, no matter what you do.

    One thing you could do is to have your node display the required canvas height and width for a given paper size (maybe as a hideable option). Not at all ideal, but since you have to change these values manually it would be helpful for the node (which knows these values) to display them to the user.

    One other improvement you could make to your paper size node would be to replace the fit_to node you use to resize the drawing with my new fit_true node. (You would no longer need to create a rect; just feed the width and height directly.). This way the scaling would preserve stroke widths without you having to ask the user to define a new stroke width explicitly.

    Wish I had better news but I hope this helps a little.

    John

  4. 4 Posted by florisdejonge on 14 Mar, 2024 07:40 PM

    florisdejonge's Avatar

    Thanks. Good suggestion. I'd already made some improvements since last time by preserving different stroke color and width. But maybe this is even better. So I'll look into it

Reply to this discussion

Internal reply

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

Attaching KB article:

»

Already uploaded files

  • papersize_v2.ndbx.zip 4.24 KB
  • Schermafbeelding_2021-05-13_om_14.20.19.png 241 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

17 Jun, 2024 02:26 PM
15 Jun, 2024 01:44 PM
08 Jun, 2024 09:05 AM
08 Jun, 2024 09:00 AM
04 Jun, 2024 04:37 AM