Author Topic: Ruler Path Effect not scaling properly when added to Line - FIXED!  (Read 5137 times)

March 30, 2017, 08:54:39 AM
Read 5137 times

mcpdeltat

  • Sr. Newbie

  • Offline
  • **

  • 4
Hey folks,
I am brand new to Inkscape, so hopefully you can set me straight with a simple fix.

I am trying to apply the Ruler Path Effect to a straight horizontal line:
I have my document set to display in px units.
I first draw a horizontal line, using the Pencil Tool.
I then move to the Select Tool, so that I can change the width of the line to 200px, in the Controls Bar.
With the line selected, I open the Path Effects dialogue and set the Mark Distance to 10.00px, Major Length to 10.00, Minor Length to 5.00, and Major Steps to 5, with no Shift or Offset.
The result is not as expected and appears as if my line is much shorter than 200px, or the Mark Distance is much longer than 10px.

I have attached a screenshot, to show what I am getting, and my settings.

Thanks very much for any help!
« Last Edit: March 30, 2017, 03:15:44 PM by mcpdeltat »
Inkscape 0.92.1, Windows 10

March 30, 2017, 09:07:43 AM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

Interesting -- I'm not sure what might be happening there.  Attached is my result, using all the settings you described.  So you can see it's very different.

Is there any chance that the Pencil tool had non-default settings, when you made the original line?  For example, set to spiro spline, and/or having a shape option selected?  (edit - testing shows the status bar would indicate, if this was the case - so ruled this out)

It almost looks like your ruler was clipped, although there's no indication of that in your status bar.

Which version of Inkscape are you using?  (don't say "current", give a version number, please)

Could you share the SVG file?  Sometimes that's the fastest way to a solution.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

March 30, 2017, 09:14:54 AM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oh wait!  I have Mark Direction = Left, and Border Marks = Both

I notice you have Right and None, respectively.  Could that be the problem?

Yeah, when I change  Border Marks to None, I get something somewhat similar to yours - there's no mark on one end.

I'm not sure if that's the problem though.

Edit
I don't get how your ruler height got to be 38.something, when it's set for 10.0 in the LPE dialog.  Strange!
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

March 30, 2017, 10:15:46 AM
Reply #3

mcpdeltat

  • Sr. Newbie

  • Offline
  • **

  • 4
Hi brynn,

Thanks for your quick reply. I am sure you are right that it is some setting or settings for the tool, but I haven't changed them (on purpose, anyway) from the defaults of the install. I am running 0.92.1 on Windows 10.

I have attached my result from changing Mark Direction to 'Left' and Border Marks to Both. I now have the ruler marks to the left of the path and marks at both ends, but it didn't change the scaling. I, also, am puzzled by the Height value. I can't manually change it to any other value, either, I assume because the Path Effects has it locked.

I also attached my SVG, so maybe that will help. I assume most tool settings are embedded in the document, but others are persistent user settings?

Inkscape 0.92.1, Windows 10

March 30, 2017, 11:06:14 AM
Reply #4

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
The SVG file you attached just has a simple 2-node path, without the LPE applied to it.  At first I thought it wasn't going to help for troubleshooting.  But when I applied the Ruler LPE in your file, I got something very similar to you.  See attached.

Well, at least it's similar to your results on the right end, where it's clearly not what's expected.  But it's not 38.something height.  It's the correct 10 px height.

I'm still investigating why these things are happening.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

March 30, 2017, 11:54:50 AM
Reply #5

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
One thing I notice is that your page size is in inches, but otherwise you're using pixels.  I'm not sure, but I don't think that should matter.

For the moment, I'm stumped on this.

Was your file created from a custom default doc, or custom template, which you created with an earlier version of Inkscape?  I just opened a template that I created with an earlier version of Inkscape, drew a line, and applied the LPE.  I'm getting a result that's similar, but not exactly the same.  It's the odd way the right end of the ruler appears, where the Border Marks don't match the other marks, which is the same.  But it doesn't show the height issue.

Inkscape's native DPI changed in version 0.92. So that means for drawings that were started in an earlier version will need some scaling before you work on them with 0.92 or later.  We've seen some reports that templates created before 0.92 might have some issues.  But I don't understand the issues very well.

Mostly I'm stumped  :duh:  But maybe others will have an idea?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

March 30, 2017, 03:48:09 PM
Reply #6

mcpdeltat

  • Sr. Newbie

  • Offline
  • **

  • 4
FIXED!

Your comment about the page size being in inches made me look closer at the Document Properties dialogue. You were correct that the page size didn't make a difference, although it is logical that I work with a px-sized page, since my project doesn't necessarily involve printed output. However, I noticed that the Scale section of the dialogue showed a value of 0.26458, rather than 1.0. I changed the Scale x to 1.0 and all is well.

I went back and uninstalled/re-installed to observe the default Scale, and it is 1.0. However, if you change the Display Units under the Document Properties/General section to px, the Scale changes to 0.26458. I must have changed the Display Units to px when I first started playing with this file, since the tutorial I was following called for a px-dimensioned line. I am new to SVG, so I don't know the reasoning behind the automatic scale change, but maybe you can school me on that.

Thanks so much for your help! I might never have thought to look at the Document Properties if you hadn't mentioned page size.
Inkscape 0.92.1, Windows 10

April 01, 2017, 06:42:31 PM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I noticed the scale factor as well, in your file.  But this is a new feature for this version of Inkscape, and not many people....well, not many users understand it clearly.  I thought it was because you had the page size set in inches, so I thought the scale factor was correct.  But now (after I read your message and do more experimenting) I realize it's the document units (called Display Units at the top of the Page tab of Document Properties) that matter.  So I should have noticed they didn't match the scale factor.

Let me ask you some questions, if you remember the history of the file.  Because I want to make sure there is not a bug somewhere, where some part of Inkscape should have noticed some change that was made, and didn't fix the scale factor.

Do you know if the original Display Units was set to something else?  I'm not sure what units Inkscape thought was in use, with the 0.26458 scale factor.  That value doesn't match any of the other options which Inkscape offers.......unless the file was started using an older version of Inkscape?  Was this file created originally with some other program?   Did you use a template or custom default doc which has units other than pixels?  Was the template or custom default created with an older version of Inkscape?  Do you have any clue what might have caused the non-1.0 scale factor?

Thanks if you can answer any of that  :)

