Hold on a second before you prepare a patch. This would introduce a new
semantic to the coordinate entries in the file format which could be
open to abuse in the future. I don't want to open up the possibility of
using different units within the file format itself and adding units
token will open the door for that possibility. I will also be confusing
to readability because all other units are in mm but do not have the
'mm' token except for 3D model offsets. I would prefer that we do a one
time conversion to mm and bump the file format version rather than add a
new token to the file format. The parser change would be fairly
straight forward:
if( file_version < VERSION )
convert_units_from_decimils_to_mm();
The files will still be readable in previous version of kicad.
Obviously users will have to reset the offsets if they are not zero but
this typically isn't a big problem.
On 11/11/2017 03:57 AM, Oliver Walters wrote:
JP,
Yes I will update with a patch.
On 11 Nov 2017 19:45, "jp charras" <jp.charras@xxxxxxxxxx
<mailto:jp.charras@xxxxxxxxxx>> wrote:
Le 09/11/2017 à 21:48, Oliver Walters a écrit :
> JP,
>
> I think that 3) is the better option, because it preservers PCB
file compatibility (as long as the
> offset is zero). Any time the PCB is saved, the (at (xyz 0 0 0))
gets written.
>
> You are also correct that none of the official library footprints
have a defined offset. This is why
> i have never encountered this before.
So I also think 3 is the better option:
(at (xyz nn mm ll)) is read as position in inches (old files)
(offset(xyz nn mm ll)) is read as position in mm (new files)
And the position is written in file only if not 0 (that is the case
of our footprint files) to avoid
breaking the compatibility with older Pcbnew version when not
mandatory, at least for now.
Could you prepare a patch?
Thanks.