Mail Archives: geda-help/2017/06/06/19:09:30
Edward Comer:
> Has anyone used gxyrs with gEDA pcb?
> I am wanting to utilize the fabrication service at MicroFab
> (https://macrofab.com/) and their required XYRS file is very
> different from the xy file produced by pcb (pcb -x bom --bomfile
> /dev/null $(TARGET).pcb).
Why don't you ask macrofab, https://factory.macrofab.com/help/k28u1k
says:
Is your favorite EDA tool not on this list? Let us know at
support AT macrofab DOT net. We're continuously working on instructions
for new programs, and we'd be happy to prioritize your tool.
BTW, the format of their xyrs files is indicated at the bottom of
that page.
Looking at the doc, and a pcb xy file, it seems to be a simple
permutation of fields, and filling out fields which pcb's xy file
doesn't provide like:
Type Surface or Through Hole 1/SMT/SMD for SMD, 2 for PTH
X-Size X Dimension of the Part (mils) Size of the Package, Measured By the Pad Footprint
Y-Size Y Dimension of the Part (mils) Size of the Package, Measured By the Pad Footprint
One could make a program that checks a given fotprint for pins, which
should indicate a 2 in the type column, and to find the bounding box of
all pins and pads in the footprint. I don't know one who does it though.
Also, you have to be careful to use only footprints that have the "righ"
rotation, whatever that is.
The permutations could be done with (perhaps an awk script would be
more appropiate here):
$ cat tt.pl
#!/usr/bin/perl -w
use strict;
while(<>) {
if (!m/^#/) {
chomp;
my @fld = split(/,/);
my @out = (@fld[0,3,4,5,6], 1, 0, 0, @fld[2,1], 0);
$_ = join("\t", @out) . "\n";
}
print;
}
$ head arm_can_test.xy
# PcbXY Version 1.0
# Date: Tue 06 Jun 2017 10:35:50 PM GMT UTC
# Author: Karl Hammar
# Title: arm_can_test - PCB X-Y
# RefDes, Description, Value, X, Y, rotation, top/bottom
# X,Y in mm. rotation in degrees.
# --------------------------------------------
_R2,"m1608_a.fp","10k",108.5000,78.00,90,bottom
_C6,"m2012_a.fp","1u",71.9500,90.50,180,top
_C10,"m2012_a.fp","100n",89.0000,99.05,270,top
$ ./tt.pl arm_can_test.xy | head
# PcbXY Version 1.0
# Date: Tue 06 Jun 2017 10:35:50 PM GMT UTC
# Author: Karl Hammar
# Title: arm_can_test - PCB X-Y
# RefDes, Description, Value, X, Y, rotation, top/bottom
# X,Y in mm. rotation in degrees.
# --------------------------------------------
_R2 108.5000 78.00 90 bottom 1 0 0 "10k" "m1608_a.fp" 0
_C6 71.9500 90.50 180 top 1 0 0 "1u" "m2012_a.fp" 0
_C10 89.0000 99.05 270 top 1 0 0 "100n" "m2012_a.fp" 0
$
Perhaps you need to remove the citation marks (").
> Exactly how to use gxyrs is not obvious, at least not to me. The
> man pages are rather terse, to say the least.
> Any help would be appreciated.
Looking through the man page, it seems that gxyrs doesn't help you
with the info that is missing from pcb's xy file, you have to provide
that by some other means.
And it doesn't seem to help much with the permutations, but after you
have done the permutations, there seems to be commands which gives you
the ability to alter specific lines/columns matching some rules.
I guess you are better off editing the file after permutating it in
a spreadsheet or an editor.
Regards,
/Karl Hammar
-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57
- Raw text -