First version of board

This commit is contained in:
sebastian 2014-01-28 23:45:31 +01:00
parent b10f401493
commit 7184fb27a0
8 changed files with 4664 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.bak
*.kicad_pcb-bak

1471
artwork/logo.mod Normal file

File diff suppressed because it is too large Load Diff

BIN
artwork/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

112
artwork/logo.svg Normal file
View File

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="744.09448819"
height="1052.3622047"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="New document 1">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.979899"
inkscape:cx="220.65193"
inkscape:cy="677.537"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1280"
inkscape:window-height="971"
inkscape:window-x="0"
inkscape:window-y="31"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g3815"
transform="matrix(0.67037935,0,0,0.69491293,262.0628,302.68028)">
<path
id="path13492"
style="fill:none;stroke:#000000;stroke-width:0.99999999mm;stroke-linecap:square;stroke-opacity:1"
d="m 2,25.3 21,0"
inkscape:connector-curvature="0" />
<path
id="path13494"
style="fill:none;stroke:#000000;stroke-width:0.99999999mm;stroke-linecap:square;stroke-opacity:1"
d="m 54,25.3 22,0"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path13490"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.99999999mm;stroke-linecap:square;stroke-opacity:1"
d="m 23.157772,39.221114 0,-28 28.4,14 -28.4,14 z" />
<path
id="path14470"
style="fill:none;stroke:#000000;stroke-width:0.99999999mm;stroke-linecap:square;stroke-opacity:1"
d="m 52.7,39.3 0,-28"
inkscape:connector-curvature="0" />
<path
id="path3347"
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 38.5,0.4 -6,3.9 2.4,1.2 -2.5,4.9 -0.4,0.8 1.6,0.8 0.4,-0.8 2.5,-4.9 2.3,1.2 -0.3,-7.1 z"
inkscape:connector-curvature="0" />
<path
id="path3349"
style="fill:#000000;fill-opacity:1;stroke:none"
d="m 47,4.8 -5.9,3.8 2.4,1.2 -2.5,4.9 -0.4,0.8 1.6,0.8 0.4,-0.8 2.4,-4.9 2.4,1.2 -0.4,-7 z"
inkscape:connector-curvature="0" />
</g>
<text
xml:space="preserve"
style="font-size:52.16427612px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Segment14;-inkscape-font-specification:Segment14"
x="208.15106"
y="317.67261"
id="text3004"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3006"
x="208.15106"
y="317.67261" /></text>
<text
xml:space="preserve"
style="font-size:34.88663101px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Segment14;-inkscape-font-specification:Segment14"
x="173.17659"
y="307.83032"
id="text3209"
sodipodi:linespacing="125%"
transform="scale(0.9185358,1.0886892)"><tspan
sodipodi:role="line"
id="tspan3211"
x="173.17659"
y="307.83032">HEPTA</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

File diff suppressed because it is too large Load Diff

34
artwork/logoconvert.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
if [[ $# != 3 ]]; then
echo "Usage : $0 infile layer size"
echo "Example : $0 foo.mod 21 13.00mm"
exit 0
fi
infile="$1"
layer="$2"
size="$3"
ssize="$(echo $size | sed 's/\./_/')"
case "$layer" in
15)
layername="cutop";;
0)
layername="cubot";;
21)
layername="silktop";;
20)
layername="silkbot";;
*)
echo "Unknown layer number $layer"
esac
name=${infile%.*}
outfile="${name}_${layername}_${ssize}.mod"
outname="${name}_${layername}_${ssize}"
echo "Scaling $infile in layer $layer to $size"
./scale.pl "$infile" "$outfile" "$layer" "$size"
cat "$outfile" | sed "s/LOGO/$outname/g" | sponge "$outfile"

103
artwork/scale.pl Executable file
View File

