boylesg
Advanced Member level 4
- Joined
- Jul 15, 2012
- Messages
- 1,023
- Helped
- 5
- Reputation
- 10
- Reaction score
- 6
- Trophy points
- 1,318
- Location
- Epping, Victoria, Australia
- Activity points
- 11,697
%TF.GenerationSoftware,Novarm,DipTrace,3.2.0.1*%
%TF.CreationDate,2018-11-07T12:25:27+09:00*%
%FSLAX35Y35*%
%MOMM*%
%TF.FileFunction,Copper,L2,Bot*%
%TF.Part,Single*%
%TA.AperFunction,Conductor*%
%ADD14C,2.0*%
%TA.AperFunction,ComponentPad*%
%ADD15C,2.3*%
G75*
G01*
%LPD*%
X-2794000Y-254000D2*
D14*
Y-508000D1*
X-2286000Y-762000D2*
X-2540000D1*
X-2794000D1*
Y-508000D1*
Y-254000D2*
Y508000D1*
X-2286000Y-762000D2*
X-762000D1*
Y-747873D1*
Y-508000D1*
Y508000D2*
X-254000D1*
Y-762000D1*
X1016000D1*
X1524000D1*
Y508000D1*
X1016000D1*
X-762000Y-747873D2*
X-254000Y-762000D1*
X1016000Y-508000D2*
Y-762000D1*
X1524000Y1016000D2*
Y508000D1*
X-2032000Y-254000D2*
Y-508000D1*
Y-254000D2*
Y762000D1*
Y1016000D1*
X-2794000D1*
X-1524000Y762000D2*
X-2032000D1*
X0D2*
Y1016000D1*
X-2032000D1*
X1016000D2*
X0D1*
X-2286000Y-2286000D2*
X-3302000D1*
Y762000D1*
X-2032000D1*
X-2286000Y-2286000D2*
X-2032000D1*
X0Y254000D2*
Y762000D1*
X-1270000D2*
Y254000D1*
X-762000D1*
X508000Y762000D2*
Y254000D1*
X1016000D1*
X0Y0D2*
Y-254000D1*
X1016000D2*
Y0D1*
X762000D2*
X1016000D1*
X-762000Y-254000D2*
Y0D1*
X-508000D2*
X-762000D1*
X254000D2*
Y-254000D1*
X-2286000Y-1778000D2*
X-2032000D1*
X762000Y-1270000D2*
Y-1778000D1*
Y-1270000D2*
X-2286000D1*
Y-1778000D1*
X-1524000D2*
Y-2032000D1*
Y-2286000D1*
X-2286000Y-2032000D2*
X-1524000D1*
X-2286000D2*
X-2794000D1*
Y-762000D1*
X-1524000Y-2286000D2*
Y-2540000D1*
X-508000D1*
X508000Y-1778000D2*
Y-1524000D1*
X-1524000D1*
Y-1778000D1*
X-508000Y-2032000D2*
X0D1*
Y-1778000D1*
X1016000Y-1270000D2*
Y-1778000D1*
X0Y-2540000D2*
Y-2286000D1*
X-1016000D1*
X254000Y-2540000D2*
Y-1778000D1*
D15*
X-2794000Y-508000D3*
Y-254000D3*
X-2286000Y-2286000D3*
X-2032000Y-1778000D3*
X762000Y0D3*
X254000D3*
X-2032000Y-508000D3*
Y-254000D3*
X-2286000Y-762000D3*
X-2540000D3*
X-1270000Y762000D3*
X-1524000D3*
X1016000Y-254000D3*
Y-508000D3*
X-762000Y0D3*
Y508000D3*
X1016000D3*
Y254000D3*
X-2794000Y1016000D3*
X-762000Y254000D3*
X-2794000Y508000D3*
X1016000Y0D3*
X0Y-254000D3*
X254000D3*
X-762000Y-508000D3*
Y-254000D3*
X0Y762000D3*
X508000D3*
X0Y0D3*
X-2286000Y-2032000D3*
X-1524000Y-1778000D3*
X-2032000Y-2286000D3*
X-508000Y0D3*
X-2286000Y-1778000D3*
X1016000Y1016000D3*
X1524000D3*
X-1524000Y-2286000D3*
X0Y254000D3*
X508000D3*
X-254000Y-1778000D3*
X0D3*
X762000Y-1270000D3*
X1016000D3*
X-508000Y-2032000D3*
X254000Y-1778000D3*
X508000D3*
X1016000D3*
X762000D3*
X-508000Y-2540000D3*
X-1016000Y-2286000D3*
X0Y-2540000D3*
X254000D3*
M02*
Hi,
You have the specification PDF.... why don't you read it?
Hint: open the the PDF in a viewer.
Use the search function for "unit".
And you will have the answer within a couple of seconds.
Klaus
<AM
command
>:
AM<Aperture macro name>*<Macro content>
<Macro content>:
{{<Variable definition>*}{<Primitive>*}}
<Variable definition>:
$K=<Arithmetic expression>
<Primitive>:
<Primitive code>,<Modifier>{,<Modifier>}|<Comment>
<Modifier>:
$M
|< Arithmetic expression>
<Comment>:
0 <Text>
AMOUTLINE0*
4,1,8,
4.6194,1.91342,
4.6194,-1.91342,
1.91342,-4.6194,
-1.91342,-4.6194,
-4.6194,-1.91342,
-4.6194,1.91342,
-1.91342,4.6194,
1.91342,4.6194,
4.6194,1.91342,
0*%
%TA.AperFunction,Conductor*%
%ADD14C,2.0*%
%TA.AperFunction,ComponentPad*%
%ADD15C,2.3*%
%ADD16R,3.3X2.3*%
%ADD17R,2.3X2.3*%
%ADD18O,3.3X2.3*%
%ADD19C,4.1*%
%ADD35OUTLINE0*%
I get these lines Y-508000D1* X-2286000Y-762000D2* - they are moveto and lineto with x and/or y coordinates.
But what are the units of the coordinates? It doesn't look like mm.
It's encoded in these lines:
%FSLAX35Y35*%
%MOMM*%
For the FS interpretation, have a look at your file format document, chapter 4.9 Coordinate Format (FS)
If the FS command defines N places for integer part and M for decimal part it means the maximum allowed length of a coordinate number is N+M. To interpret the coordinate string, it is first padded with zero’s in front until its length is equal to N+M. And then first N digits are interpreted as the integer part, and remaining M digits are interpreted as the decimal part.
For example, with the “24” coordinate format, “015” is padded to “000015” and therefore represents 0.0015.
At least one character must be output as omitting a value indicates that the previous value should be used. Zero therefore should be encoded as “0”.
But sadly examples for other commands or inadequately explained or none have been provided.
Maybe you also overlooked the example on aperture macro (AM) on page 35.
AMOUTLINE0*
4,1,8,
4.6194,1.91342,
4.6194,-1.91342,
1.91342,-4.6194,
-1.91342,-4.6194,
-4.6194,-1.91342,
-4.6194,1.91342,
-1.91342,4.6194,
1.91342,4.6194,
4.6194,1.91342,
0*%
seems to refer to primitive 4 that is described on page 115 in chapter 4.12.4.5 Outline, Primitive Code 4
I have been programming Gerber tools long ago, but we didn't have AM at that time, so you will need to do some reading on your own. Good luck!
IT would be rather nice to have a specific example here, with explanations of each line and with links to other sections that provide further details of the fields.
That is what I would do if I was tasked with writing a manual for this....from previous experience.
From my perspective 4,1,8 just looks like coordinates.
'4' = outline
'1' = exposure on or laser in my case I guess.
'8' = 8 x vertices.
And the rest of it does consist of X,Y coordinate pairs, although it is a pity they did not stick to the letters X and Y as they have with coordinates associated with D01, D02 and D03
This is what I was referring to.But what are the units of the coordinates?
Although the manual could be more systematic, there are examples for exactly this kind of polygon aperture macro, as said on page 115 (and 116). It clarifies that 4,1,8 are not coordinates, but codes for polygon, exposure on, 8 subsequent points. It takes longer than a few seconds to read and understand chapter 4.12 about aperture macros, you shouldn't take KlausST's comment literally in this regard.
It seems to me that your Gerber example can be completely decoded using the manual, don't be impatient.
- - - Updated - - -
See you have found about 4,1,8 in the meantime, that's good.
I believe that your complaints about this manual are all-in-all unsubstantiated, despite of minor potential for improvement.
The doubts presented in this thread are mainly brought up by incomplete reading.
Some points are different here:
- A file specification isn't a user manual
- Although Gerber file format has been originally developed by Barco, it has changed into a quasi-industry standard that is maintained by voluntary work of Barco employees and an interested community.
- The subject is rather complex, particularly the extended functions like the discussed aperture macros. It's not fair to expect an intuitive understanding without even reading the related manual parts. The previous discussion until post #7 illustrates your guessing work before reading chapter 4.12 completely.
Coordinate data defining the X coordinate of the interpolation end point. For more details see 4.4.2 and 4.5.7
The X coordinate is then used to set the new current point
If missing then the previous X coordinate is used
<Number> is a coordinate number – see section 3.6.3
That is splitting hairs. User manual or file specification.....regardless of what you choose to call the document its purpose is to explain how to use of the product (in this case a text based protocol).
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?