1
0
mirror of git://projects.qi-hardware.com/f32xbase.git synced 2025-04-21 12:27:27 +03:00

c2ben/: initial commit of passive C2 adapter board for the Ben's uSD slot.

This commit is contained in:
Werner Almesberger
2010-10-20 20:16:23 -03:00
parent 7829d4d569
commit c1935d59d0
9 changed files with 1066 additions and 0 deletions

4
c2ben/cam/Makefile Normal file
View File

@@ -0,0 +1,4 @@
.PHONY: pcb
pcb:
./doit >job

24
c2ben/cam/doit Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/sh -e
DIR=/home/moko/svn.openmoko.org/developers/werner/cncmap
RECT=$DIR/rect/rect
ALIGN=$DIR/align/align
ZMAP=$DIR/zmap/zmap
GP2RML=$DIR/gp2rml/gp2rml
GEN=${1:-./pcb.pl}
rdata="19.6 13.0 -56.2 19.6 53.1 -56.1 110.7 14.1 -56.2"
rdate="15.9 13.1 -57.2 15.9 77.4 -57.1 120.8 15.1 -57.0"
# lower Z by 0.5 mm relative to highest point
Z=-57.6
rect=`$RECT $rdata | awk '{$3 = ""; print}'`
$GEN |
awk '{ if ($3 != "") $3 += '$Z'; print $0; }' |
$ALIGN 0 1 $rect |
# angle, reference (lower left corner), rect
$GP2RML 2 0.5 0.5
# clearance, xy speed, z speed
# since everything is in the same plane, z clearance must be thickness plus
# real clearance !

75
c2ben/cam/pcb.pl Executable file
View File

@@ -0,0 +1,75 @@
#!/usr/bin/perl
$d = 25.4/1000*35;
$r = $d/2-0.1; # compensate deflection of board
sub orig
{
$x0 = $_[0];
$y0 = $_[1];
}
sub mil
{
return $_[0]/1000*25.4;
}
sub cut
{
if (defined $x) {
if ($x == $_[0]+$x0 && $y == $_[1]+$y0) {
shift @_;
shift @_;
} else {
print "\n";
}
}
while (@_) {
$x = shift @_;
$y = shift @_;
# ($x, $y) = (-$y, $x);
$x += $x0;
$y += $y0;
print "$x $y $z\n";
}
}
sub card
{
&cut(
&mil( 0)-$r, &mil( 0)-$r,
&mil( 0)-$r, &mil( 570)+$r,
&mil( 30)-$r, &mil( 600)+$r,
&mil( 30)-$r, &mil( 650)-$r,
&mil( 0)-$r, &mil( 650)-$r,
&mil( 0)-$r, &mil( 705)+$r,
&mil( 55)-$r, &mil( 760)+$r,
&mil( 55)-$r, &mil( 960)+$r,
&mil( 435)+$r, &mil( 960)+$r,
&mil( 435)+$r, &mil( 0)-$r,
&mil( 0)-$r, &mil( 0)-$r);
}
sub conn
{
&cut(
&mil( 0)-$r, &mil( 0)-$r,
&mil( 0)-$r, &mil( 505)+$r,
&mil( 450)+$r, &mil( 505)+$r,
&mil( 450)+$r, &mil( 0)-$r,
&mil( 0)-$r, &mil( 0)-$r);
}
$z = -0.8; # full thickness of board
# x: corner offset, compensation for rotation, array position
# y: corner offet
&orig(13*4, 0)
&card;
&orig($x0, $y0+26)
&conn;