@ -0,0 +1,103 @@
#!/usr/bin/perl -W
use feature qw(state);
sub usage();
if(scalar(@ARGV) < 4) {
usage();
}
my $outfile = $ARGV[1];
my $size = $ARGV[3]; # in 'mm' or in 'in'
my $factor;
my $calibration;
my $layer = $ARGV[2];
open(FILE, '<', $ARGV[0]) || die("cannot open: $!");
my @infiledata = <FILE>;
close(FILE);
foreach $line (@infiledata) {
my $tmp = $line;
state $xmin = 0; # same as 'static xmin = 0;' in C
state $xmax = 0;
state $ymin = 0;
state $ymax = 0;
if($tmp =~ m/^(.*Dl)\ (.*)\ (.*)$/) {
if($2 <= $xmin) {
$xmin = $2;
}
if($2 >= $xmax) {
$xmax = $2;
}
if($3 <= $ymin) {
$ymin = $3;
}
if($3 >= $ymax) {
$ymax = $3;
}
}
if( ($xmax - $xmin) > ($ymax - $ymin) ) {
$calibration = ($xmax - $xmin);
} else {
$calibration = ($ymax - $ymin);
}
#print $xmin," - ",$xmax," - ",$ymin," - ",$ymax,"\n";
#print $calibration;
}
if($size =~ m/^\d{1,3}\.\d{1,3}in$/) {
$size =~ s/in//;
$factor = 10000/$calibration*$size; # currently all KiCad native units are in 1/10000 in
} elsif($size =~ m/^\d{1,3}\.\d{1,3}mm$/) {
$size =~ s/mm//;
$factor = 10000/$calibration/25.4*$size;
} else {
usage();
}
open(FILE,'>',$outfile) || die("cannot open: $!");
foreach $line (@infiledata) {
my $tmp = $line;
if($tmp =~ m/^(.*Dl)\ (.*)\ (.*)$/) {
if( ($layer == 21) || ($layer == 15) ) { # top silkscreen or top copper
print FILE $1," ",int($2*$factor)," ",int($3*$factor),"\n";
} elsif ( ($layer == 20) || ($layer == 0) ) { # bottom silkscreen or bottom copper - needs horizontal mirroring
print FILE $1," ",int((-1)*$2*$factor)," ",int($3*$factor),"\n";
}
} elsif($tmp =~ m/^T(\d{1})\ 0\ (-{0,1}\d*)\ (-{0,1}\d*)\ (-{0,1}\d*)\ (-{0,1}\d*)\ (-{0,1}\d*)\ ([A-Z]{1})\ ([A-Z]{1})\ (-{0,1}\d*)\ (\".*\")$/) {
# always print module text on top-silkscreen (layer 21)
# printing it on the bottom silkscreen seems to confuse KiCad
# and things go haywire (text always appers on 'top'-whatever
# when graphics are on 'bottom'-whatever and vice versa).
print FILE "T$1 0 ",int($2*$factor)," ",int($3*$factor)," ",int($4*$factor)," ",int($5*$factor)," ",int($6*$factor)," ",$7," ",$8," 21 N ",$10,"\n";
} elsif($tmp =~ m/^(.*DP)\ (-{0,1}\d*)\ (-{0,1}\d*)\ (-{0,1}\d*)\ (-{0,1}\d*)\ (-{0,1}\d*)\ (-{0,1}\d*)\ (-{0,1}\d*)(.*)$/) {
if( ($layer == 0) || ($layer == 15) ) { # on top/bottom copper layer - always print on top-copper to avoid crap. see above
print FILE "$1 $2 $3 $4 $5 $6 $7 15\n";
} elsif ( ($layer == 20) || ($layer == 21) ) { # on top/bottom silk - always print on top-silk to avoid crap. see above
print FILE "$1 $2 $3 $4 $5 $6 $7 21\n";
}
}
else {
print FILE $line;
}
}
close(FILE);
sub usage() {
print "\nusage: scale.pl <infile.emp> <outfile.emp> <layer number> <size: e.g. 5.00mm or 0.25in>\n\n";
print "The module will be scaled so that its largest dimension (x or y) matches <size>\n\n";
print "KiCad layers:\n";
print "-------------\n\n";
print "Top copper: 15\n";
print "Bottom copper: 0 (*)\n";
print "Top silkscreen: 21\n";
print "Bottom silkscreen: 20 (*)\n\n";
print "(*) To move the mirrored logo to bottom copper/silkscreen\n";
print " move the curser over it and press 'F' for flip layer.\n\n";
print " The layer-swap is not done in this script as KiCad\n";
print " gets confused and prints stuff on wrong layers.\n\n";
exit;
}

File diff suppressed because it is too large Load Diff