Drill map file contains X2 attributes when X2 is disabled (5.1.9)

Hi,

When “Use extended X2 format” is disabled, then click “Generate Drill Files”, choose “Gerber” for “Map File Format” and generate the drill map file. In the map file, there are some X2 attributes.

G04 APERTURE LIST*
%TA.AperFunction,Profile*%
%ADD10C,0.381000*%
%TD*%
%ADD11C,0.200000*%
%ADD12C,0.300000*%
G04 APERTURE END LIST*

This may cause problems for some old Gerber readers: The reader can read all other layers (in non-X2 format) but it can not read the drill map, so the drill map is useless for this Gerber reader.


Atommann

Dear Mr. Atommann,

But shouldn’t JLCPCB, your company, not simply support X2 by now? It was introduced 7 years ago, ample time to adapt. X2 add really useful information, such as where the via’s are - no more guesswork.

The minimal support for X2 is really simple: just ignore the %Txxx attribute commands. The conformance statement in the spec clearly states that this is exactly what a reader must do: “To prepare for future extensions of the format, a Gerber file reader must give a warning when encountering an unknown command; it must then continue processing after otherwise ignoring the unknown construct.” Is it too much to ask to use conforming Gerber software?

Even if your software crashes on X2, supporting X2 only takes a simple script to remove the %T commands. (As a side effect it can create a report which tools are the vias, what your CAM surely needs to know.) If using conforming software is too much to ask, is it also too much to ask to develop such a simple script?

I also read you have problems with basic features of macro’s, which are part of 274X since the 1980’s. Is it too much to ask that you can correctly read valid Gerber files that only use features more than thirty years old?

By refusing X2 JLCPCB and other prototype vendors effectively block designers from using X2, effectively blocking the industry from moving forward and force it to remain mired in the 1980. By refusing X2 JLCPCB create needless problems for users of KiCad, and needless work for its developers, that surely have better things to do. As amply demonstrated by this and other posts.

Please move on with the times, and support X2, fully and without complaining. Please?

2 Likes

Is Gerber X2 compatible with Gerber X1?

Yes. Gerber X2 is both backward and forward compatible .

  • Backward: A Gerber X2 reader will read a Gerber X1 file perfectly. The attributes are optional, not mandatory. Therefore a valid X1 file is a valid X2 file.
  • Forward: A compliant Gerber X1 reader will read a Gerber X2 file and generate the correct image. It may give a warning that it does not recognize the new attribute commands; these warnings can be safely ignored.

If an application chokes on Gerber X2, it is not a compliant Gerber X1.

It is very simple to convert an X2 file to an X1 file: just remove the attributes; a simple script can do it.

I said this in other such threads… choking like this implies a non-compliant X1 reader and thus there are more fundamental problem’s

Exactly, this is the problem, together with blocking progress.

Is the drill map necessary for your tool chain? I thought is was primarily for manual, not automated review?

Report this at the Gitlab repo and fix your Gerber reader. Postel’s law should apply.

I find this ironic, as every set of Gerbers I’ve sent over to have JLCPCB turn into PC boards for me, including two in production as I type, have been with X2 attributes enabled. ¿håå?

No, it’s optional. The drill map can provide more information for the CAM engineer especially when they are in doubt.

Thanks. Right, I should report an issue at gitlab instead of post this topic here. Sorry for the noise.

This is how JLCPCB is doing for X2 now.

I totally agree. X2/X3 has lots of good things as was mentioned again and again here and there. The method JLCPCB is using now (filter the attributes) does not take the advantage of X2 at all. CAM engineers are still guessing the designer’s design purposes.

Thanks. I’ll make my effort.

I want to add some thoughts to the original post:

Yesterday I finished the KiCad 5 to Gerber/Drill article for JLCPCB

I added the “Generate Drill Map File” section because I saw lots of problems are related to drill holes (not only KiCad). For example, if PTH and NPTH are merged into one single drill file, for some situations the CAM engineer can not figure out which is PTH and which is NPTH, then JLCPCB need to ask the customer to confirm. This wastes time. (Oh man, this example also proves why X2 is better.)

Imagine a CAM engineer imports a set of Gerbers into his CAM tool, all other layers work except the drill map layer. Because drill map layer is optional, he/she may just ignore it instead of convert it to RS-274X.

If the drill map uses G04 to comment the X2 attributes out when the user does not check “Use extended X2 format” (file consistency), it can make the old RS-274X workflow a little bit smoother.

Updates:
I updated the above KiCad to Gerber article, now “Use extended X2 format” is “don’t care”.

Sorry for the noise.

Hi Atommann,

Thanks for the very positive response. I will read your article, probably this weekend.

If you accept X2 now it distinguishes you from competitors. Now you only mention it somewhat hidden in an article. The ‘How to generate Gerber page’ only mentions X2. I suggest you advertize your X2 capability loudly on that page.

You mention “don’t care”. This is OK and correct of course. However, I suggest it is better to say X2 is preferred. Now you don’t care, but at some date you will take advantage of X2, and then your customers are already used to send it to you, which benefits your customers, and increases your technical lead on your competitors.

When I wrote “don’t care” I use the concept from the truth table in digital electronics. In the truth table, if a value can be 0 or 1 and does not affect the result, you can say “don’t care”. Will correct the words because it leads misunderstanding.

In fact I care X2.

1 Like