Persistent ruler tool instances

Bug #1676814 reported by John Beard
32
This bug affects 7 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Unknown

Bug Description

Broken out from a comment on lp:1672040 and mentioned again on the mailing list.

From the old comment by kandrey89:

Also ruler needs to be a single object that can be placed on the layout and stay there, not disappear. Useful when building up a complicated layout, by having multiple rulers in key places. The first mouse click should make the ruler appear and interactive like it is now, second click should place the ruler on the layout, an Esc should remove the ruler after the 1st click, a Delete button or right click menu selection should remove the ruler from the layout. The ruler object should be able to be moved about the layout or locked into place explicitly by the user through a shortcut key or a right click menu option. A locked ruler is allowed to be deleted, just cannot be dragged.

Tags: pcbnew
Revision history for this message
John Beard (john-j-beard) wrote :

To keep these on the canvas should be relatively straightforward, as they /are/ EDA_ITEMS at heart. Hower saving into files would have to be a format bump. The item description should be pretty simple, perhaps just:

 (ruler (start 100, 100) (end 200, 200) (style 1))

Where style is used to allow new ruler types (eg a circle, grid graticule, scale bar, etc) to be easier to add in future without having to special-case older formats.

Perhaps also persistent rulers should be able to optionally force the units used, so you can keep a mm ruler even when you change canvas units to inch, so that would need a field too.

Note, if these persist in any way, they won't be visible in the legacy canvas.

Revision history for this message
José I. Romero (jose-cyborg) wrote :

There already is a "persistent ruler" object, dimensions. It would be nice if those could be improved/replaced. Their implementation right now is pretty wonky, numbers don't update automatically unless you move the endpoints, units and numerical precision cant be forced and there is only one style (parallel linear). Also, in GAL, the text can't be moved away from the dimension and there is no way to make it use external arrows for small dimensions.

Revision history for this message
John Beard (john-j-beard) wrote :

I guess the question here is how much overlap there should be between the dimension items (permanent "drawing" items that can go on real layers) and ruler overlays that are on the special GAL overlay layer, and aren't really part of the PCB.

Dimension items are specified in the format quite precisely:

  (dimension 68.685752 (width 0.3) (layer F.SilkS)
    (gr_text "2.7042 in" (at 127.262453 64.490833 356.8201699) (layer F.SilkS)
      (effects (font (size 1.5 1.5) (thickness 0.3)))
    )
    (feature1 (pts (xy 160.02 93.98) (xy 161.627338 65.047912)))
    (feature2 (pts (xy 91.44 90.17) (xy 93.047338 61.237912)))
    (crossbar (pts (xy 92.897569 63.933755) (xy 161.477569 67.743755)))
    (arrow1a (pts (xy 161.477569 67.743755) (xy 160.320271 68.266786)))
    (arrow1b (pts (xy 161.477569 67.743755) (xy 160.385328 67.09575)))
    (arrow2a (pts (xy 92.897569 63.933755) (xy 93.98981 64.58176)))
    (arrow2b (pts (xy 92.897569 63.933755) (xy 94.054867 63.410724)))
  )

You can also replace the text with free text.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Technically, rulers are not really part of the board. They have no meaningful output required for fabrication. It might be worth exploring saving them as properties which would (should?) not require a change in the board file format. I would like to keep board file objects confined to board fab requirements if possible.

Revision history for this message
Anton (antonpupkov) wrote :

Something very difficult. Just make sure that the measuring tool works in the same way as Highlight Net. You can add the ability when you can draw several roulettes instead of one. The first pressing of the Esc key disables the measuring tool, the second pressing clears the canvas on the drawn rulers. Pretty simple and practical. I also opened a similar report #1826637 with the proposal of such a simpler implementation and quite convenient to use.

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

KiCad bug tracker has moved to Gitlab. This report is now available here: https://gitlab.com/kicad/code/kicad/-/issues/2055

Changed in kicad:
status: New → Expired
Changed in kicad:
importance: Wishlist → Unknown
status: Expired → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.