It looks like you're new here. If you want to get involved, click one of these buttons!
Dear KLayout Support,
We recently had some strange problems while reading in GDS files created by KLayout into a third-party software.
It turned out to depend on which version of KLayout (or platform) was used in saving the GDS file.
We compared two identical very simple designs that came out differently in the third-party software.
A careful examination revealed a very small different in the user unit coding, in this case set to be 0.6865 microns:
1 db unit = 6.86500000000000332178728967846837e-01 user units
1 db unit = 6.86500000000000330511768127650374e-07 meter
1 db unit = 6.86499999999999999111821580299875e-01 user units
1 db unit = 6.86500000000000012874412907287747e-07 meter
It was found by doing a HEX dump if the GDS files and then a diff on the result. The time stamp was disabled in KLayout in order not to mess up the diff. The ONLY difference was in the UNITS section in the header.
It seems KLayout is not coding in a clear-cut numeric value from the input, there is some garbage in the very last sub angstrom atomic elementary particle dimensions at the end.
You could argue that this (or any) third-party software should not be affected by this minuscule tail, agreed, but this is another issue entirely that should be discussed with the actors of this software also.
If you enter a data base unit of 0.6865 microns into KLayout, the UNITS in the GDS header should be exactly this, nothing else:
1 db unit = 6.86500000000000000000000000000000e-01 user units
The GDS specs shows that UNITS is coded in a slightly unusual way, so the algorithm to code it is apparently critical.
PS: GDS v6 specification document is included.