123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- #!/bin/bash
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- INSCH="dispensy.kicad_sch"
- INPCB="dispensy.kicad_pcb"
- OUTDIR="plot"
- LAYER_F="F.Cu,F.Mask,F.Paste,F.Silkscreen,Edge.Cuts,User.Drawings"
- LAYER_B="B.Cu,B.Mask,B.Paste,B.Silkscreen,Edge.Cuts,User.Drawings"
-
- cd "$(dirname "$0")"
- rm -rf $OUTDIR
- mkdir -p $OUTDIR
-
-
-
-
-
- for IN in $INSCH
- do
- echo "Exporting schematic $IN"
-
- for TYPE in pdf svg
- do
- echo "Exporting schematic $TYPE"
- rm -rf $OUTDIR/$IN.$TYPE
- kicad-cli sch export $TYPE \
- -t "KiCad Default" \
- -o $OUTDIR/$IN.$TYPE \
- $IN
- echo
- done
- done
-
- for IN in $INPCB
- do
- echo "Exporting board $IN"
-
-
-
-
-
- for TYPE in pdf svg
- do
- rm -rf $OUTDIR/$IN.$TYPE
- mkdir -p $OUTDIR/$IN.$TYPE
-
- echo "Exporting board $TYPE"
- kicad-cli pcb export $TYPE \
- -t "KiCad Classic" \
- -l $LAYER_B,$LAYER_F \
- -o $OUTDIR/$IN.$TYPE/0_both.$TYPE \
- $IN
- echo
-
- echo "Exporting board front $TYPE"
- kicad-cli pcb export $TYPE \
- -t "KiCad Classic" \
- -l $LAYER_F \
- -o $OUTDIR/$IN.$TYPE/1_front.$TYPE \
- $IN
- echo
-
- echo "Exporting board back $TYPE"
- kicad-cli pcb export $TYPE \
- -t "KiCad Classic" \
- -l $LAYER_B \
- -o $OUTDIR/$IN.$TYPE/2_back.$TYPE \
- $IN
- echo
- done
-
- echo "Concatenating board PDFs"
- mv $OUTDIR/$IN.pdf $OUTDIR/$IN.tmp
- pdfunite $OUTDIR/$IN.tmp/*.pdf $OUTDIR/$IN.pdf
- rm -rf $OUTDIR/$IN.tmp
-
-
-
-
-
- echo "Exporting board 3D"
- kicad-cli pcb export vrml \
- -o $OUTDIR/$IN.wrl \
- $IN
- done
|