Well, the best news is that you solved the problem!
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

April 01, 2017, 09:09:19 PM
Reply #8

mcpdeltat

  • Sr. Newbie

  • Offline
  • **

  • 4
Well, I think I have some clues for you, but the 'why' is beyond my understanding.

I originated that file as a New Document in version 0.92.1, 64-bit. When first installed, the default Display Units is set to mm and the Scale Factor is 1.0. When I change Display Units to px, the Scale Factor automatically changes to 0.26548. That Scale Factor seems to come, mathematically, from the defined unit 'px' = 1/96 inches times 25.4 mm per inch = 0.26548...That is, 1 px = 0.26548 mm. In fact, any selection made for Display Units seems to result in a Scale Factor relative to millimeters.

I don't know if that is a bug, per se, or by design, but it seems as if one would want the Scale Factor to remain at 1.0, unless purposely changed. It results in some confusing behavior.

As an experiment, I set Display Units to px, leaving other document settings at their defaults (Scale Factor went to 0.26548). I then drew a horizontal line, set the units in the Tool Control Bar to mm and made the line width 100 mm. I then opened the Ruler Path Effects tool and set those units to mm and made Mark Distance = 5. The result was non-sensical. I had to change the Ruler Path Effects units to px, with Mark Distance = 5 to see marks every 5 mm. This seems like a strange way to work, but again, I am a newbie, not a professional.

I hope all this helps in deciding if this is a bug or a feature and determining where to go from here.

Chris
Inkscape 0.92.1, Windows 10

April 02, 2017, 04:20:46 AM
Reply #9

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Yes, a new doc should be starting with a scale factor of 1.  Especially a file which was created new in 0.92.x.

I do see that if  I set a document for mm, then change the scale factor to 1, and then if I change it back to px, it shows 0.26548.  I'm sure that part is correct.

But I wonder how it started originally as mm?  I thought default docs open with px units (unless someone is using a template or custom default).

Oh no, I'm wrong about that.  I just opened a default-default doc (I use a custom default normally), and it does open with mm and a scale factor of 1.0.  Which is exactly what you reported.

So Inkscape performed as expected, as far as automatically changing the scale factor, when you changed the units.  As far as I understand, that maintains the new DPI standard of 96.....or maybe it maintains the page size (I get SO confused about DPI!).

So now it seems like the Ruler LPE isn't working properly with a unit change, and that probably IS a bug.

Let me check the bug tracker, to see if it's been reported, and I'll post again shortly.
« Last Edit: April 02, 2017, 05:03:00 AM by brynn »
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

April 02, 2017, 04:23:58 AM
Reply #10

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
It appears to already be reported:  https://bugs.launchpad.net/inkscape/+bug/1460858

I haven't read it yet, and it may take me some time to digest.  But the title sounds spot-on.

Edit
Oh no, after reading it, it's not the same thing at all.  This was reported for 0.91, which had no Scale Factor.

I'm going to report on the mailing list, before I make a bug report.  Will report replies  :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

April 18, 2017, 04:38:54 AM
Reply #11

Flipper42

  • Newbie

  • Offline
  • *

  • 1
Hi there,

I am experiencing a similar if not the same problem, however I am unsure, so please accept my apologies in case this is a double post.

I started by changing the canvas units to mm and changing the size to 550 x 500 (scale factor was and is 1.0, first screen shot). Grid was set to 5 mm distance.

Next step was a 50 mm long line (see second screen shot), which seems ok, also by the dimension and the measure extension.

Next I used the ruler extension with the setting displayed below (last screen shot), and with the results shown in screen shot #2... Which seems to inaccurate to me....

Am I doing something wrong? Or is there a workaround?

Any help os greatly appreciated!

Regards

  Philip

April 18, 2017, 07:46:01 AM
Reply #12

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
@Flipper42: The bug is the same one that was linked by Brynn.

To make the ruler LPE work accurately in your document in Inkscape 0.92, do the following:
- set display units (in File -> Document properties) to px
- set scale to 1