Nightly making weird zone refill shapes

Bug #1812393 reported by Frank Severinsen on 2019-01-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Critical
Seth Hillbrand

Bug Description

Hi Guys

I just opened this board which is made in V5.0.0 (actually V4 and later ported to 5), and when I refill the zones in nightly (see version below) I get these triangle shapes in the zone fills.
The guy who designed the board is not very experienced in kicad, so it might be a problem due to that, but it might also be a bug.

The bug show both in nightly Kicad and nightly PCBnew. Doesnt show in 5.0.2

I'll be happy to send the boardfile in private, but I can't add it here.

Application: kicad
Version: 6.0.0-rc1-unknown-7f6801b~84~ubuntu18.10.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) nghttp2/1.32.1 librtmp/2.3
Platform: Linux 4.18.0-13-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.67.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.0
    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=OFF
    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

Frank Severinsen (shack) wrote :
Frank Severinsen (shack) wrote :
Seth Hillbrand (sethh) wrote :

Hi Frank, can you send me your files?

Changed in kicad:
assignee: nobody → Seth Hillbrand (sethh)
milestone: none → 5.1.0
Frank Severinsen (shack) wrote :

I was actually considering sending the file to you when I made the bugreport :P

File has been send to your email

Seth Hillbrand (sethh) on 2019-01-18
Changed in kicad:
status: New → In Progress
importance: Undecided → Critical
Seth Hillbrand (sethh) wrote :

@Frank- Should be fixed. Would you mind if I used the polygon points (no board file, just the x-y pairs) of the plane in a unit test? This was a good, complex fill with touching vertices, multiple steiner points and a multiple fracture result. Touched almost the full use case of the tesselation routines in one go.

KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: In Progress → Fix Committed
Frank Severinsen (shack) wrote :

@Thanks Seth

Sure thing!

Frank Severinsen (shack) wrote :

Just tested, works Nicely now. Thanks Seth

Martin Thomas (mtlaunchpad) wrote :

The current version (a4d4d9a2419a9aed80ce1be1b14a53f79c0385a5) still have this issue.

Frank Severinsen (shack) wrote :

To me that looks more like big clearances. Can you share your board file?

Martin Thomas (mtlaunchpad) wrote :

Here is a Board with that issue. It appears on Monday after I compiled the most current version.

Might be related to my revert of the geometry patch (trying to fix the P&S) from yesterday. @Seth does the triangulation algorithm rely on SHAPE_LINE_CHAIN::PointInside/Pointon Edge?

29.01.2019 13:21 Martin Thomas <email address hidden> napisał(a):
Here is a Board with that issue. It appears on Monday after I compiled
the most current version.

** Attachment added: "USB2-7port-hub.kicad_pcb"
   https://bugs.launchpad.net/kicad/+bug/1812393/+attachment/5233595/+files/USB2-7port-hub.kicad_pcb

--
You received this bug notification because you are a member of KiCad Bug
Squad, which is subscribed to KiCad.
https://bugs.launchpad.net/bugs/1812393

Title:
  Nightly making weird zone refill shapes

Status in KiCad:
  Fix Committed

Bug description:
  Hi Guys

  I just opened this board which is made in V5.0.0 (actually V4 and later ported to 5), and when I refill the zones in nightly (see version below) I get these triangle shapes in the zone fills.
  The guy who designed the board is not very experienced in kicad, so it might be a problem due to that, but it might also be a bug.

  The bug show both in nightly Kicad and nightly PCBnew. Doesnt show in
  5.0.2

  I'll be happy to send the boardfile in private, but I can't add it
  here.

  Application: kicad
  Version: 6.0.0-rc1-unknown-7f6801b~84~ubuntu18.10.1, release build
  Libraries:
      wxWidgets 3.0.4
      libcurl/7.61.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) nghttp2/1.32.1 librtmp/2.3
  Platform: Linux 4.18.0-13-generic x86_64, 64 bit, Little endian, wxGTK
  Build Info:
      wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
      Boost: 1.67.0
      OpenCASCADE Community Edition: 6.9.1
      Curl: 7.61.0
      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=OFF
      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

To manage notifications about this bug go to:
https://bugs.launchpad.net/kicad/+bug/1812393/+subscriptions

@Tomasz,

I am thinking the new code for SHAPE_LINE_CHAIN::PointInside() is broken.
To be honest I don't understand the new code (the old code was an usual algorithm and worked fine)

SHAPE_LINE_CHAIN::PointInside() also fails in QA tests.
Because it does not work, zone filling does nor work fine for pads with thermal reliefs, that use the PointInside() to keep or remove the thermal shape.

Seth Hillbrand (sethh) wrote :

@Tom- Triangulation doesn't rely on the poly-point routines (at least not intentionally).

The issue (I think) with the new algorithm is that it is only valid for convex polygons. A polygon like:

___________
| |
| _ |
| | | |
|___| |___|

Will potentially break as not all interior points are on the same side of all segments

Seth Hillbrand (sethh) wrote :

Ah, my beautiful line art! Destroyed by an uncaring Launchpad. :)

Here's the example in image form, taking the point to test as the star.

Martin Thomas (mtlaunchpad) wrote :

May I suggest to revert the changes, fix the code and give it a new try, in the master?

Seth Hillbrand (sethh) wrote :

It is already fixed in master. You can download the latest nightly to try it out.

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

Other bug subscribers