(Sub)grouping changes stroke width?

Post questions on how to use or achieve an effect in Inkscape.
radapox
Posts: 3
Joined: Wed Aug 01, 2018 4:57 pm

(Sub)grouping changes stroke width?

Postby radapox » Wed Aug 01, 2018 5:54 pm

I'm drawing a three-line shape where all lines have stroke width 0.5mm, as indicated in the Stroke style tab. However, in reality some of the lines turn out to be slightly fatter than the others, even if the values in the tab are the same.

After some experimenting I found out that this is caused by (sub)grouping: When I select two of the three lines and group them, they become fatter than the remaining third line. When I subsequently group all three lines, the problem persists. The only way I can get all three strokes the same size is either by not grouping any of them, or by grouping all of them at once.

Why does this happen? And is there a way to subgroup lines without their changing (apparent) stroke width?

See image and the attached svg file to see what is happening. I'm using InkScape version 0.92; proportional stroke scaling is disabled.

stroke width.svg
Grouping changes stroke width
(11.74 KiB) Downloaded 254 times
Attachments
stroke width.png
stroke width.png (42.81 KiB) Viewed 1137 times

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: (Sub)grouping changes stroke width?

Postby tylerdurden » Wed Aug 01, 2018 11:03 pm

In the preferences settings, what is the transforms behavior set to?

Preferences.png
Preferences.png (19.76 KiB) Viewed 1108 times


Could be related to a known issue:
viewtopic.php?f=5&t=19761
viewtopic.php?f=5&t=33071
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

radapox
Posts: 3
Joined: Wed Aug 01, 2018 4:57 pm

Re: (Sub)grouping changes stroke width?

Postby radapox » Thu Aug 02, 2018 12:09 am

Thanks for your reply! The settings are Optimized, with all the check boxes checked. I tried different settings, but no difference thus far...

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

Re: (Sub)grouping changes stroke width?

Postby Lazur » Thu Aug 02, 2018 12:31 am

Hi.

Stroke style attributes as well as transfromations can be added to groups.
Like, if you set a stroke width on a path, group it, and resize the group the stroke width will be rendered according to the transformation, however displayed the same stroke width in the fill and stroke panel when selected with the node editor.
Then, you can set a stroke style as a group attribute which overrides the grouped object's attribute, but also enter the group after and change a specific object's stroke width. Resulting in different stroke widths displayed in the fill and stroke panel for the group and the selected path.

I'd suggest switching to geometric bounding box first, then switching the icon "scale strokes with proportion" option off for such line drawings.
Then, preferably draw without group transformations -resizing a number of selected nodes is the best to avoid any unnecessary transformations.

Another option is, to draw the paths with undefined stroke attributes, then set a stroke style to the "outermost" group.

radapox
Posts: 3
Joined: Wed Aug 01, 2018 4:57 pm

Re: (Sub)grouping changes stroke width?

Postby radapox » Thu Aug 02, 2018 12:50 am

Thanks, Lazur! It sounds like that's where the problem lies. If I ungroup the two lines in the "wrong" option, then group them again, the line width is indeed correct. I think this solves the issue; thanks once more!


Return to “Help with using Inkscape”