← Back to team overview

kicad-developers team mailing list archive

Fwd: Re: Possible 4.6 gerber issue?

 

On 10/17/2014 10:03 AM, Bob Gustafson wrote:
> 
> On 10/17/2014 08:10 AM, Wayne Stambaugh wrote:
>> On 10/17/2014 8:44 AM, jp charras wrote:
>>> Le 17/10/2014 14:22, Mark Roszko a écrit :
>>>> Alright, I've played around. It appears there is many CAM/gerber
>>>> software that cannot handle G75 arcs that are full 360 degrees. I
>>>> tested this with the board from Jon and the 1 pin test board from
>>>> Nick. If I generate 359 degree arcs, the 3d viewer is happy and draws
>>>> good circles. If I generate 360 degrees then the arcs disappear/screw
>>>> up.
>>>> As far as I can tell, the math is right for the arcs regardless of 360
>>>> or 359. I think it's because the start point == end point for a 360
>>>> degree arc, that some viewers may break down due to their graphics
>>>> libraries.
>>>>
>>>> I modified KiCAD to generate the circles as two arcs and the same
>>>> viewers seem happy.
>>>>
>>>> i.e. I made
>>>>
>>>> void GERBER_PLOTTER::Circle( const wxPoint& aCenter, int aDiameter,
>>>> FILL_T aFill,
>>>>                               int aWidth )
>>>> {
>>>>      Arc( aCenter, 0, 3600, aDiameter / 2, aFill, aWidth );
>>>> }
>>>>
>>>> into
>>>>
>>>> void GERBER_PLOTTER::Circle( const wxPoint& aCenter, int aDiameter,
>>>> FILL_T aFill,
>>>>                               int aWidth )
>>>> {
>>>>      Arc( aCenter, 0, 1800, aDiameter / 2, aFill, aWidth );
>>>>      Arc( aCenter, 1800, 3600, aDiameter / 2, aFill, aWidth );
>>>> }
>>>>
>>>> Many other CAD software also generate circles as multiple arcs instead
>>>> of a full g75.
>>>>
>>>> Attached are my generated gerbers, 360 won't work, but 270, 359 and
>>>> split arcs will work I believe.
>> Do we really want to be in the business of working around other peoples
>> broken software?  I really don't want KiCad to be part of that world.
>> It's one of the reasons I am willing to work on KiCad for free.  While I
>> appreciate your effort, this is something I would not commit unless we
>> are violating the gerber specification which appears not to be the case
>> if JP is correct.  What we should be doing is sending high quality bug
>> reports including references to the gerber specification, screen shots,
>> files that cause the problem, etc. so the developers of the various
>> broken gerber viewer apps and make it their responsibility to fix their
>> code.
> You bring up a good point. However, many of KiCad's users are interested
> in creating board designs that can be easily and accurately read by
> their board house suppliers. If the fix - using two half circles instead
> of one whole circle - can be read by broken board house software, why
> not use this fix in KiCad.

While I sympathize with the user's situation in this case, I do not
agree with this solution on so many levels.  This is the kind of short
term thinking that leads to many of the long term problems that plagues
the entire software industry.  If I knew that my gerber file was valid
(which I am reasonably confident that we have confirmed that it is) and
my board vendor could not read it properly, I would immediately start
looking for a new board vendor.  If your board vendor cannot read a
valid gerber file, would you still have confidence in their ability to
produce a valid board?  I wouldn't.  If other users would take this same
approach, said board vender would either update or fix their CAM
software or go out of business.  I would not change my gerber generation
software to work around bug in another piece of software.  Where do you
draw the line?  What happens when another board vendor can't handle
circles constructed with two arcs?  Do we break it into different arcs
depending on the board vendor?  What about other gerber commands?  All
we are doing is increasing the complexity of our software and the
generated gerber files for no net gain and the potential for bugs and
the added maintenance issues.  Since I'm doing this for free in my spare
time, I don't have to make these compromises to the quality and
maintainability of the code that as project leader I am responsible for.

Is this a big industry problem or is it a small minority of board
vendors?  Has anybody else had this issue?  I have not had any issues in
the past two years with at least 10 different boards all of which have
circles defined in them.  I might be slightly more inclined to
compromise if over half the board manufacturing industry has this issue.
 Given that this is the first time I'm hearing about this, I'm guessing
it's not.

> 
> Your approach - depending on upstream to fix a problem with an obvious
> fix - also assumes that the board house will acquire the software
> upgrade when it arrives.

This fix is not obvious if you are looking at it from a code quality
perspective.  If I was looking at this code without knowing anything
else other than how to generate a valid gerber file, my first question
would be why are we breaking a circle into 2 arcs when it can be defined
by a single gerber command?

> 
> After some period of time, inspection of the upstream fix may disclose
> that they also substitute two half circles whenever they encounter a
> full circle in the design.

Then it is incumbent upon them to ensure their conversion is correct.

> 
>>
>>> OK.
>>> However, the Gerber specification says:
>>> "Under G75, if the start point of the arc is equal to the end point, the
>>> arc is a full circle of 360°"
>>>
>>> See
>>> http://www.ucamco.com/files/downloads/file/81/the_gerber_file_format_specification.pdf?46dfe8d5c8aee229e773d81222fd4db4
>>>
>>>
>>> page 55, chapter 4.4.6
>>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>