I do not understand why 6 significant digit will cause rounding error if Gerber generation uses inches as unit. you have a nanometer resolution which provides 6 decimals for millimeter units. When you divide this number by 25.4 to convert to inches, you might loose a bit of resolution, but you will not generate a rounding error. 123.456789mm = 4.86050350” wich is now 4.860503 when using only 6 decimals.
Where is the rounding error coming from? From the software processing gerber data? I really doubt that CAM software will care about 1 micro-inch error. Just curious, Jean-Paul AC9GH > On Aug 4, 2015, at 3:03 PM, jp charras <jp.char...@wanadoo.fr> wrote: > > Le 04/08/2015 08:29, Lorenzo Marcantonio a écrit : >> On Tue, 04 Aug 2015 05:38:26 +0200, >> Chris Pavlina wrote: >>> >>> pcbnew used to be able to plot Gerbers in imperial units. What happened >>> to that? Some (particularly older and non-Asian) board houses still >>> expect those... Is there any reason they were removed, or did they just >>> "fall out"? And can they be put back in? >> >> Since the new plotting infrastructure the gerber plotter already >> supported both units; the IN was simply the compatibility default and it >> only needed an UI option to be bound. >> >> If someone changed the default without adding a radio button or >> something then blame to him:P >> >> AFAIK there would be no technical reason to not do inch plotting... >> > > There is a technical reason to not do inch plotting. > I recently explained it. > > Pcbnew internally uses nanometers, corresponding to 6 digits mantissa in > Gerber. > > If we use a 6 digits mantissa and mm in Gerber, there is no rounding issue. > If we convert these values to inches, I am pretty sure rounding issues > will appear. > > For most of coordinates, a rounding issue has no matter. > However, for complex polygons (copper zones) rounding coordinates can > create self intersecting polygons from non intersecting polygons. > Self intersecting polygons are not allowed in Gerber files (see gerber > file format spec). > > The advice from Ucamco is (especially for this issue) is: > use the max resolution for coordinates (see also the gerber file format > spec). > > > The only one reason the 5 digits mantissa option exists in Pcbnew is the > fact Ucamco told me a few Gerbers tools do not accept the 6 digits. > > I verified some Gerber files which are OK with 6 digits mantissa create > self intersecting polygons when using 5 digits from the same board. > (Tests with GC-Preview) > > (to tell the True, the Gerber image on screen was the same) > > We already have a bug report about self intersecting polygons in Gerber > files from Kicad. > > It also explains why a Gerber reader can gives warnings about that > issue, and an other Gerber reader does not find any issue: it depends > also on internal units of the reader. > > > Therefore, until someone give me a *very good reason* why inches are > better than mm in Gerber files, I *do not want* a inch option in Gerber > plot menu ( or, if this option exists, commit an algo to avoid self > intersecting polygons). > > -- > Jean-Pierre CHARRAS > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp