Mail Archives: geda-help/2017/06/06/21:13:39
------=_Part_4041153_1269052315.1496797996280
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Thanks for the reply. I was hoping that someone had already done something =
in this area. I will have to write ab awk script.
From: "karl AT aspodata DOT se" <karl AT aspodata DOT se>
To: geda-help AT delorie DOT com=20
Sent: Tuesday, June 6, 2017 7:20 PM
Subject: Re: [geda-help] gxyrs with gEDA PCB
=20
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:
=C2=A0 Is your favorite EDA tool not on this list? Let us know at
=C2=A0 support AT macrofab DOT net. We're continuously working on instructions
=C2=A0 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 =C2=A0=C2=A0=C2=A0 Surface or Through Hole =C2=A0=C2=A0=C2=A0 1/SMT/S=
MD for SMD, 2 for PTH
X-Size =C2=A0=C2=A0=C2=A0 X Dimension of the Part (mils) =C2=A0=C2=A0=C2=
=A0 Size of the Package, Measured By the Pad Footprint
Y-Size =C2=A0=C2=A0=C2=A0 Y Dimension of the Part (mils) =C2=A0=C2=A0=C2=
=A0 Size of the Package, Measured By the Pad Footprint
One could make a program that checks a given fotprint for pins, which=20
should indicate a 2 in the type column, and to find the bounding box of=20
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=20
more appropiate here):
$ cat tt.pl
#!/usr/bin/perl -w
use strict;
while(<>) {
=C2=A0 =C2=A0 if (!m/^#/) {
=C2=A0=C2=A0=C2=A0 chomp;
=C2=A0=C2=A0=C2=A0 my @fld =3D split(/,/);
=C2=A0=C2=A0=C2=A0 my @out =3D (@fld[0,3,4,5,6], 1, 0, 0, @fld[2,1], 0);
=C2=A0=C2=A0=C2=A0 $_ =3D join("\t", @out) . "\n";
=C2=A0 =C2=A0 }
=C2=A0 =C2=A0 print;
}
$ head arm_can_test.xy=20
# 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.=C2=A0 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.=C2=A0 rotation in degrees.
# --------------------------------------------
_R2=C2=A0 =C2=A0 108.5000=C2=A0 =C2=A0 =C2=A0 =C2=A0 78.00=C2=A0 90=C2=A0 =
=C2=A0 =C2=A0 bottom=C2=A0 1=C2=A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 0=C2=
=A0 =C2=A0 =C2=A0 "10k"=C2=A0 "m1608_a.fp"=C2=A0 =C2=A0 0
_C6=C2=A0 =C2=A0 71.9500 90.50=C2=A0 180=C2=A0 =C2=A0 top=C2=A0 =C2=A0 1=C2=
=A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 "1u"=C2=A0 =
=C2=A0 "m2012_a.fp"=C2=A0 =C2=A0 0
_C10=C2=A0 =C2=A0 89.0000 99.05=C2=A0 270=C2=A0 =C2=A0 top=C2=A0 =C2=A0 1=
=C2=A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 "100n"=C2=
=A0 "m2012_a.fp"=C2=A0 =C2=A0 0
$
Perhaps you need to remove the citation marks (").
> Exactly how to use gxyrs is not obvious, at least not to me.=C2=A0The
> 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=C3=B6 Data
Lilla Asp=C3=B6 148
S-742 94 =C3=96sthammar
Sweden
+46 173 140 57
=20
------=_Part_4041153_1269052315.1496797996280
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html><head></head><body><div style=3D"color:#000; background-color:#fff; f=
ont-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font=
-size:16px"><div dir=3D"ltr" id=3D"yui_3_16_0_1_1496777774472_31513"><span =
id=3D"yui_3_16_0_1_1496777774472_31512">Thanks for the reply. I was hoping =
that someone had already done something in this area. I will have to write =
ab awk script.</span></div><div class=3D"qtdSeparateBR" id=3D"yui_3_16_0_1_=
1496777774472_31515"><br><br></div><div class=3D"yahoo_quoted" id=3D"yui_3_=
16_0_1_1496777774472_31521" style=3D"display: block;"> <div style=3D"font-=
family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-s=
ize: 16px;" id=3D"yui_3_16_0_1_1496777774472_31520"> <div style=3D"font-fam=
ily: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-s=
erif; font-size: 16px;" id=3D"yui_3_16_0_1_1496777774472_31519"> <div dir=
=3D"ltr" id=3D"yui_3_16_0_1_1496777774472_31518"> <font size=3D"2" face=3D"=
Arial" id=3D"yui_3_16_0_1_1496777774472_31517"> <hr size=3D"1" id=3D"yui_3_=
16_0_1_1496777774472_31516"> <b><span style=3D"font-weight:bold;">From:</sp=
an></b> "karl AT aspodata DOT se" <karl AT aspodata DOT se><br> <b><span style=3D"f=
ont-weight: bold;">To:</span></b> geda-help AT delorie DOT com <br> <b><span style=
=3D"font-weight: bold;">Sent:</span></b> Tuesday, June 6, 2017 7:20 PM<br> =
<b><span style=3D"font-weight: bold;">Subject:</span></b> Re: [geda-help] g=
xyrs with gEDA PCB<br> </font> </div> <div class=3D"y_msg_container" id=3D"=
yui_3_16_0_1_1496777774472_31524"><br><div dir=3D"ltr" id=3D"yui_3_16_0_1_1=
496777774472_31526">Edward Comer:<br clear=3D"none">> Has anyone used gx=
yrs with gEDA pcb?<br clear=3D"none">> I am wanting to utilize the fabri=
cation service at MicroFab<br clear=3D"none">> (<a shape=3D"rect" href=
=3D"https://macrofab.com/" target=3D"_blank">https://macrofab.com/</a>) and=
their required XYRS file is very<br clear=3D"none">> different from the=
xy file produced by pcb (pcb -x bom --bomfile<br clear=3D"none">> /dev/=
null $(TARGET).pcb).<br clear=3D"none"><br clear=3D"none"> Why don't you as=
k macrofab, <a shape=3D"rect" href=3D"https://factory.macrofab.com/help/k28=
u1k" target=3D"_blank" id=3D"yui_3_16_0_1_1496777774472_31528">https://fact=
ory.macrofab.com/help/k28u1k</a><br clear=3D"none">says:<br clear=3D"none">=
<br clear=3D"none"> Is your favorite EDA tool not on this list? Let u=
s know at<br clear=3D"none"> <a shape=3D"rect" ymailto=3D"mailto:supp=
ort AT macrofab DOT net." href=3D"mailto:support AT macrofab DOT net.">support AT macrofab DOT n=
et.</a> We're continuously working on instructions<br clear=3D"none"> =
for new programs, and we'd be happy to prioritize your tool.<br clear=3D"n=
one"><br clear=3D"none">BTW, the format of their xyrs files is indicated at=
the bottom of<br clear=3D"none">that page.<br clear=3D"none"><br clear=3D"=
none">Looking at the doc, and a pcb xy file, it seems to be a simple<br cle=
ar=3D"none">permutation of fields, and filling out fields which pcb's xy fi=
le<br clear=3D"none">doesn't provide like:<br clear=3D"none"><br clear=3D"n=
one"> Type Surface or Through Hole 1/=
SMT/SMD for SMD, 2 for PTH<br clear=3D"none"> X-Size X D=
imension of the Part (mils) Size of the Package, Measure=
d By the Pad Footprint<br clear=3D"none"> Y-Size Y Dimen=
sion of the Part (mils) Size of the Package, Measured By=
the Pad Footprint<br clear=3D"none"><br clear=3D"none">One could make a pr=
ogram that checks a given fotprint for pins, which <br clear=3D"none">shoul=
d indicate a 2 in the type column, and to find the bounding box of <br clea=
r=3D"none">all pins and pads in the footprint. I don't know one who does it=
though.<br clear=3D"none">Also, you have to be careful to use only footpri=
nts that have the "righ"<br clear=3D"none">rotation, whatever that is.<br c=
lear=3D"none"><br clear=3D"none">The permutations could be done with (perha=
ps an awk script would be <br clear=3D"none">more appropiate here):<br clea=
r=3D"none"><br clear=3D"none">$ cat tt.pl<br clear=3D"none">#!/usr/bin/perl=
-w<br clear=3D"none"><br clear=3D"none">use strict;<br clear=3D"none"><br =
clear=3D"none">while(<>) {<br clear=3D"none"> if (!m/^#/=
) {<br clear=3D"none"> chomp;<br clear=3D"none"> &nb=
sp; my @fld =3D split(/,/);<br clear=3D"none"> my @=
out =3D (@fld[0,3,4,5,6], 1, 0, 0, @fld[2,1], 0);<br clear=3D"none"> &=
nbsp; $_ =3D join("\t", @out) . "\n";<br clear=3D"none"> =
}<br clear=3D"none"> print;<br clear=3D"none">}<br clear=3D"n=
one">$ head arm_can_test.xy <br clear=3D"none"># PcbXY Version 1.0<br clear=
=3D"none"># Date: Tue 06 Jun 2017 10:35:50 PM GMT UTC<br clear=3D"none"># A=
uthor: Karl Hammar<br clear=3D"none"># Title: arm_can_test - PCB X-Y<br cle=
ar=3D"none"># RefDes, Description, Value, X, Y, rotation, top/bottom<br cle=
ar=3D"none"># X,Y in mm. rotation in degrees.<br clear=3D"none"># ---=
-----------------------------------------<br clear=3D"none">_R2,"m1608_a.fp=
","10k",108.5000,78.00,90,bottom<br clear=3D"none">_C6,"m2012_a.fp","1u",71=
.9500,90.50,180,top<br clear=3D"none">_C10,"m2012_a.fp","100n",89.0000,99.0=
5,270,top<br clear=3D"none">$ ./tt.pl arm_can_test.xy | head<br clear=3D"no=
ne"># PcbXY Version 1.0<br clear=3D"none"># Date: Tue 06 Jun 2017 10:35:50 =
PM GMT UTC<br clear=3D"none"># Author: Karl Hammar<br clear=3D"none"># Titl=
e: arm_can_test - PCB X-Y<br clear=3D"none"># RefDes, Description, Value, X=
, Y, rotation, top/bottom<br clear=3D"none"># X,Y in mm. rotation in =
degrees.<br clear=3D"none"># --------------------------------------------<b=
r clear=3D"none">_R2 108.5000 78.0=
0 90 bottom 1 0 =
0 "10k" "m1608_a.fp" &nbs=
p; 0<br clear=3D"none">_C6 71.9500 90.50 180 &nb=
sp; top 1 0 0 =
; "1u" "m2012_a.fp" 0<br clear=3D"=
none">_C10 89.0000 99.05 270 top &n=
bsp; 1 0 0 =
"100n" "m2012_a.fp" 0<br clear=3D"none">$<br clear=3D"no=
ne"><br clear=3D"none">Perhaps you need to remove the citation marks (").<d=
iv class=3D"yqt9461288442" id=3D"yqtfd39846"><br clear=3D"none"><br clear=
=3D"none">> Exactly how to use gxyrs is not obvious, at least not to me.=
The<br clear=3D"none">> man pages are rather terse, to say the lea=
st.<br clear=3D"none">> Any help would be appreciated.</div><br clear=3D=
"none"><br clear=3D"none">Looking through the man page, it seems that gxyrs=
doesn't help you<br clear=3D"none">with the info that is missing from pcb'=
s xy file, you have to provide<br clear=3D"none">that by some other means.<=
br clear=3D"none"><br clear=3D"none">And it doesn't seem to help much with =
the permutations, but after you<br clear=3D"none">have done the permutation=
s, there seems to be commands which gives you<br clear=3D"none">the ability=
to alter specific lines/columns matching some rules.<br clear=3D"none"><br=
clear=3D"none">I guess you are better off editing the file after permutati=
ng it in<br clear=3D"none">a spreadsheet or an editor.<br clear=3D"none"><b=
r clear=3D"none">Regards,<br clear=3D"none">/Karl Hammar<br clear=3D"none">=
<br clear=3D"none">--------------------------------------------------------=
---------------<br clear=3D"none">Asp=C3=B6 Data<br clear=3D"none">Lilla As=
p=C3=B6 148<br clear=3D"none">S-742 94 =C3=96sthammar<br clear=3D"none">Swe=
den<br clear=3D"none">+46 173 140 57<div class=3D"yqt9461288442" id=3D"yqtf=
d10530"><br clear=3D"none"><br clear=3D"none"><br clear=3D"none"></div></di=
v><br><br></div> </div> </div> </div></div></body></html>
------=_Part_4041153_1269052315.1496797996280--
- Raw text -