Inkscape.org
Beyond the Basics Fastest way to make custom ruler
  1. #1
    ronburk ronburk @ronburk

    There's any number of ways to do this, I'm asking if someone has a faster way. I'm using the alpha build, where the ruler tool seems more functional, but I can't see that it does what I need here. Which is:

    I'm drawing timelines. I want to position crossbars for specific dates roughly in proportion to the actual distance between dates. So, the problem is: I have a timeline of some arbitrary length that is appropriate for the space it must appear in. I need a ruler that gives me N evenly spaced tick marks across the timeline (e.g., on some particular timeline, I might want the distance between ticks to equal 100 years). I can use those tickmarks to quickly put the crossbars for particular dates roughly where they should go. Finally, I make the tickmarks disappear, because I don't want any regular ruler marks on the timeline, only crossbars for the events the timeline is meant to show.

    I can do this what seems the hard way.

    1. make a tickmark put at one end of the timeline.
    2. make another for the other end.
    3. dup one of those tickmarks N-2 times, where N is how many ticks I want to span the timeline
    4. use the distribute dialog to distribute the ticks evenly
    5. group it all so I can easily hide it later

    Any faster way to get an arbitrary ruler with evenly spaced marks on it? It would be nice if they could be auto-numbered, but I'm living without that as is, so apparently not crucial. Of course, I don't want to be messing with the document ruler, since this is just one small part of a drawing. Attached photo shows tick marks made the slow way in red, meant to be 100 years apart.

     

     

    Foo
  2. #2
    brynn brynn @brynn
    *

    "Ruler tool"....hhmm....  Could you be talking about the Measurement tool, which has a little ruler for its icon/button?  That would definitely not help in drawing the timeline, but only in measuring it later.  (Although perhaps it has new features in the alpha version, which I haven't used much.)

    There is a Ruler LPE, which adds the tick marks automatically, according to the units you desire.  Path menu > Path Effects > Ruler.  Note that you need to first draw the main path and have it selected when you call up the the LPE.  Then afterwards, you can change the units and other options.  (It's a live editing feature - LPE = Live Path Effects)

    However, as for deleting the tickmarks later....  Let's see....  To do that, after you have the ruler made, it's a bit clunky.  You would have to do the following:

    • Path menu > Object to Path
    • Path menu > Break Apart
    • With Selection tool, hold the Shift key while you click on the main long line (this deselects the long line, leaving all the tickmarks selected)
    • Then finally, Delete.

    Ok, this is my suggestion, and others may have better ideas.

    Draw your "manual" timeline as you have been doing, with both end tickmarks (if needed). Duplicate the long line, and use the Ruler LPE on it.   (Maybe make it a different color, to help avoid confusion.)  Use that ruler to measure where to place your custom tickmarks, and place the custom tickmarks on the "manual" timeline.  Then you could delete the entire LPE-made ruler when finished.

    Instead of making the 2nd ruler a different color, or maybe in addition, you could use a separate layer for the 2nd ruler, and then hide the layer, rather than delete the 2nd ruler.  That way, the ruler is still there, in case you might need it again later.  Just a thought.

    Edit

    It seems like there might be an extension that will help with drawing a ruler, but it doesn't jump to the front of my mind, at the moment.  As soon as I recall what it is, I'll post it.

  3. #3
    Maren Hachmann Maren Hachmann @Moini

    Useful links:

    https://github.com/brathering82/inkscape

    http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Paths-LivePathEffects-Ruler.html

  4. #4
    ronburk ronburk @ronburk

    You're right, its icon is a ruler but it's tooltip name is "Measurement tool".

    Wow, it never occurred to me to look in path effects. I try to avoid extensions when possible; I guess the design is such that they have to read/write the whole file, which seems to get deathly slow with the fairly complex drawings I tend to be working on. So the Ruler LPE seems like what I'm looking for.

    The documentation on the Ruler LPE didn't quite get me going. I set the units to inches. And then "Mark Distance" is supposedly "Distance between successive ruler marks". Huh? Measured in what? It's certainly not inches. Nor tenth inches. Changing it definitely changes the distance between marks, but the relationship between that number and the actual distance between marks is mystifying.

  5. #5
    Maren Hachmann Maren Hachmann @Moini
    *

    I see a unit indicator in the dialog. If you don't, then an update could help (to 0.92.4) (see attachment)

  6. #6
    Maren Hachmann Maren Hachmann @Moini

    As for the extension - if it's too slow in an existing file, you could open an empty document, create it and then cut and paste it back.

  7. #7
    Tyler Durden Tyler Durden @TylerDurden

    The interpolate extension will make n number of tickmarks in between two end tickmarks...

  8. #8
    ronburk ronburk @ronburk

    This appears to be a bug in the ruler LPE in which I ended up with the units set to inches, but one or more of the parameters were still in pixels. Haven't been able to repro it since closing and re-opening the document, though.

    > an update could help (to 0.92.4)

    I thought this forum used to display our current Inkscape version in posts. Or did I dream it?

    Anyway, I'm using latest stable release or 1.0alpha2 (4ce689b25c, 2019-06-24), mostly the latter.

  9. #9
    Maren Hachmann Maren Hachmann @Moini

    Yes, I had that same issue when I planned my garden pond... Don't remember if it was solved.

  10. #10
    Tyler Durden Tyler Durden @TylerDurden
    *

    Seems to work here with the document scale set:

     

    If you are interested in using the Interpolate extension:

  11. #11
    brynn brynn @brynn
    ronburk

    I thought this forum used to display our current Inkscape version in posts. Or did I dream it?

    The Inkscape Community forum does that.  But this new forum does not have such a feature.  You certainly could request it, if you like.  I think someone requested signatures for this forum, And in that case, each member could put their version and operating system in their signature.  Theoretically, if signatures were added, there could also be added automatic fields for the version and os.  But again, you'd have to request it.

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Fastest way to make custom ruler