Paper size node for penplotters
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.
- papersize_v2.ndbx.zip 4.24 KB
- Schermafbeelding_2021-05-13_om_14.20.19.png 241 KB
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
Support Staff 1 Posted by john on 05 Jun, 2021 10:17 AM
Thanks, Floris. This looks quite useful.
2 Posted by florisdejonge on 14 Mar, 2024 06:12 PM
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?
Support Staff 3 Posted by john on 14 Mar, 2024 07:17 PM
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 Posted by florisdejonge on 14 Mar, 2024 07:40 PM
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