gotcha

Author Topic: stroke width varying on zoom / deformation  (Read 1531 times)

December 27, 2017, 12:46:56 PM
Read 1531 times

hans

  • Sr. Newbie

  • Offline
  • **

  • 2
Hey,

I used and use inkscape as my preferred (opensource) tool for sketches for my thesis.
So far I was able to solve my problem by a search, but this time I am stuck and hope this community can help. Its probably simple, if you know what keywords to search for.

The file attached includes 1 problems I have, which are probably related. All drawings should have the same stroke width of 2px.
In the top example you can see how deformation of the curve varies the stroke width of the drawing. Why is that, and how can i prevent that from happening?

In the second (bottom) example the curve should have a stroke width of 2 just like the line. But what I see actually depends on the zoom level.

I hope you can understand my issues. Thanks a lot in advance.

  • 0.92
  • Manjaro KDE

December 27, 2017, 02:13:27 PM
Reply #1

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Hi.

The first problem is related to transformations -objects are grouped and the group was transformed. By selecting the objects and ungrouping you can remove the unwanted transformation, unnecessary clipping and grouping.
Select all (Ctrl+A) and ungroup objects a few times (Ctrl+Shift+G).

The latter one looks interesting, have to look deeper what causes the problem.
However if you want a solution, just select the bottom-most line, copy it (Ctrl+C),
select the problematic curve above and paste style (Ctrl+Shift+V).

Edit: by opening the xml editor (Shift+Ctrl+X), looking at that object's style attributes, there is
Quote (selected)
vector-effect:non-scaling-stroke
-which causes the "unexpected" behave. If you remove that part it gets back to normal.

December 27, 2017, 02:45:44 PM
Reply #2

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Edit: Lazur found the cause :)

The issue is not with Inkscape. The drawing looks exactly the same when viewed with other SVG displaying software.

Additionally: Your drawing contains an unusually high number of groups, most of them useless (because they just contain empty groups...).
To fix that, and the issue of the weird line width, select everything on your layer (Ctrl+A), then hit Ctrl+U multiple times, until it no longer says that your selection contains groups in the status bar at the bottom.

December 28, 2017, 12:59:52 AM
Reply #3

hans

  • Sr. Newbie

  • Offline
  • **

  • 2
Thank you so much! My problems are solved.

The curves were graph curves made by qtiplot and exported to svg.
  • 0.92
  • Manjaro KDE