1
0
mirror of git://projects.qi-hardware.com/m1.git synced 2024-11-16 16:04:05 +02:00

added cad/Makefile to automate svg2pdf and dxf2png

This commit is contained in:
Wolfgang Spraul 2011-01-13 22:03:09 +00:00
parent d61c132009
commit 72c2bdaa51
5 changed files with 65 additions and 1 deletions

1
cad/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
milkymist-assemble-howto.pdf

21
cad/Makefile Normal file
View File

@ -0,0 +1,21 @@
all: milkymist-assemble-howto.pdf protocase_v7_laser.png
#
# Install the Yanone Kaffeesatz font from http://www.yanone.de/
#
milkymist-assemble-howto.pdf: milkymist-assemble-howto.svg
inkscape -A $@ $<
TMP1 := $(shell mktemp)
TMP2 := $(shell mktemp)
# process with xsltproc to make the lines thicker and more visible in the PNG
protocase_v7_laser.png: protocase_v7_laser.dxf
dia -e $(TMP1) -t dia $<
zcat $(TMP1) | xsltproc --stringparam line_width 0.5 dia_set_line_width.xsl - | gzip > $(TMP2)
dia -e $@ -t png -s x500 $(TMP2)
rm -f $(TMP1) $(TMP2)
clean:
rm -f milkymist-assemble-howto.pdf
rm -f protocase_v7_laser.png

View File

@ -0,0 +1,41 @@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dia="http://www.lysator.liu.se/~alla/dia/" >
<xsl:output method="xml" encoding="UTF-8" />
<xsl:param name="line_width" />
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!--xsl:template match="dia:real" >
<xsl:element name="dia:real">
<xsl:attribute name="val">
<xsl:value-of select="$line_width" />
</xsl:attribute>
</xsl:element >
</xsl:template-->
<!-- xsl:template match="dia:attribute[@name='line_width']/dia:real" >
<dia:attribute name="line_width">
<xsl:element name="dia:real">
<xsl:attribute name="val">
<xsl:value-of select="$line_width" />
</xsl:attribute>
</xsl:element >
</dia:attribute>
</xsl:template -->
<xsl:template match="dia:attribute[@name='line_width']/dia:real" >
<xsl:element name="dia:real">
<xsl:attribute name="val">
<xsl:value-of select="$line_width" />
</xsl:attribute>
</xsl:element >
</xsl:template>
</xsl:stylesheet>

View File

@ -5253,7 +5253,7 @@
id="image10882"
height="243.06699"
width="303.12479"
xlink:href="file:///home/labor/Desktop/Kunden/Milkymist-Howto/Mm1_rc1_parts_on_pcb_farb.png"
xlink:href="Mm1_rc1_parts_on_pcb_farb.png"
transform="matrix(0.54058897,0.84128685,-0.95495475,0.29675145,0,0)" />
<g
style="display:inline"

Before

Width:  |  Height:  |  Size: 395 KiB

After

Width:  |  Height:  |  Size: 395 KiB

View File

@ -3,3 +3,4 @@ usb_jtagFront.pos
usb_jtagBack.pos
$savepcb.000
$savepcb.brd
.dsv