pcbnew: Caliper doesn't snap correctly despite using the Alt key

Bug #1822002 reported by Laurent Haas on 2019-03-27
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Invalid
Undecided
Unassigned

Bug Description

The caliper tool doesn't snap correctly to pads center, despite using the Alt key. It snaps correctly on the anchor of the footprint (its center for SMD, pin 1 for THD) but never the other pads if they're not aligned to the grid. Looks specific to Windows (https://forum.kicad.info/t/measure-tool-in-gerbview-auto-snap-to-features/15990/8?u=efcis)

Application: kicad
Version: (5.1.0)-1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 7 (build 7601, Service Pack 1), 32 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

eelik (eelik) wrote :

As can bee seen in the linked thread, I tried with 5.1.0 on Win10 and saw the same bug. However, here it works (on Win7):

Application: kicad
Version: (5.1.0-34-g078320e2f), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 8.2.0 with C++ ABI 1013

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

eelik (eelik) wrote :

On Windows 10, Lenovo T430 laptop:
- Finnish keyboard layout
- Version: (5.1.0-49-gc1c4a0925), release build
- In pcbnew preferences "Snap to Pads" is either Never or When creating tracks
- With or without left Alt key, measuring caliper snaps to the centers of footprints, not to pads

- "Snap to Pads" is Always:
- Caliper tool snaps to centers of footprints and to pads, with or without Alt

On Linux Kubuntu 18.10, desktop PC:
- Finnish keyboard layout
- 5.1.0-30-gfb0 (self-compiled)
- "Snap to Pads" is either Never or When creating tracks:
- Without Alt doesn't snap, with Alt snaps to centers of footprints but not to pads

- "Snap to Pads" is Always:
- With Alt snaps to centers of footprints and to pads
- Without Alt doesn't snap to anything

I'll have to test with the previously mentioned Win7 setup later.

eelik (eelik) wrote :

OK, Windows 7, old desktop PC:
- Finnish keyboard
- Version: (5.1.0-63-g2447933b5) (the latest nightly build)
Behaves exactly the same as the Linux version.

Seth Hillbrand (sethh) wrote :

@eelik- The 'Alt' key controls whether you snap to grid. The 'Shift' key controls whether you snap to control points.

It does feel like Alt controls the point snapping because without it, you need to be closer to the control point than to the grid before it will snap. This behavior is probably counter-intuitive and should probably be adjusted after we get maximum distance control point snapping (right now, it is the whole view window).

Can you test again, ensuring that the grids are the same? You can also make the grid really big to get control point snapping more easily.

eelik (eelik) wrote :

Yes, that is probably right. Difficult thing to master, this KiCad.

@Laurent/@eelik, did Seth's comment help/solve this for you?

Changed in kicad:
status: New → Incomplete
Laurent Haas (efcis) wrote :

Thanks for the information but IMHO, there is still something wrong, or that can be improved. Let me rephrase what it does for me :

My current preferences setting is "Snap to Pads : When creating tracks" (not "Always"). I'm using a 50 mils grid. I have several components off this grid.

- No Alt and no Shift : Grid constraint active, and it snaps only on footprint anchors (white circle / target).
- If I use Alt, same behavior as above.
- If I use Shift, the grid constraint is active, but it never snaps (there is never white circle / target)
- If I use Alt + Shift, there is no more grid constraint, and it never snaps (no white circle / target).

In other words, unless I miss something, there is no key combination that allows snapping on non-anchor pads.

The only way is to modify the preferences "Snap to Pads : Always".

Is it the intended behavior ?

Yes, this is the intended behaviour because you are using the Measure tool, not creating tracks. Therefore it obeys your settings of "Snap to Pads : When creating tracks" by not snapping to pads when you're not creating tracks.

While using (e.g.) measure tool:
No alt and no shift: snap to grid and magnetic points (if enabled in preferences)
Hold down Shift: disable magnetic points snapping (Place only on grid, ignore everything else).
Hold down Alt: disable the grid snapping (Makes snapping to graphical objects easier).
Hold down Shift+Alt: disable magnetic points and grid snapping.

Changed in kicad:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers