I'm looking for same "merge" functionality (It's keeping all visible parts and discards overlaping (creates necessary nodes on shapes)) as in Illustrator in other (free) software / tool / scripts. I would like to use it for bulk of 10k files so if there is command-line options it will be best. functionality of "merge" tool

| improve this question | | | | |
  • What is a <10k file? Weight? – Rafael Jun 29 '18 at 15:02
  • @Rafael - OP says "... for <10K file..." and given their preference for command-line options, I think they mean "...use for batch processing a <10k count of files..." but the OP would need to clarify if I'm correct. – GerardFalla Jun 29 '18 at 15:26
  • What does the merge functionality in Illustrator do? You can group multiple shapes in Inkscape, which allows to move them in one go, resize, rotate and so on, but it looks, as if Illustrator would add nodes to intersection points. – user unknown Jun 29 '18 at 16:11
  • It looks as if it's keeping the parts of the shapes that are visible, and discards the rest. Inkscape does not have such functionality - not by default, and not with any user-contributed Inkscape extension I have ever seen. Trace Bitmap would provide a similar functionality, if you uncheck 'stack scans' and use 'Multiple scans: colors' for tracing a bitmap copy. – Moini Jun 29 '18 at 23:44
  • Sorry for not being clear - 10k is count of files I need to process with this function. It is not necessary to be command-line (it will be best though) but I can write some macro - just need something outside Adobe ;) – Destrosvet Jun 30 '18 at 9:25

Object -> Group in Inksacpe has been mentioned but an alternative worth knowing about is Path-> Combine -it has a caveat that that you only work with paths - so not gradients, clones etc. It's also extremely useful for getting round Inkscape's 2 object limit for most of its path tools, filters and extensions.

Why you would use either depends on what you want to gather together and why.

Object -> Group will make a composite object without altering ordering, fill colour, stroke weight or individual effects. You can also use the Object Properties browser to selectively hide elements and Selection Sets to make accessing individual elements within a group much easier.

For the example you posted, using grouping, the end result will be an object that looks like your final image.

Path -> Combine will allow Inkscape to treat various paths them as 1 path object with the colour and stroke weight being set to that of the topmost path object. It will allow you to use a single path subtraction to cut the hexagon into all 3 shapes.

If you are dealing with a lot of objects and you want them to keep their individual fill, stoke and so on, then groups are the way to go. If the negative space of a shape interacting with other shapes is what you want then use the pathing tools. Though you will have to repeat the intersection with each object if you want them to retain their fill colour etc.

For dealing with the 10k files, and double guessing what you want to do with them, you can run Inkscape from the command line and assuming your dealing with SVG, Inkscape will turn the import into a group maintaining the original positioning, z order and so on of the original file.

So start by making a document that will be the container for all your files

-> create a new document

then again from the command line

-> FileOpen /the/file/you/just/made -> FileImport -> FileSave

if you put a programming loop around this (in whatever language you prefer - java, python, perl, ruby) that counts up to 10k or however many files you have, it will store them in the same document.

If they are .ai files, as I recall Inkscape will correctly handle anything that is standard SVG, however if you have used Illustrator internals like symbols and gradient meshes, you'll need to change these to something non propriatry before hand - export them as svg from Illustrator first.

More info on the commands available for Inkscape

| improve this answer | | | | |
  • Group or Combine is far from result I want to achieve. Combine puts all shapes together without respecting colors and inner shapes.. – Destrosvet Jul 2 '18 at 15:55
  • the issue is it's not clear what you are actually asking for advice on. If you are looking for a way of making a composite object regardless of what it contains then Group is what you want - it doesn't alter anything. Combine despite it's name will not alter path objects, it will allow you to use filters on multiple paths – Pinback Jul 2 '18 at 17:57
  • @Destrosvet why dont you record an action in illustrator and run that on your files. Yeah it's slow but then again you'd be done by now. And yes there is no really good high order programming interface for vector operations. – joojaa Jul 2 '18 at 19:08
  • You can script Inkscape pretty well from the command line and as it runs without all the graphical overhead it is surprisingly fast. However without a clearer explanation of what the OP wants it's hard to deal in specifics. – Pinback Jul 2 '18 at 20:17
  • Sorry for lack explanation - I wrongly assumed that Illustrator "merge" is widely known. => I'm going to do animation ;) – Destrosvet Jul 3 '18 at 7:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.