Interactive router in Shove mode creates non-45deg tracks which violate DRC

Bug #1810935 reported by eelik
16
This bug affects 4 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
High
Tomasz Wlostowski

Bug Description

This is a bit difficult to describe (and search for) so I don't know if this is a duplicate. But here is a video of a situation into which I bump every now and then with the interactive router in Shove mode.

The router suddenly finds a route which violates DRC and the angle of the track isn't n*45deg even though I have limited the angle. It kind of takes a shortcut, the shortest distance between points A and B. I can't find the reason or exact situation when this happens, it just happens every now and then. It has happened for a long time, it doesn't depend on some specific version. IIRC I have seen this even long before 5.0.

Here are some restrictions which I think apply for the situation:

I have used or am using small grid, e.g. 0.05mm in this specific case. Maybe I have used even smaller for the same project and then changed. It probably happens when I try to route to a pad, or work nearby a pad, but I'm not sure about this. The distance is pretty small, a couple of mm at most (again IIRC).

Application: kicad
Version: (6.0.0-rc1-dev-1491-g0a4812be0), 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

Tags: pcbnew
Revision history for this message
eelik (eelik) wrote :
description: updated
Revision history for this message
Tomasz Wlostowski (twlostow) wrote :

Could you send me (in private) the PCB layout that you're editing in the video above?

Tom

Revision history for this message
eelik (eelik) wrote :

I didn't remember to save the state but luckily could simplify the board and repeat the problem even more visible way.

Revision history for this message
eelik (eelik) wrote :

Here is a video of the bug with the simple project above.

Revision history for this message
eelik (eelik) wrote :

I forgot to mention that the latter video is from Linux:

Application: kicad
Version: (6.0.0-rc1-dev-1497-g419718b59), release build
Libraries:
    wxWidgets 3.0.4
Platform: Linux 4.15.0-43-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.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=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=OFF
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=OFF

Revision history for this message
eelik (eelik) wrote :

This happens also with standalone pcbnew, the Linux version as above. The current grid doesn't seem to have effect.

Changed in kicad:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Tomasz Wlostowski (twlostow)
milestone: none → 5.1.0
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 4a0fba309ab6e707c9d964abfb503c15179f56db
https://git.launchpad.net/kicad/patch/?id=4a0fba309ab6e707c9d964abfb503c15179f56db

Changed in kicad:
status: Confirmed → Fix Committed
Revision history for this message
Seth Hillbrand (sethh) wrote :

Hi Tom- This fix seems to prevent zone filling with thermal relief. I've tested this with a couple of the demo boards (xilinx, pic) and the thermals are removed when refilling. I haven't dug into where the break is but bisect identifies this as the change.

Do you have time to look at this?

Changed in kicad:
importance: Medium → Critical
status: Fix Committed → Triaged
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I wonder if this is the same commit that broke the shape_poly_set_refactor test. I just noticed that it is failing.

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

There was another comment on the previously fixed bug lp:1812393. I don't know if it's related but I'm guessing it is. @Tom, if you cannot get to this soon, we should revert the commit until you have time to work on it.

Revision history for this message
Tomasz Wlostowski (twlostow) wrote :

Hi Wayne,

@Seth found another bug in the triangulation code which was responsible for lp:1812393. I'm going to bring back SHAPE_LINE_CHAIN::PointInside() as the old code that I previously reverted to didn't support non-convex polygons. I just rewrote the math to use fixed point to avoid rounding issues causing the P&S to misbehave.

Tom

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

Hi Tom-

FYI I temporarily reverted to ensure our nightly build doesn't have this issue until you get a chance to push your update

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

This appears fixed in 7d544d1ffe

Changed in kicad:
status: Triaged → Fix Committed
Revision history for this message
eelik (eelik) wrote :

No, it still happens.

Application: kicad
Version: (6.0.0-rc1-dev-1665-g55b5c7189), release build
Libraries:
    wxWidgets 3.0.4
Platform: Linux 4.15.0-43-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.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=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=OFF
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=OFF

Revision history for this message
Tomasz Wlostowski (twlostow) wrote :

Yeah, it still does... :/

Working on a fix.

Changed in kicad:
status: Fix Committed → Confirmed
importance: Critical → High
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 313ebb9dffcd02edb1a93dc139391ea5d55e87c0
https://git.launchpad.net/kicad/patch/?id=313ebb9dffcd02edb1a93dc139391ea5d55e87c0

Changed in kicad:
status: Confirmed → Fix Committed
Revision history for this message
eelik (eelik) wrote :

Unfortunately this hasn't still been fixed completely. See the attached video.

Application: kicad
Version: (6.0.0-rc1-dev-1679-g08c944a46), release build
Libraries:
    wxWidgets 3.0.4
Platform: Linux 4.15.0-43-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.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=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=OFF
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=OFF

Revision history for this message
Tomasz Wlostowski (twlostow) wrote :

Hi,

Can't reproduce it here...
- what grid do you use
- what router mode?

Tom

Revision history for this message
eelik (eelik) wrote :

Grid was 0.5mm. Router settings are in the attached screenshot. The problem was was harder to reproduce than earlier, as you can see in the video it happened only in one point and required quite much random moving, unlike earlier with the same example. So it looks like it has been fixed partially.

Revision history for this message
Tomasz Wlostowski (twlostow) wrote :

Try the latest nightly.

Revision history for this message
eelik (eelik) wrote :

It doesn't happen on Windows 7 64bit with the latest nightly build. I'll try again soon at home with the same Linux as above with the latest code.

Application: kicad
Version: (6.0.0-rc1-dev-1681-g5edf3503c), 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

Revision history for this message
eelik (eelik) wrote :

I tested on Linux. The fix for https://bugs.launchpad.net/kicad/+bug/1814433 fixes this one, too, despite the little bit inaccurate commit message.

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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