Is it possible to 3D print a QR code? or to engrave it using a 3D printer? I tried to convert it to individual boxes but that takes too long and is very inaccurate. Is there a better way?
2 Answers
From the excellent Thingiverse link, Customizable QR Keyring or Tag by OutwardB - which was provided in the (now deleted) link-only answer:
Create the QR code
Go to QRCode Monkey
Only change the Content settings
DO NOT change the color, logo or design settings
Click Create QR Code
Click Download PNG and wait for the file to download
Convert to SVG
- Go to PNG to SVG Converter and convert the PNG image you just downloaded to a .SVG file
Customise in OpenSCAD
You will need
QR_Code_Customizer_V01_2.scadfrom the files repository on Thingverse
Download OpenSCAD from here and install it - https://openscad.org/downloads.html
Put the downloaded SVG file in the same folder as the .SCAD file from this page
Double-click the .SCAD file to open it
Click Window, then untick Hide Customizer
Optional: Click Window, then tick Hide Editor
Enter the SVG file name in the basic settings tab (or rename the file to qr-code.svg before opening OpenSCAD)
Customize the settings. After changing a setting, you may need to click outside the text box to apply the change
Click Design > Render and wait for the design to render
Click File > Export > Export to STL
Save the file
Notes
- Raised and Cut-Out types are for changing filament at layer height
- Multi-color and Code are to be used together for inlay/multi-color printers
- You can also set Base Height or Code Height to 0 and export each part on it's own
- If you want to print a double sided tag, you can set Base Height to 0 and export the second side. Then just flip this over in the slicer
- The text options are a okay for basic text, but if you want to use another program to add some, you can add extra height to the top/bottom of the card under Extra Size Setting
Advanced Notes
- There is some logic in the script that stop you from making the size too small if you have Line Size set, you can set Line Size to 0 or half your line size value if you really want to override this.
- You can change the Customize Design settings before generating the QR Code (on QRCode Monkey), but you'll need to set Line Size to 0 and there are no promises that it'll print well
- If you want to use a different site to create the QR code, resize the image to 1147x1147 pixels before converting it to an SVG. Or if the QR code in the image doesn't have a border, resize it to 1000x1000 px.
- If you want to use a different source for the SVG file, there are instructions for working out the size in the code (
QR_Code_Customizer_V01_2.scad) at line 215. You'll need to export it as a STL and measure it outside of OpenSCAD, then enter the values into the script.
The linked to Thingiverse page also has some extra steps for adding an icon:
Add an icon
You can import another SVG file as a logo or use logo fonts.
The below example uses an wifi SVG file from IconMonstr
- Download the wifi SVG file
- Place it in the same folder as the .SCAD file
- In the customizer:
- Add some extra space to the top or bottom of the card under Extra Size Settings
- Go to SVG Logo Settings
- Tick enable svg logo
- Enter the filename under svg logo name
- Set the svg y nudge position and svg logo scale
- 6,748
- 8
- 40
- 68
I used the qrcore2stl website for my WiFi access point.
You can easily change the parameters of the QR code and associated .stl, as well as add custom text and keychain holes.
For my WiFi access, I inserted a pause command at 1 mm height, and changed filament from white to black at that point.
- 1,662
- 8
- 12

