gotcha

Author Topic: How subtract single object from object group?  (Read 2030 times)

January 22, 2018, 07:12:03 AM
Read 2030 times

stellatus

  • Jr. Member

  • Offline
  • ***

  • 11
How subtract:
1) single object from object group
2) object group from object group?

http://wolniludzie.com/inkscape/inkscape.jpg
« Last Edit: January 26, 2018, 03:53:36 AM by stellatus »
  • 0.92
  • Windows 8

January 22, 2018, 05:44:23 PM
Reply #1

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
for 1.) Ungroup, use extension: https://gitlab.com/su-v/inx-pathops

or:

Ungroup, duplicate everything lots of times, and do subtraction object for object.

for 2.) union everything you want to subtract first, then do 1.)

January 23, 2018, 01:53:53 AM
Reply #2

stellatus

  • Jr. Member

  • Offline
  • ***

  • 11
  • 0.92
  • Windows 8

January 24, 2018, 02:20:27 PM
Reply #3

stellatus

  • Jr. Member

  • Offline
  • ***

  • 11
Extension doesn't work with objects group which interest me. Two windows appear:
http://wolniludzie.com/inkscape/difference%20in%20Inkscape_error.jpg
I want subtract red object from yellow objects group.
Second message is: '<<2 Difference working>>, please wait...', but I wait, wait and there is no end...
Why is this happening?
Here is *.svg file:
http://wolniludzie.com/inkscape/karawana_polygons%20in%20Inkscape.svg
  • 0.92
  • Windows 8

January 25, 2018, 07:00:32 AM
Reply #4

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
It would be interesting to see the actual error message in the little pop up window. Can you copy that here?

January 25, 2018, 07:55:05 AM
Reply #5

stellatus

  • Jr. Member

  • Offline
  • ***

  • 11
Of course:

Traceback (most recent call last):
  File "pathops.py", line 440, in <module>
    ME.affect()
  File "C:\Program Files\Inkscape\share\extensions\inkex.py", line 283, in affect
    self.effect()
  File "pathops.py", line 371, in effect
    self.loop_pathops(top_path, other_paths)
  File "pathops.py", line 336, in loop_pathops
    run_pathops(tempfile, top_path, chunk, ink_verb, dry_run)
  File "pathops.py", line 197, in run_pathops
    run(cmdlist)
  File "pathops.py", line 170, in run
    stdin=PIPE, stdout=PIPE, stderr=PIPE)
  File "C:\Program Files\Inkscape\python\Lib\subprocess.py", line 711, in __init__
    errread, errwrite)
  File "C:\Program Files\Inkscape\python\Lib\subprocess.py", line 959, in _execute_child
    startupinfo)
WindowsError: [Error 87] Falscher Parameter
  • 0.92
  • Windows 8

January 25, 2018, 02:05:49 PM
Reply #6

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Okay, that's not really informative... I guess maybe the extension hasn't been tested on Windows (was probably developed on Mac, and I used in on Linux).
Just in case it's an issue with the file itself, and not with the extension not having been made for Windows:

Can you share an example file and make a screenshot of the dialog settings, and tell us which objects need to be selected for testing?

Another idea: Are you using Inkscape from a zip file or a portable version, perhaps?
What happens if you enter 'inkscape' on your command line?

January 25, 2018, 07:32:32 PM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I'm not familiar with the extension which Moini suggested, but I have used some of the previous versions of it.  Here's a link to it, in case you'd like to try it:  https://inkscape.org/en/~Moini/%E2%98%85multi-bool-extension-cut-difference-division

However, as far as I know, that one will not work on groups.  You'll need to ungroup them, then select all at once, then run the extension.

For the 2nd problem, the reason it's taking so long, is that there are approx 1700 yellow/black objects.  Even though this extension allows you to perform the operation on several objects at once, it still must do them one at a time.  It sounds like maybe the extension Moini suggested can work a little faster, but I'm not sure.

You could save Inkscape some work, and save yourself some time, by deleting all the yellow/black objects which lie entirely inside the red circle.  In the attached screenshot (md.png), I moved the red circle to the back, so you can see all the yellow objects.  Notice the ones I've selected -- that's approx 600 objects!  If you delete those, you'll make the job much easier for Inkscape. 

And you could delete even more, probably (by zooming in).  Here's a tip to help with selecting them.  Give the circle a stroke, maybe make it blue or red (for better clarity) and remove the fill.  Then it will be much easier to select those.  Also, don't forget zooming.

Actually there are probably only a few objects which need to be differenced.  See the other screenshot md0.png.  That shows where I removed the fill of the red circle, and made a blue stroke.  Then I just went along and carefully selected only those yellow objects which lie across the blue stroke.

Here's what I would do.  Hold the Shift key, and start selecting the objects which lie across the blue stroke.  After you have around 10, group them.  Then select another batch and group those.  The reason I suggest this is because for myself, somehow I manage to lose a large selection, and have to start all over.  So I just group them as I go. 

And then when I'm finished, I just have to select all the groups I made.  Then Ungroup, hold Shift and add the blue stroke (originally red circle) and run the extension.

Even with all that work, to make it easier for Inkscape (and faster for you) it still will take Inkscape some time.  Even if you can reduce the number of objects to 100, it could take a long time.  Here, let me just try what I suggested, and I can give you an estimate for how long it might take....

Ok, I found that I only needed to select about 40 objects which lie across the blue path.  That still took Inkscape about a minute to finish differencing them all.  But I did find that makes it easier to see (and select) the objects inside the circle, which can just be deleted.  So maybe do the difference first, and then delete all the other objects after?

Well, I guess that's the long way around.  I don't know if the extension Moini suggested can do what you want, all at once.  This is probably a good test for that exension.  But if 1700 objects is too much for it, at least now you know the long way  :)

  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 26, 2018, 03:38:19 AM
Reply #8

stellatus

  • Jr. Member

  • Offline
  • ***

  • 11
Moini, brynn, thanks for your answers. I use not portable Inkscape version. At this moment, everything what brynn wrote is very helpful for me. Great job. Sincere thanks once again.
  • 0.92
  • Windows 8