Skip to content

Simple scad to generate model of badge with qr code

License

Notifications You must be signed in to change notification settings

Zhurik/qr_badge

Repository files navigation

QR badge

Simple scad to generate STL model of badge with qr code.

I designed it to make simple badge to help people connect to WIFI, but you can use it however you want!

example image

How to create STL with docker-compose

  1. Prepare svg file of your desired qr code (or provide parameters for its generation in docker-compose.yaml file)

  2. Change all the necessary parameters in the environment section of the docker-compose.yaml file

  3. Run docker-compose up

How to create STL with docker (old)

  1. Prepare svg file of your desired QR code

  2. Put it in the same folder as main.scad and call it qr.svg

  3. Change all necessary parameters in main.scad file

  4. Build docker image

docker build -t qr_badger .
  1. Run given image
docker run --mount type=bind,source="$(pwd)"/,target=/data qr_badger

You can freely pass parameters to change the result of output model. For example:

docker run \
    -e LABEL='New label' \
    -e ADD_RING=false \
    -e QR_SIZE=150 \
    -e SVG_PATH='./qr.svg'
    --mount type=bind,source="$(pwd)"/,target=/data qr_badger

Or generate qr on the fly:

docker run \
    -e LABEL='My WIFI' \
    -e ADD_RING=false \
    -e QR_SIZE=150 \
    -e WIFI_SSID="My WIFI" \
    -e WIFI_PASSWORD="admin1" \
    --mount type=bind,source="$(pwd)"/,target=/data qr_badger

Full list of parameters presented in ./docker-compose.yaml file.

Features

  • Optional ring at the top

  • Docker image to generate STL from given parameters

  • Docker-compose

  • Generate QR svg from parameters

  • Make text optional

  • Optional holes for magnets

  • Ability to add external fonts

  • Magnets may be embedded

  • Optional border (bug needs to be fixed)

  • Optional hole at the top

  • Preview badge from dockerfile

About

Simple scad to generate model of badge with qr code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published