Ruler start click can't snap to vertex anymore?

Hello to all,
I've updated KLayout from 0.24.6 to 0.26.4 some days ago and wonder about ruler behaviour change. As before I prefer to use only object snapped rulers (grid shouldn't matter), but with the 0.26.4 only the second ruler click snaps to the object's vertex but the first click doesn't anymore. By that, a let's say 0.08mm side length of an object can't be checked, because the ruler start in most cases doesn't hit the object edge, showing a value different from 0.08mm, see attached 'KLayout 0.26.4 - notOK.png'.
It shows out, that the first click hits merely the object edge, but not its corner/vertex.
In Version 0.24.6 also the first click snaps to the vertex reliably, see attached KLayout 0.24.6 - OK.png.
Or have I missed the suitable ruler configuration setting?
What should be done to get a ruler, whose both(!) ends are able to snap on object vertexes/corners?

BTW: The above mentioned issue applies also to the actual version (Windows) 0.26.7

Thank you for helpful hints ...


  • Sorry, I can't confirm 0.26 doesn't snap the first vertex. It's working nicely for me.

    Maybe there is a configuration issue. Try with a fresh configuration (rename "c:\users\your_name.klayout\klayoutrc" to something else and start again).


  • @Matthias: Renaming klayoutrc doesn't matter from my view.
    At first I wondered at your answer 'It's working nicely for me.'. But now I suppose to have the full picture:
    For that I should describe the different 'ruler first click scenarios' more precisely: To hit the vertex in the old version 0.24.6 it was sufficient to click
    ** ANYWHERE **
    near the vertex, (as long as the click fulfills the 'snap range' limit in the config dialog (see my 1st posting attachment), what is assumed for all clicks described in my thread). In the newer versions (at least 0.26.4 and 0.26.7) this behaviour is changed as follows (side length measurement of a rectangle):
    To hit the vertex of a corner for a ruler start point reliably one should
    (a) click inside the 270° angle of the corner in a manner, so that
    (b) the vertex is for sure closer to the click than all the edge points.
    By that edge points can be avoided reliably. But if the first click is inside the 90° angle area of the corner, the click is always nearer to the edge than to the vertex, so it is hard or impossible to hit the vertex as the ruler start.

    My conclusion: In version 0.24.6 it was easy to hit a vertex as ruler start. In the newer KLayout versions this got a little bit tricky, but remains possible by following the rules (a) and (b) described above. (BTW: The same applies to the ruler end point.)

    Is the new, more tricky, behaviour indeed the intended behaviour?

  • Well, 0.24.6 is pretty old. I'm not going to scan four years of commits to answer the last question. Maybe the changed behaviour is a consequence of the auto-measure feature or some other request. I simply don't remember.

    I'm using the ruler feature myself maybe a thousand times on every single day. Condition b) still leaves you with a full 180 degree vertex-capture aperture for a 90 degree corner. For me that's enough.

    You can upgrade to 0.24.10 which is still on the server and happily live with the old snapping algorithm.


  • Thank you for your feedback, Matthias. You mentioned a "180 degree vertex-capture aperture for a 90 degree corner": From my view there is only a "90 degree vertex-capture aperture for a 90 degree corner", whose boundaries are given by the side extensions of the corner. Anyway, after knowing the new behaviour I should be able to get familiar with that. For me KLayout is a very helpful, fast tool.

Sign In or Register to comment.