how do I flatten my image and crop everything hanging off the edge of the image?

Asked by Em

I am so new to vector graphics it's not funny. However, I do understand a little image design terminology thanks to my experience with GiMP.
My problem is, that after creating my image, I find I am unable to merge down all of the 100 or more layers and trim off what's hanging off the top and bottom edges, the design is going be to laser etched into a rolling pin and so must be seamless where it meets up and it must be saved in vector, I'm assuming because the machine operates with vector due to the scalability. I have looked all through your tips and tricks, faqs and user book and nowhere does it say how I actually save in one layer.

GiMP was very easy to understand, but this tool is a little more advanced compared to what I'm trained to do, I studied 3D design in the physical world, not the digital, so please, use as little shorthand jargon as possible in your answer.

please help,

thanks,

<email address hidden>

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Hachmann (marenhachmann) said :
#1

Hi Em,

Layers:
=====
a layer in Inkscape is just a group in SVG. If the machine you have can handle groups, then it's not necessary to put everything into the same group/layer. The machine will not know the difference between a group and a layer, this is just an Inkscape-internal distinction.

(100 layers? Wow.)

If you still want to / need to do this, I would recommend the following, fast way to do it:
Open the SVG file with a text editor, and remove all occurrances of
inkscape:groupmode="layer"

This will put everything that previously was in a 'layer' for Inkscape into a normal SVG group (from Inkscape's perspective).

If you then want to remove the groups that previously were 'layers' for Inkscape, then open the file with Inkscape, select everything, and hit Ctrl+U until the status line does no longer say that there are any groups in the selection.

(but if you ever want to edit the file again, with layers, please save a backup before you start this)

Cutting:
=======

To cut things (really cut, not just make things outside a specific area invisible, as can be done with a clip path), you will need to use the boolean operations, mainly Path -> Difference and / or Path -> Cut Path and / or Path -> Division.

I guess that will be necessary, because a cutting machine/laser etching machine usually doesn't care about masks or clips, that do not 'destroy' the data, but only hide it, as they aren't often very advanced in their vector data interpretation...

Here's a simple tutorial:
https://inkscapetutorials.org/2014/04/22/inkscape-faq-how-do-i-crop-in-inkscape/#boolean

However, some of the boolean operations in Inkscape 0.91 only work with a single path at once. So if you have 100 layers, with 100+ objects, you would need to repeat the process for each path in each layer, using Path -> Difference to cut off the things that go over the border.

Fortunately, there is an extension that allows you to to Path -> Difference for many objects at once. It will, however, ignore groups (but works with objects that are in different layers, fortunately), so you'd still have to do the ungrouping of all objects first. Find it here: https://github.com/Moini/inkscape-extensions-multi-bool

Hope this helps to get you started,
 Kind Regards,
 Maren

Can you help with this problem?

Provide an answer of your own, or ask Em for more information if necessary.

To post a message you must log in.