Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--create groups breaks file with stroke-linejoin #286

Open
JoKalliauer opened this issue Oct 8, 2021 · 0 comments
Open

--create groups breaks file with stroke-linejoin #286

JoKalliauer opened this issue Oct 8, 2021 · 0 comments

Comments

@JoKalliauer
Copy link

Input

in.svg

<?xml version="1.0" encoding="UTF-8"?>
<svg width="831.5" height="491.34" viewBox="0 0 613 365" xmlns="http://www.w3.org/2000/svg">
 <path d="m80 227c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" fill="#f00" stroke="#f00" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/>
 <path d="m80 227 60-62m0 0h60" fill="#f00" stroke="#f00" stroke-linecap="round" stroke-linejoin="round" stroke-width="4"/>
 <path d="m210 165c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" fill="#f00" stroke="#f00" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/>
 <path d="m210 165 60-50m0 0h60" fill="#f00" stroke="#f00" stroke-linecap="round" stroke-linejoin="round" stroke-width="4"/>
 <path d="m340 115c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" fill="#00f" stroke="#00f" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/>
 <path d="m340 115 60-25m0 0h100" fill="#00f" stroke="#00f" stroke-linecap="round" stroke-linejoin="round" stroke-width="4"/>
 <path d="m510 90c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/>
 <path d="m340 115 60 25m0 0h100" stroke="#00f" stroke-linecap="round" stroke-linejoin="round" stroke-width="4"/>
 <path d="m510 140c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/>
 <path d="m210 165 60 50m0 0h60" stroke="#f00" stroke-linecap="round" stroke-linejoin="round" stroke-width="4"/>
 <path d="m340 215c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" fill="#00f" stroke="#00f" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/>
 <path d="m340 215 60-25m0 0h100" fill="#00f" stroke="#00f" stroke-linecap="round" stroke-linejoin="round" stroke-width="4"/>
 <path d="m510 190c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/>
 <path d="m340 215 60 25m0 0h100" stroke="#00f" stroke-linecap="round" stroke-linejoin="round" stroke-width="4"/>
 <path d="m510 240c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/>
 <path d="m80 227 60 63m0 0h60" stroke="#f00" stroke-linecap="round" stroke-linejoin="round" stroke-width="4"/>
 <path d="m210 290c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/>
</svg>

Output

<?xml version="1.0" encoding="UTF-8"?>
<svg width="831.5" height="491.34" viewBox="0 0 613 365" xmlns="http://www.w3.org/2000/svg">
 <g fill="#f00" stroke="#f00" stroke-linecap="round" stroke-linejoin="round">
  <path d="m80 227c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" stroke-width="3"/>
  <path d="m80 227 60-62h60" stroke-width="4"/>
  <path d="m210 165c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" stroke-width="3"/>
  <path d="m210 165 60-50h60" stroke-width="4"/>
 </g>
 <g stroke-linecap="round" stroke-linejoin="round">
  <path d="m340 115c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" fill="#00f" stroke="#00f" stroke-width="3"/>
  <path d="m340 115 60-25h100" fill="#00f" stroke="#00f" stroke-width="4"/>
  <path d="m510 90c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" stroke="#000" stroke-width="3"/>
  <path d="m340 115 60 25h100" stroke="#00f" stroke-width="4"/>
  <path d="m510 140c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" stroke="#000" stroke-width="3"/>
  <path d="m210 165 60 50h60" stroke="#f00" stroke-width="4"/>
  <path d="m340 215c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" fill="#00f" stroke="#00f" stroke-width="3"/>
  <path d="m340 215 60-25h100" fill="#00f" stroke="#00f" stroke-width="4"/>
  <path d="m510 190c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" stroke="#000" stroke-width="3"/>
  <path d="m340 215 60 25h100" stroke="#00f" stroke-width="4"/>
  <path d="m510 240c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" stroke="#000" stroke-width="3"/>
  <path d="m80 227 60 63h60" stroke="#f00" stroke-width="4"/>
  <path d="m210 290c0 2.7614-2.2386 5-5 5s-5-2.2386-5-5 2.2386-5 5-5 5 2.2386 5 5z" stroke="#000" stroke-width="3"/>
 </g>
</svg>

out.svg

##command

scour -i in.svg -o out.svg --create-groups

related Bugs

I did not find the issue at https://github.com/scour-project/scour/wiki/Documentation#--create-groups so I think this might be a new issue

copyright

source https://de.wikipedia.org/wiki/Datei:BaumNeu3.svg

author: https://de.wikipedia.org/wiki/Benutzer:STHD19

license: Public Domain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant