Export to HPGL / Combine

Post questions on how to use or achieve an effect in Inkscape.
koalo
Posts: 2
Joined: Sat Oct 12, 2013 12:19 am

Export to HPGL / Combine

Postby koalo » Sat Oct 12, 2013 12:39 am

Hi,
I have a picture with some overlapping circles:

original.svg
Original picture
(7.32 KiB) Downloaded 207 times


I would like to export it to HPGL, but in the result the circles are combined to a path so that it looks like this:

combined.svg
Picture as it looks after export
(3.49 KiB) Downloaded 192 times


How can I combine the circles so that it looks like in the original picture?
I tried to use "Cut Path", but that is very laborious for so many overlapping objects.

Greetings,
Florian

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Export to HPGL / Combine

Postby Lazur » Sat Oct 12, 2013 9:34 am

Hi.

A less accurate -but fastest way that may cover most of the needs- is to export the file as a png at a reasonable resolution,
then importing it back and using the trace raster image option.
That way you can have the right shape as one compound path, with black fill and no outline.

If you want to preserve the original image's style of the strokes, well than the easiest way is to edit them manually.
By adding new nodes to them near the intersections and opening some segments and deleting unwanted nodes.

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Export to HPGL / Combine

Postby ragstian » Sat Oct 12, 2013 3:15 pm

Hi.

A lot of "manual labour" is required but it's not impossible to do.

First select all the ellipses and make a copy (CTRL-D)
Group (CTRL-G) and move aside - this figure to be used as a guide later (too see the stacking order - which ellipsis is on top)
Select all the Ellipses from the original.
Do a stroke to path (CTRL-ALT-C)
Select two of the ellipses - make a copy as they will be "consumed" by the next operation.
Do a path intersection (CTRL-ALT-*)
Do not deselect anything before next stage -
Set fill to red - you will then see the intersection between the ellipses. Repeat until ALL the intersections are covered.

You will end up with something like this;
Image

Then select all the black ellipses - make sure you got nine objects selected.
Perform a path exclusion (CTRL-ALT-^)
Do a path break apart - (SHIFT-CTRL-K)

Hopefully you now got something like this;
Image

Now comes the fun part - delete all non essential segments. Refer to the copy made earlier.
(Make sure to keep the "essential" red segments.)
After this is done select the different parts (two a time - one red one black) and do a path combine (CTRL-K)
(I did two object at a time - selecting all objects resulted in some gaps.)

You will end up with this;
Image
Depending on what you are using the HPGL file for (CNC - Laser Cut - Plasma?? ) you might have to manually join paths even further.

Good Luck
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

koalo
Posts: 2
Joined: Sat Oct 12, 2013 12:19 am

Re: Export to HPGL / Combine

Postby koalo » Tue Oct 15, 2013 2:36 am

It took quite some time, but thanks to your detailed explanation I finally managed to export the file successfully.

Thank you,
Florian

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Export to HPGL / Combine

Postby ragstian » Tue Oct 15, 2013 7:07 am

Hi.

You're welcome.
I learned some in the process as well.
What are you using the HPGL file for?

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar


Return to “Help with using Inkscape”