Converting patterns to paths

Post questions on how to use or achieve an effect in Inkscape.
geoffrey
Posts: 1
Joined: Mon Feb 18, 2019 9:55 am

Converting patterns to paths

Postby geoffrey » Mon Feb 18, 2019 10:02 am

So I am using matplotlib to generate SVGs to draw with my axidraw through inkscape. I recently added some hatching, which appears fine in rendering, but isn't drawing. Digging into the SVG file itself, it seems like what gets drawn are the paths ie

<g id="axes_1">
<g id="patch_2">
<path clip-path="url(#p079d46adee)" d="M 1125.220949 392.397995
L 1127.047463 394.178781
L 1127.96072 394.178781
L 1129.787234 395.959567
L 1130.700491 395.959567
L 1132.527005 397.740353
...

But the circles are a pattern

<pattern height="72" id="hd9c7ab4729" patternUnits="userSpaceOnUse" width="72" x="0" y="0">
<rect fill="none" height="73" width="73" x="0" y="0"/>
<path d="M 0 73.2
C 0.318244 73.2 0.623496 73.07356 0.848528 72.848528
C 1.07356 72.623496 1.2 72.318244 1.2 72
C 1.2 71.681756 1.07356 71.376504 0.848528 71.151472

I'm wondering if it possible to treat those patterns as paths so they can be drawn.

User avatar
druban
Posts: 1850
Joined: Fri Nov 20, 2009 10:48 pm

Re: Converting patterns to paths

Postby druban » Mon Feb 18, 2019 2:50 pm

for hatches you could convert using 'object to path' and they should be seen... For fill patterns it's different... there is no way that I know to convert all the objects in a pattern fill to real objects. If it's pattern on path the same object to path should do. Once again the lack of any image reference results in a lot of guesswork on my part...
Your mind is what you think it is.

Moini
Posts: 3293
Joined: Mon Oct 05, 2015 10:44 am

Re: Converting patterns to paths

Postby Moini » Mon Feb 18, 2019 10:53 pm

You need to use real objects (i.e. paths, instead of styles) for this, so either create the pattern manually and cut it with boolean operations, or use one the available extensions.

https://github.com/evil-mad/EggBot/blob ... t_hatch.py

or use the gcodetools area fill, depending on the pattern that you want:

https://www.youtube.com/watch?v=AxUF9T53zSA
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: No registered users and 4 guests