support cutout for polygons

Bug #1785117 reported by Thomas Pointhuber
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Unknown

Bug Description

Currently, the polygon tool (as well as filled zones,...) only supports a single outline. When for example using the "bitmap to footprint" tool it tries to resemble the image as multiple outlines. This works well for generating polygons but is annoying if anyone wants to manually draw/edit polygons with cutouts.

In my library implementation, There is a simple algorithm to convert an outline with cuts into a single polygon. Such a thing could also be done in the KiCad internals:

https://github.com/pointhi/kicad-footprint-generator/pull/128#issuecomment-385645275

# Current Version

Application: kicad
Version: (6.0.0-rc1-dev-239-g8e7d6063f), debug build
Libraries:
    wxWidgets 3.1.1
    libcurl/7.61.0 OpenSSL/1.1.0h zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) nghttp2/1.32.0
Platform: Linux 4.17.11-arch1 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.1.1 (wchar_t,wx containers) GTK+ 2.24
    Boost: 1.67.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.60.0
    Compiler: Clang 6.0.1 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=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
jean-pierre charras (jp-charras) wrote :

Zones support cutouts (holes).
And because polygons with holes cannot be drawn/plotted,
in Kicad code we frequently convert a polygon with holes to a polygon, and a polygon to a polygon with holes

Revision history for this message
Thomas Pointhuber (pointhi) wrote :

My point is mainly about polygons and their GUI representation. In case of filled zones, there are probably cases where cutouts can simplify things (zone in a cutout in a zone) and they probably share code so I added them in the issue as well.

Jeff Young (jeyjey)
Changed in kicad:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

KiCad bug tracker has moved to Gitlab. This report is now available here: https://gitlab.com/kicad/code/kicad/-/issues/2194

Changed in kicad:
status: Triaged → Expired
Changed in kicad:
importance: Wishlist → Unknown
status: Expired → New
Changed in kicad:
status: New → 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.