-
So I'm trying to make a weird shape with a curved cut out using the apply_path_operation 'difference' and it was originally working but after I rewrote the code so I could use the actual shapes in their final location to resize the canvas and then turn them into paths it now won't order it correctly. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
so basically this is what I wanted (sorry it looks rough I'm on mobile) I'm trying to generate svgs for cricut cutting boxes. my earlier attempt looked right but after I exported the svg the dimensions were screwed up. |
Beta Was this translation helpful? Give feedback.
-
Thanks; that helps. When it comes to path operations, Simple Inkscape Scripting works like Inkscape itself in that it doesn't matter in what order you select the paths; what matters is which object is on top. That explains why "no matter the order I put the outlins in the apply_path_operations command it always just makes the little half circle like things instead": you're doing the equivalent of selecting the paths in different orders without changing their stacking. Solution: Lift the slots to the top before differencing the paths: slots[0].z_order('top')
outLineWithSlot1 = apply_path_operation('difference', outLine +slots ) |
Beta Was this translation helpful? Give feedback.
-
ah... okay that makes sense, I'll have try that. is there something similar in the scripting with shapes that I missed? or is there a way to duplicate the path after I've done all the opperations on it |
Beta Was this translation helpful? Give feedback.
-
I don't understand what you're asking here.
Yes. See https://github.com/spakin/SimpInkScr/wiki/Copying-objects |
Beta Was this translation helpful? Give feedback.
-
so I wanted to be able to combine like I did using the path operations but
keeping it as shapes. and I tried copying it as a path object and it didn't
work. I didn't want to copy it as a shape and then do the path operations
twice (seeing as they have to spawn a new instance of inkscape to happen)
…On Wed, Nov 8, 2023 at 9:05 PM Scott Pakin ***@***.***> wrote:
ah... okay that makes sense, I'll have try that. is there something
similar in the scripting with shapes that I missed?
I don't understand what you're asking here.
or is there a way to duplicate the path after I've done all the
opperations on it
Yes. See https://github.com/spakin/SimpInkScr/wiki/Copying-objects
—
Reply to this email directly, view it on GitHub
<#112 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADRRINOI6O5XCTCYJ6B4OOLYDRCA3AVCNFSM6AAAAAA65EPP5WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBTGA4TCOJSGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Sincerely
Cody Christensen
|
Beta Was this translation helpful? Give feedback.
-
There's no equivalent of path operations for shapes. A script needs to call |
Beta Was this translation helpful? Give feedback.
Thanks; that helps.
When it comes to path operations, Simple Inkscape Scripting works like Inkscape itself in that it doesn't matter in what order you select the paths; what matters is which object is on top. That explains why "no matter the order I put the outlins in the apply_path_operations command it always just makes the little half circle like things instead": you're doing the equivalent of selecting the paths in different orders without changing their stacking.
Solution: Lift the slots to the top before differencing the paths: