Pcbnew rotate around user origin actually rotates around sheet origin

Bug #1838254 reported by Scott Hurst
This bug report is a duplicate of:  Bug #1773638: The origins of 6.0 (pun intended). Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
New
Undecided
Unassigned

Bug Description

I'm trying to use Pcbnew to rotate a collection of objects around a specific point with the "Move Exactly..." context menu command. The "Rotate around local coordinates origin" option always results in the collection rotating around the sheet origin {0, 0}. I traced the source code to find where and why this happens and it is due to a call to GetScreen() rather than GetGridOrigin() in pcbnew/tools/edit_tool.cpp. The field that is returned is apparently never altered.

The fix is simple. Patch attached. This inludes a related change to the associated text in the dialog box (pcbnew/dialogs/dialog_move_exact.cpp)

The workaround for now is to place the "Drill and Place Offset" at the desired rotate-about location and using the "Rotate around drill/place origin" instead.

Thanks!

Application: kicad
Version: (5.1.2)-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 8 (build 9200), 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

Tags: pcbnew
Scott Hurst (myamigo)
summary: - Pcbnew rotate around user origin does nothing
+ Pcbnew rotate around user origin actually roates around sheet origin
tags: added: pcbnew
Scott Hurst (myamigo)
summary: - Pcbnew rotate around user origin actually roates around sheet origin
+ Pcbnew rotate around user origin actually rotates around sheet origin
Revision history for this message
Scott Hurst (myamigo) wrote :
Revision history for this message
Jeff Young (jeyjey) wrote :

Hi Scott,

While confusing, there is both a local coordinates origin and a grid origin, which are different. You reset the local coordinates origin by hitting the spacebar.

When I tried it the objects rotated correctly around the origin I set with the spacebar. Could you try this and see if it works?

Even if it turns out not to be needed, thanks for the patch!

Cheers,
Jeff.

Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

For now I will mark this as a duplicate of the bug intended for discussing the different origins in Pcbnew. If there is indeed a bug to be fixed the duplicate status can be removed.

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.