delorie.com/archives/browse.cgi   search  
Mail Archives: geda-help/2017/06/06/19:09:30

X-Authentication-Warning: delorie.com: mail set sender to geda-help-bounces using -f
X-Recipient: geda-help AT delorie DOT com
X-Mailer: exmh version 2.8.0 04/21/2012 (debian 1:2.8.0~rc1-2) with nmh-1.5
X-Exmh-Isig-CompType: repl
X-Exmh-Isig-Folder: inbox
From: karl AT aspodata DOT se
To: geda-help AT delorie DOT com
Subject: Re: [geda-help] gxyrs with gEDA PCB
In-reply-to: <1343213007.3854008.1496782855983@mail.yahoo.com>
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>
Comments: In-reply-to "Edward Comer (ecomer AT yahoo DOT com) [via geda-help AT delorie DOT com]" <geda-help AT delorie DOT com>
message dated "Tue, 06 Jun 2017 21:00:55 -0000."
Mime-Version: 1.0
Message-Id: <20170606230904.1F24E807466D@turkos.aspodata.se>
Date: Wed, 7 Jun 2017 01:09:04 +0200 (CEST)
X-Virus-Scanned: ClamAV using ClamSMTP
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

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 -


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