Constraining the dimension tool doesn't constrain the number shown

Bug #1780826 reported by Seth Hillbrand
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Medium
John Beard

Bug Description

When adding a dimension to the pcb, you can use Ctrl to limit the axes used. However, the number shown before clicking uses the mouse cursor position rather than the constrained measurement position as its reference.

N.B. This also happens with the dimension tool

Application: kicad
Version: (5.0.0-rc3-dev-7-gc9c9245e7), release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.52.1 OpenSSL/1.0.2l zlib/1.2.8 libidn2/0.16 libpsl/0.17.0 (+libidn2/0.16) libssh2/1.7.0 nghttp2/1.18.1 librtmp/2.3
Platform: Linux 4.9.0-6-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.62.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.52.1
    Compiler: GCC 6.3.0 with C++ ABI 1010

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

Tags: pcbnew
Seth Hillbrand (sethh)
description: updated
Revision history for this message
John Beard (john-j-beard) wrote :

For the dimension tool, this looks like DRAWING_TOOL::constrainDimension() only constrains the angle. If you watch closely, the length is still the hypotenuse to the mouse.

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

Almost exactly the same thing in TWO_POINT_GEOMETRY_MANAGER::SetEnd(), which is what governs the measure tool geometry.

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

This patch fixes this by using a snapping algorithm that keeps the new snapped vector on the grid.

Revision history for this message
Jeff Young (jeyjey) wrote :

@Seth, were you doing something here, or shall I test and merge John's patch?

Revision history for this message
Seth Hillbrand (sethh) wrote :

Yes, please do. Hasn't gotten to it yet

Jeff Young (jeyjey)
Changed in kicad:
status: New → In Progress
assignee: Seth Hillbrand (sethh) → Jeff Young (jeyjey)
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 7acc0b89f9bbbd59365bc3845b2f3fa827d509e9
https://git.launchpad.net/kicad/patch/?id=7acc0b89f9bbbd59365bc3845b2f3fa827d509e9

Changed in kicad:
status: In Progress → Fix Committed
assignee: Jeff Young (jeyjey) → John Beard (john-j-beard)
Revision history for this message
Jeff Young (jeyjey) wrote :

I tested an merged your patch, John. Thanks for your contribution!

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

Other bug subscribers

Remote bug watches

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