Hello there,
a friend of mine did a PCB using my WIP eda software
https://www.eevblog.com/forum/eda/new-work-in-progress-eda-package!/msg1124424/ and seeed studio complained that these gerbers crashed their CAM software (CAM 350). I opened the gerbers with selection of gerber viewers and none of them saw anything wrong with these or even crashed.
Maybe someone has access to that exact software or can tell me what my software did wrong in the gerber output?
Lukas
Not too sure what the issue is, I can open it up fine with the gerber viewer in KiCAD. However, when opening it up to view, I do get a particular warning pop up, "Warning: this file has no D-Code definition. It is perhaps an old RS274D file. Therefore the size of items is undefined"
ViewMate reported
M48F?MAT,2METRIC,TZT5C0.300T4C0.75T50T3C0.800T2C1.100T1C1.500%. Syntax error
and Parameter statement does not end in asterisk ('*'):
G90
G05
M71
T5
X-1.900Y8.000
X7.6
Not too sure what the issue is, I can open it up fine with the gerber viewer in KiCAD. However, when opening it up to view, I do get a particular warning pop up, "Warning: this file has no D-Code definition. It is perhaps an old RS274D file. Therefore the size of items is undefined"
That one's due to the paste bottom layer being empty, not seeing anything wrong with that though.
ViewMate reported
M48F?MAT,2METRIC,TZT5C0.300T4C0.75T50T3C0.800T2C1.100T1C1.500%. Syntax error
and Parameter statement does not end in asterisk ('*'):
G90
G05
M71
T5
X-1.900Y8.000
X7.6
I got that error as well when loading the drill file as a gerber file. Loading the drill file as such works fine.
We received the attached screenshot from seeed. Seems like the issues are with the copper layers...
It appears Seeed are unhappy with your graphic.
If you are desperate to get your boards made, just remove your graphic to see if this satisfies Seeed.
I think I nailed it. There's a problem with your 'aperture macro' definitions (Gerber: 'AM'), with the use of the circle primitive (primitive code 1). Those primitives take 4 parameters (called "modifiers"), whereas there are 5 in your Gerber files (a trailing zero for no apparent reason). Example: wii-bt-dingsi.gts, line 52.
There may be some other problems with the aperture macro definitions in general in the Gerber generator of your EDA, so you may want to double check the number of modifiers for all the supported aperture macro primitives.
I guess some Gerber analyzers will just ignore that, some will give an error (mine did) and some apparently will crash (which means CAM350 is a piece of crap
).
Attached is the modified file (wii-bt-dingsi.gts) that is now analyzed and renders successfully, along with a PNG view of this layer. Let me know if that solves your problem. If so, you know what to fix.
I think I nailed it. There's a problem with your 'aperture macro' definitions (Gerber: 'AM'), with the use of the circle primitive (primitive code 1). Those primitives take 4 parameters (called "modifiers"), whereas there are 5 in your Gerber files (a trailing zero for no apparent reason). Example: wii-bt-dingsi.gts, line 52.
Looks like you're right! I patched the gerber export to not output the 5th parameter and the boards are in production now. Although, the 5th parameter is optional according to the gerber spec as it specifies the rotation angle around the center of the pad (TBH, a bit pointless for circles).
Glad it helped.
Well, according to the official Ucamco Gerber spec, not in aperture macro definitions. Circles only have 4 modifiers. I looked again in the 2011 revision as well as later ones.
For instance, look at the ref spec rev. J2, page 92. The circle is the only primitive not having a rotation angle modifier.
Can you provide a link to the spec you're referring to? I'm referring to https://www.ucamco.com/files/downloads/file/81/the_gerber_file_format_specification.pdf?39e2bc8b014e75daf9a3f878bee378ec page 62
The J2 revision was the last I really used!
Seems like the new Gerber X2 format introduced this additional fifth parameter which didn't exist in RS274-X (which indeed doesn't seem to make much sense). That's good to know! I was actually planing on updating my Gerber analyzer to the new X2 format, so now I know at least one thing I have to be careful about.
So I guess CAM350 is probably not X2 compliant either, but the bad thing is that it makes it crash!
That said, I think you should probably add it as an option to generate Gerber X or X2. X2 has also additional features that you may make good use of, but leave it as an option, as I'm sure many CAM tools are not yet compliant.
Sounds like we all learned something.
The rotation modifier rotates the primitive around the macro center (origin), not the primitive center. In that respect it is not completely pointless in the spec.
A circle with center at (0, 10) rotated 90 degree would result in a circle with the same radius and center (10, 0).
The rotation modifier rotates the primitive around the macro center (origin), not the primitive center. In that respect it is not completely pointless in the spec.
A circle with center at (0, 10) rotated 90 degree would result in a circle with the same radius and center (10, 0).
Yes, although not strictly necessary as rotating a circle is just a matter of rotating its center, they probably added it to make all the primitives have a rotation parameter, for consistency; but it's still optional for the circle, whereas it's not stated as optional for the other primitives (probably for backward compatibility). Since there was no clear concept (as far as I remember anyway) of optional modifiers in earlier revisions of the spec, many CAM software developers probably have assumed the number of modifiers was fixed for each primitive. This is what I did to ensure the Gerber files were correctly formed.
According to the revision history, "The mistakenly omitted rotation parameter of the circle macro primitive was restored." in
revision 2015.06 of the spec.
For Gerber generators, I suggest still omitting this modifier for now (especially if you don't use rotation) to ensure maximum compatibility with all current CAM software.
As I suggested, you may add some kind of user option to generate older or newer Gerber to be more flexible. Apart from this modifier, a lot has been added or marked as deprecated in newer revisions, so this would be good to be able to generate Gerber files fully compliant to the latest revision, but keeping the optional possibility of using an older revision just to be safe.