pcbnew: circles and arcs plot to dxf as segments of lines in outline mode

Bug #1677317 reported by Eldar Khayrullin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Jeff Young

Bug Description

See image:
-left pcbnew arc
-right imported dxf (ploted from pcbnew).

Application: pcbnew
Version: no-vcs-found-8f3423b~58~ubuntu16.10.1, release build
Libraries: wxWidgets 3.0.2
           libcurl/7.50.1 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.33 librtmp/2.3
Platform: Linux 4.8.0-44-generic x86_64, 64 bit, Little endian, wxGTK
- Build Info -
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.61.0
Curl: 7.50.1
KiCad - Compiler: GCC 6.2.0 with C++ ABI 1010
        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

Tags: dxf pcbnew plot
Revision history for this message
Eldar Khayrullin (eldar) wrote :
Revision history for this message
Eldar Khayrullin (eldar) wrote :
Eldar Khayrullin (eldar)
summary: - pcbnew: arcs plot to dxf as segments of lines
+ pcbnew: circles and arcs plot to dxf as segments of lines in outline
+ mode
Revision history for this message
Jeff Young (jeyjey) wrote :

The DXF-specific outline-mode checkbox has been made more specific to make it clear that it will use polygons.

That being said, the current polygon step size presumes it's drawing pads, vias, or zone rounded corners. It's way too coarse for things like arcs on drawing layers.

Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)
status: New → In Progress
Revision history for this message
Nick Østergaard (nickoe) wrote :

Why can't the outline mode just use arc's instead of polygonize them?

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

The outline mode is specifically "plot polygon mode". Whether there's a reason for that or not I don't know.

@JP?

(BTW: I do have a fix for this that scales the via-pad segment-count up for larger items.)

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

Attached patch not marked with "fixes" as I'm not sure whether we should be drawing arcs or not.

But it's a good patch either way, for if we do want to draw polygons for this (or some other feature), then we need to scale up the number of segments for larger items.

(And it fixes a typo in the plot dialog.)

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

The reason arcs are not used is because they cannot be drawn with thickness. Otherwise the plot will have lines with thickness and arcs and circles as thin lines which is definitely not what you want. The checkbox wording is confusing. It should read "Plot using outlined polygons" which draws parallel lines that represent the thickness of the lines as defined in the board. When this option is unchecked, you do get arcs and all the lines have no thickness. I'm not sure DXF ASCII R14 supports arcs with thickness. Otherwise we could just plot them as defined in the board which would be a nicer option. I'm fine with increasing the number of segments depending on the arc size to make a smoother polygon.

Revision history for this message
Jeff Young (jeyjey) wrote : Re: [Bug 1677317] Re: pcbnew: circles and arcs plot to dxf as segments of lines in outline mode

There are certainly comments in the code suggesting that it doesn’t support arc thickness. Whether they’re up-to-date or not is perhaps another question.

> On 19 Feb 2018, at 19:56, Wayne Stambaugh <email address hidden> wrote:
>
> The reason arcs are not used is because they cannot be drawn with
> thickness. Otherwise the plot will have lines with thickness and arcs
> and circles as thin lines which is definitely not what you want. The
> checkbox wording is confusing. It should read "Plot using outlined
> polygons" which draws parallel lines that represent the thickness of the
> lines as defined in the board. When this option is unchecked, you do
> get arcs and all the lines have no thickness. I'm not sure DXF ASCII
> R14 supports arcs with thickness. Otherwise we could just plot them as
> defined in the board which would be a nicer option. I'm fine with
> increasing the number of segments depending on the arc size to make a
> smoother polygon.
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1677317
>
> Title:
> pcbnew: circles and arcs plot to dxf as segments of lines in outline
> mode
>
> Status in KiCad:
> In Progress
>
> Bug description:
> See image:
> -left pcbnew arc
> -right imported dxf (ploted from pcbnew).
>
> Application: pcbnew
> Version: no-vcs-found-8f3423b~58~ubuntu16.10.1, release build
> Libraries: wxWidgets 3.0.2
> libcurl/7.50.1 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.33 librtmp/2.3
> Platform: Linux 4.8.0-44-generic x86_64, 64 bit, Little endian, wxGTK
> - Build Info -
> wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
> Boost: 1.61.0
> Curl: 7.50.1
> KiCad - Compiler: GCC 6.2.0 with C++ ABI 1010
> 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
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1677317/+subscriptions

Revision history for this message
Eldar Khayrullin (eldar) wrote :

Thickness hasn't sense for assembly and Edge.Cut layers.
It will be good to have possibility to plot copper layers with Edge.Cut where a copper layer used polygon mode (with thickness) and a Edge.cut used line mode (w/o thickness). The same is true and for Silk layers.

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

I would rather not mix polylines with thickness and lines with no
thickness. It's easy enough to plot them both ways and use the
appropriate layers as you see fit.

On 02/20/2018 12:59 PM, Eldar Khayrullin wrote:
> Thickness hasn't sense for assembly and Edge.Cut layers.
> It will be good to have possibility to plot copper layers with Edge.Cut where a copper layer used polygon mode (with thickness) and a Edge.cut used line mode (w/o thickness). The same is true and for Silk layers.
>

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

While it doesn't address whether or not we *want* to be using polygons, if we *are* going to use them then the patch greatly improves them for larger items.

Do we want to commit it?

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

I merged your patch. Thanks.

On 2/21/2018 8:18 PM, Jeff Young wrote:
> While it doesn't address whether or not we *want* to be using polygons,
> if we *are* going to use them then the patch greatly improves them for
> larger items.
>
> Do we want to commit it?
>

Jeff Young (jeyjey)
Changed in kicad:
status: In Progress → Fix Committed
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.