Ei kuvausta
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

generate_plot.sh 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/bin/bash
  2. # SPDX-FileCopyrightText: 2023 - 2024 Thomas Buck <thomas@xythobuz.de>
  3. # SPDX-License-Identifier: CERN-OHL-S-2.0+
  4. #
  5. # ------------------------------------------------------------------------------
  6. # | Copyright (c) 2023 - 2024 Thomas Buck <thomas@xythobuz.de> |
  7. # | |
  8. # | This source describes Open Hardware and is licensed under the CERN-OHL-S v2 |
  9. # | or any later version. |
  10. # | |
  11. # | You may redistribute and modify this source and make products using it under |
  12. # | the terms of the CERN-OHL-S v2 (https://ohwr.org/cern_ohl_s_v2.txt) |
  13. # | or any later version. |
  14. # | |
  15. # | This source is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, |
  16. # | INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A |
  17. # | PARTICULAR PURPOSE. Please see the CERN-OHL-S v2 (or any later version) |
  18. # | for applicable conditions. |
  19. # | |
  20. # | Source location: https://github.com/drinkrobotics/dispensy |
  21. # | |
  22. # | As per CERN-OHL-S v2 section 4, should You produce hardware based on this |
  23. # | source, You must where practicable maintain the Source Location visible |
  24. # | on the external case of the Gizmo or other products you make using this |
  25. # | source. |
  26. # ------------------------------------------------------------------------------
  27. cd "$(dirname "$0")"
  28. OUTDIR="plot"
  29. LAYER="F.Cu,B.Cu,F.Mask,B.Mask,F.Paste,B.Paste,F.Silkscreen,B.Silkscreen,Edge.Cuts,User.Drawings"
  30. rm -rf $OUTDIR
  31. mkdir -p $OUTDIR
  32. for VAR in pdf svg
  33. do
  34. echo "Exporting schematic $VAR"
  35. rm -rf $OUTDIR/dispensy_sch.$VAR
  36. kicad-cli sch export $VAR \
  37. -t "KiCad Default" \
  38. -o $OUTDIR/dispensy_sch.$VAR \
  39. dispensy.kicad_sch
  40. echo "Exporting board $VAR"
  41. rm -rf $OUTDIR/dispensy_pcb.$VAR
  42. kicad-cli pcb export $VAR \
  43. -t "KiCad Classic" \
  44. -l $LAYER \
  45. -o $OUTDIR/dispensy_pcb.$VAR \
  46. dispensy.kicad_pcb
  47. echo
  48. done
  49. echo "Exporting board step file"
  50. rm -rf $OUTDIR/dispensy_pcb.step
  51. kicad-cli pcb export step \
  52. -o $OUTDIR/dispensy_pcb.step \
  53. dispensy.kicad_pcb
  54. echo "Converting step to 3mf"
  55. rm -rf $OUTDIR/dispensy_pcb.3mf
  56. prusa-slicer --export-3mf $OUTDIR/dispensy_pcb.step
  57. echo "Deleting step file"
  58. rm -rf $OUTDIR/dispensy_pcb.step