I have an SVG image with many objects, stacked. What I need is a final SVG, with the same visual result, but in a way that I could change the opacity of any object without revealing the hidden parts of underlying objects, revealing just the "hole" behind.
I've done this diagram to illustrate the request:
This example above was done by hand with Inkscape, selecting every square and duplicating it as many times as the number of differences (ctrl + -) I needed to "cut" the underlying objects. This method is very hard to apply with a large amount of objects.
Any software (Adobe Illustrator, command line tool...) or method that solves this problem will be welcome.