Pcbnew Gerber Export generates extra points in polygons

Bug #1847714 reported by St. Schulte
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
jean-pierre charras

Bug Description

Some CAM-processors stops plotting because at the end of some tracks there is an additional point (duplicated). Example:

G36*
X133318815Y-95218815D02*
G01*
X133239463Y-95315506D01*

X132685000Y-95185000D01*
X133360019Y-95185000D01*
X133318815Y-95218815D01* <=
X133318815Y-95218815D01* <=
G37*
X133318815Y-95218815D02*

here is X133318815Y-95218815D01* doubled.

In the specs the generation is declared as:
Syntax | Comments
G36* | Start a region
X200Y300000D02* | Move the current point to (2, 3)
G01* | Set linear interpolation
X700000D01* | Line segment to (7, 3)
Y100000D01* | Line segment to (7, 1)
X1100000Y500000D01* | Line segment to (11, 5)
X700000Y900000D01* | Line segment to (7, 9)
Y700000D01* | Line segment to (7, 7)
X200000D01* | Line segment to (2, 7)
Y300000D01* | Line segment to (2, 3)
G37* | Create the region by filling the contour

There is also a German thread about his (same data as above):
https://www.mikrocontroller.net/topic/482457

The data was created with KiCAD 5.1.4 (Windows and Linux), the errors were visualized by GC-Prevue (white X in the CAM-Scfreenshot).

Rene Poeschl (poeschlr)
summary: - Pcnew Gerber Export generates extra points in polygones
+ Pcnew Gerber Export generates extra points in polygons
St. Schulte (steven0815)
tags: added: export gerber
tags: added: pcbnew
removed: export gerber
tags: added: export gerber
Revision history for this message
St. Schulte (steven0815) wrote : Re: Pcnew Gerber Export generates extra points in polygons

Only an idea:
In common/plotters/GERBER_plotter.cpp
Line 517+
    if( aFill )
    {
        fputs( "G36*\n", outputFile );

        MoveTo( aCornerList[0] );
        fputs( "G01*\n", outputFile ); // Set linear interpolation.

        for( unsigned ii = 1; ii < aCornerList.size(); ii++ )
            LineTo( aCornerList[ii] ); <== could here the last point also been included and then

        FinishTo( aCornerList[0] ); <== here repeated?
        fputs( "G37*\n", outputFile );
    }

Changed in kicad:
milestone: none → 5.1.5
assignee: nobody → jean-pierre charras (jp-charras)
summary: - Pcnew Gerber Export generates extra points in polygons
+ Pcbnew Gerber Export generates extra points in polygons
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: New → 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.