delorie.com/archives/browse.cgi   search  
Mail Archives: geda-help/2017/06/06/21:13:39

X-Authentication-Warning: delorie.com: mail set sender to geda-help-bounces using -f
X-Recipient: geda-help AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1496797997; bh=+1Z/SBxVkpy9jEJq1DVIAaAeeprwo8GV2gd4qxltm2M=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=ZpaaP2+vK6BHuMpmr7pxb5MSNrxibI5YHmD7OQNQlMthkpkB5suWPie8lYUeETqNUrvr9evcdbkgshpFOWoXbifSmeYn2hYtInwyrLtwJCAH/QaKgfvPML9RuCjTzCVOZSoDXiWrjt3AtLNde9ncY5nprgV7wde1glTKP7Y3rcJH2/H/NFMsFMaoyFFUx5IRAuzdOr+EyRwG1MzvivvIBEQlpOWg6Y8033vy1ojFJspaqWUs0anA7r/CNvcg3pNKj/bl5Aq+jb4ELvpyOeg2msm3/QPuPPU06SRkJ8CVQgm/siohLpOml+brlo+XHtLucvcV6ENPmtIw9a6al4+NPg==
X-YMail-OSG: dkCnpCUVM1m.xkccip1PG2RCH8TLnKE.pH8_nydlVXjN6FAe.CNRB1mReN8WwWv
KuZdKsqNl0e4CT0jqk33pb4tJcaYoFI3hmpjrDRmsMhN3mje0FT6FDGsPN3YHW6rL5LZXjMqRNmM
qlqZ9bPz9fZfKpE2UOBVA51c29YGx_gyAviinlE3GZX8amQ2Pgv4keWXsaf3E8qcXTA4iFOECDqi
XMOonvtFosM7.nXVetRuAvA6ti86PIQw3XSFy0P5a3XS4I7FaoQeB70MWfVQhiqQDqFoKUEljZyN
6qUtSqxwb1RseIcS6LafBHfiwF1IjEkOPUtZxGvJGGmHe3CmKEJgMPlBCwi5r.kgSgj1k3C6pueK
U0ArJYGOotfugA92j7mGqcSL6wYGjU0QtQfqZEmkVjxFqOKfv4t1rHbXXzjGEdYJXcz2Ee73SYrB
Q7HQZTL_U9e5GdNbB9nHYRt86OHvE7SuIF7E3.YtjkFjHPtMTPrIjs3wWt_hO6HHFGHbjbnBtm.d
1asQsRrI_QBDa.bEZEE8-
Date: Wed, 7 Jun 2017 01:13:16 +0000 (UTC)
From: "Edward Comer (ecomer AT yahoo DOT com) [via geda-help AT delorie DOT com]" <geda-help AT delorie DOT com>
To: "geda-help AT delorie DOT com" <geda-help AT delorie DOT com>
Message-ID: <1036667236.4041154.1496797996282@mail.yahoo.com>
In-Reply-To: <20170606230904.1F24E807466D@turkos.aspodata.se>
References: <1343213007 DOT 3854008 DOT 1496782855983 DOT ref AT mail DOT yahoo DOT com> <1343213007 DOT 3854008 DOT 1496782855983 AT mail DOT yahoo DOT com> <20170606230904 DOT 1F24E807466D AT turkos DOT aspodata DOT se>
Subject: Re: [geda-help] gxyrs with gEDA PCB
MIME-Version: 1.0
X-Mailer: WebService/1.1.9778 YahooMailNeo Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36
Reply-To: geda-help AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-help AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

------=_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" &lt;karl AT aspodata DOT se&gt;<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">&gt; Has anyone used gx=
yrs with gEDA pcb?<br clear=3D"none">&gt; I am wanting to utilize the fabri=
cation service at MicroFab<br clear=3D"none">&gt; (<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">&gt; different from the=
 xy file produced by pcb (pcb -x bom --bomfile<br clear=3D"none">&gt; /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">&nbsp; Is your favorite EDA tool not on this list? Let u=
s know at<br clear=3D"none">&nbsp; <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">&nbsp;=
 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 &nbsp;&nbsp;&nbsp; Surface or Through Hole &nbsp;&nbsp;&nbsp; 1/=
SMT/SMD for SMD, 2 for PTH<br clear=3D"none"> X-Size &nbsp;&nbsp;&nbsp; X D=
imension of the Part (mils) &nbsp;&nbsp;&nbsp; Size of the Package, Measure=
d By the Pad Footprint<br clear=3D"none"> Y-Size &nbsp;&nbsp;&nbsp; Y Dimen=
sion of the Part (mils) &nbsp;&nbsp;&nbsp; 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(&lt;&gt;) {<br clear=3D"none">&nbsp; &nbsp; if (!m/^#/=
) {<br clear=3D"none">&nbsp;&nbsp;&nbsp; chomp;<br clear=3D"none">&nbsp;&nb=
sp;&nbsp; my @fld =3D split(/,/);<br clear=3D"none">&nbsp;&nbsp;&nbsp; my @=
out =3D (@fld[0,3,4,5,6], 1, 0, 0, @fld[2,1], 0);<br clear=3D"none">&nbsp;&=
nbsp;&nbsp; $_ =3D join("\t", @out) . "\n";<br clear=3D"none">&nbsp; &nbsp;=
 }<br clear=3D"none">&nbsp; &nbsp; 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.&nbsp; 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.&nbsp; rotation in =
degrees.<br clear=3D"none"># --------------------------------------------<b=
r clear=3D"none">_R2&nbsp; &nbsp;  108.5000&nbsp; &nbsp; &nbsp; &nbsp; 78.0=
0&nbsp;  90&nbsp; &nbsp; &nbsp; bottom&nbsp; 1&nbsp; &nbsp; &nbsp;  0&nbsp;=
 &nbsp; &nbsp;  0&nbsp; &nbsp; &nbsp;  "10k"&nbsp;  "m1608_a.fp"&nbsp; &nbs=
p; 0<br clear=3D"none">_C6&nbsp; &nbsp;  71.9500 90.50&nbsp;  180&nbsp; &nb=
sp;  top&nbsp; &nbsp;  1&nbsp; &nbsp; &nbsp;  0&nbsp; &nbsp; &nbsp;  0&nbsp=
; &nbsp; &nbsp;  "1u"&nbsp; &nbsp; "m2012_a.fp"&nbsp; &nbsp; 0<br clear=3D"=
none">_C10&nbsp; &nbsp; 89.0000 99.05&nbsp;  270&nbsp; &nbsp;  top&nbsp; &n=
bsp;  1&nbsp; &nbsp; &nbsp;  0&nbsp; &nbsp; &nbsp;  0&nbsp; &nbsp; &nbsp;  =
"100n"&nbsp; "m2012_a.fp"&nbsp; &nbsp; 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">&gt; Exactly how to use gxyrs is not obvious, at least not to me.=
&nbsp;The<br clear=3D"none">&gt; man pages are rather terse, to say the lea=
st.<br clear=3D"none">&gt; 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019