interesting and nice investigation.
So looking at the GERBER spec 2020.09, the 5th parameter is listed as OPTIONAL (default no rotation)
so if the example is:
%AMCircle*
1,1,1,5,0,0,0*%
vs
%AMCircle*
1,1,1,5,0,0*%
so… if you have time, if you were to take a KiCad X2+macro GERBER set and manually remove that additional rotation parameter (whatever the angle) does it work in both CAM packages?
rotation on a circle seems odd because it is symmetrical … but it’s the spec. If manually removing works then one solution would be an option to suppress rotation information. Ideal solution is interacting with the CAM vendor but well
@Naib It’s rotation around the macro origin, not rotation around the centre of the circle (which obviously does nothing).
However, for compatibility reasons I think KiCAD should be modified to avoid outputting the rotation parameter at all. I have raised an issue for this: https://gitlab.com/kicad/code/kicad/-/issues/7047
I don’t even think it needs to be a UI option. What’s the point of outputting that data if it just serves to make the file bigger and less compatible? As far as I know KiCad never outputs a nonzero rotation there.
The point would be specification compliant. The updated specification w.r.t. the aperture macro explicitly states the rotation. While it is optional, it is still there and at some future date some new rotation might be required to create more complex openings and thus completely removing the ability to include this could cause problems later.
Also the inclusion would help with a statement that the format aligns to a certain version of the specification
that’s viable, as long as it was captured in some document that this is the behaviour…
i’m just from an industry where an awful lot of time and money is spent to exhaustively show not only compliance to but also the exact response to requirements is. If a source material that something is meant to show compliance to stated the format, then this would need to be demonstrated
Did another test on the rotation angle for aperture macro circle primitive.
Also just several chip capacitors with rounded corner rectangle pads. Modify one rotation angle to 22.5 degrees to see how the pads will look like in different Gerber viewers. am-circle-rot-test-gerbers.zip (8.6 KB)
0 Add four circle primitives for the rounded corners*
1,1,$1+$1,$2,$3,22.5*
1,1,$1+$1,$4,$5,0*
1,1,$1+$1,$6,$7,0*
1,1,$1+$1,$8,$9,0*
It did shows it correctly as you can see one circle was rotated 22.5 degrees around the macro’s origin. So looks like KiCad’s own viewer, tracespace viewer, ref viewer from ucamco all implemented correctly as per the Gerber spec rev 2020-09.
That looks correct though. Rotate the circle 22.5deg around the origin and you would have that. The modification was done at RAW level not generated by some package. Gerbv-2.6.1 outright ignores any rotation
True, it is interesting it silently ignored the final parameter. I would have expected some form of warning as the aperture termination would have been incorrect against an old parser. This would imply it isn’t parsing correctly.
good question how it is viewed in the updated version.
Just gave it a try using our CAM solution, https://aisler.net/PatrickFranken/playground/am-circle-rot-test-gerbers/board
Looks all fine. As said on the other thread, the fix was actually just two lines of code. So if there is any chance to patch the CAM software you are using, I could provide some insights.