Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!

QR Code Generator for Customizer

by mcg1355, published

QR Code Generator for Customizer by mcg1355 Feb 4, 2013


Use This Project

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

58239Views 5374Downloads Found in Organization


This is a QR code generator to make 3D printed tags, labels, and iPhone cases. Please follow the instructions below to generate the QR code data for input into the customizer. The objects generated are very customizable, this was done in the interest of making them as customizable as possible; however, this also results in a good amount of responsibility on the user to design a functional object. Just inputting the code data will not necessarily make the object you want, everything can be sized, located, rotated, etc. but it should be reasonably straightforward to get what you want to make.

Use this to make a custom iPhone case with your contact information encoded into it for easy sharing. Or a tag for your luggage so your personal data such as name, address, and phone number are not easily visible to criminals that may go break into your home while you are traveling. Make a business card that links to your website or has your business contact info. Make a simple tag for just about anything! From mounting it somewhere to carrying it with you a printed tag will be more durable and longer lasting than any paper code would be.

The QR code is generated with cubes; therefore, the code data geometry may be added or subtracted from the basic tag shape. The currently available object shapes are:

  1. Just the QR code data geometry.
  2. A rectangular object of specified width, height, and thickness.
  3. An iPhone 4 case.
  4. An iPhone 5 case.
  5. A rectangular object with hole in it of specified width, height, thickness, hole location, and hole radius.
    Corners of the rectangles can also be rounded with a specified radius, with two opposite corners or all four corners rounded. There is also the option of to add a perimeter. This will make a wall around the object in the same shape of the object that is a specified distance from the object with specified wall thickness and wall height. The perimeter will mirror the shape based on the rectangular dimensions and round corner options selected, it will not automatically size for the iPhone cases if that is the selected object, you must change the tag_width, tag_height, and perimeter values accordingly. There is also an option to flip the QR code. This will mirror the code geometry so that it will be readable from the bottom of the object. This is because QR codes are only readable from one side, they can be rotated in any direction but flipping it will produce an unreadable code. If you intend the QR code to be readable from the top of the object, leave it in normal orientation. If you intend it to be readable from the bottom of the object, flip it over. Note, the code is already flipped for the iPhone cases so they will be readable from the back of the phone.

I’ve had a few ideas of how best to print a readable QR code.
-Suggested by Austin in the comments:
“Another coloring method that has given me good results with small text/icons: Print in white or clear, and rub the raised surface with an angled fat-tip black sharpie. It takes a little bit of practice, but the normal "bleeding" that occurs between the print-layers is surprisingly invisible when done that way.
The technique works best if there's a small panel on the object that contains the inscription with sharp edges on the outside, such as the butt of a handle. In this case, I would assume it would mean putting the QR code in a raised square frame.”
-The QR code geometry could be added to the object shape so it is raised above the top surface. Start the print, pause it once the base is finished but before all the code geometry has printed, switch to a contrasting color filament and finish the print.
-The QR code could be recessed into the object then filled with a colored resin / epoxy or you could print the positive geometry of the QR code separately and glue it into the recessed hole (this is what the tolerance option was created for).
-The tag or code could be printed with the QR code geometry completely removed from the tag with the perimeter activated. Then remove the build platform (or tape) with the print still attached. Then pour a clear or colored resin, using the perimeter as a mold edge. This same method could be used with printing just the QR code data geometry, effectively making a QR code floating in resin.
-I feel like this is begging for a dual extrusion printer. I’m interested in adding compatibility for dual extrusion but haven’t found any information of what I would need to add for it to be integrated into customizer.
There are many more option; however, I still don’t have a printer so haven’t been able to try them out first hand. Just customize away and see what works. As far as I can tell there haven’t been a lot of QR codes printed before so this may very well be new territory for all of us.

I’m planning on adding more object shapes so feel free to post what shapes you would like down below and I’ll try to add them if possible. Also I’m interested in adding a text option so that object could be made with both words and a QR code. I haven’t found a good source of information on how text works so any help would be appreciated with that.

Finally the iPhone case models are not of my design. I got them from the makerbot customizable iPhone case for the customizer so can’t take credit for the models.

NOTE: The program I created to generate data from the QR code image is a .exe file. I know this will run on window computers. You can likely run it on a mac through parallels or a similar windows emulation program. I am unsure about running it in linux. I am interested in getting the image analysis program into a more compatible format but don’t know how. I am open to any help if someone know how to achieve this.


UPDATE (3): The wonderful Thingiverse support staff updated the customizer to add support for the QR code data entry size / type in less than 24 hours! This thing is now fully functional! Follow the instructions below to generate the data for your own QR code and plug it right into the customizer to see it in the preview. Wanna test it out without printing? Simply rotate to the top most view and try scanning the QR code with your phone or tablet right off of the computer monitor. Give it a try on the top down view (pictures 3 and 4) in the sample pictures posted above on this page if you don't believe me (I hid a little message for you there as well!).

The iPhone cases when subtracting the code geometry appear a little buggy in the customizer, I'm looking into fixing this but still need to find the exact cause.

DESIGN NOTE: Don't have faces intersecting in the customizer or it won't render the stl. i.e., don't have the QR code geometry bottom set to 0 as this would mean the faces on the bottom of the code geometry and the face on the bottom of the object shape were occupying the same space causing a render error.

Abbreviated directions:

  1. Download the QR Code Data Generator zip file and extract it.
  2. Go to http://www.free-qr-code.net/ and make sure to set the size to 1 (should be set to 7 when you arrive on the page so don't forget to change it).
  3. Save the QR code as a png file with the name "qrcode" (it is case sensitive).
  4. Replace the QR code image in the QR Code Data Generator folder you extracted earlier with the QR code image you just saved.
  5. Doubble click on the QR Data Generator exe a few time.
  6. Copy the data out of QR DATA.txt and QR SIZE.txt into the appropriate variable in the customizer.
  7. You may move and rename your image and the two text file if you want to save them to be used in the customizer again.
  8. Customize your thing in the customizer and then save the stl.

Long winded directions:
Follow these steps to generate a QR code and get the data from it into OpenSCAD. You could design your object in the customizer using the bounding box of the QR code then add the data as the last step or add the data then manipulate all the variables. Both ways should work but the customizer may run faster with the bounding box than with the QR code, just remember to enter the Qr Size so the bounding box will be sized appropriately but it will be slightly larger than the Qr code geometry will be.

First, you need to pick what data you want to put into your QR code. Small (less characters) is preferable as the size (number of pixels) of the QR code will be smaller. The pixel dimension of the QR code will be directly reflected in the number of cubes required to print the code in 3D, leading to a direct change in size the QR code must be printed in order for it to be printable. If you are imbedding a web site into your code it is advisable to use a URL shorting service first to limit the number of character needed. Just google to find one as there are many free ones online.

Second, you will need to generate the QR code with the data that you want it to hold. I have located a free online QR code generator that you should use. It can be found here ( http://www.free-qr-code.net/ ). You must use this code generator as it has the option to adjust the number of pixels per data block (we want this to be a value of 1). This is shown in the second dropdown box from the top. It has a default value of “7” CHANGE THIS VALUE TO “1” (ONE) TO GENERATE YOUR QR CODE. Don’t change any other values on this web site when generating the QR code, except entering your data in the data entry box of course.

Third, save the QR code generated on the above website as a png file (right click -> save as -> etc.). You must save the QR code with the file name “qrcode” it must be all lower case and all one word. The whole file name for your QR code image should then be “qrcode.png” note this is including the file extension, you shouldn’t have to type that if saved it as a png already.

Fourth, download and unzip the folder “QR Code Data Generator”. Open this folder. It will contain many files; please don’t do anything to any of these files unless directed to (you absolutely can if you want to, but it could easily make things not work right). There will already be a png file called “qrcode” in this folder. Replace that file with the QR code file you saved earlier, double checking that the png file you are replacing it with has the same name (the name being the same is important if you didn’t notice by now :) ).

Fifth, double click the file called “QR Data Generator” this is a .exe application that will read your qrcode.png file and generate two output files called “QR DATA.txt” and “QR SIZE.exe”. These files will likely already be in the folder. Just make sure to double click on the QR Data Generator a few times to ensure that any old data in those files is erased. Note, a command prompt window or something like that will likely pop up for a short period and then close itself, this is a normal part of the application.

Sixth, open “QR SIZE.txt” it should contain a single number like 33 or 45 or something like that. This number is the dimension of the image you uploaded indicating the image was 33x33 pixels for example. Copy and paste this value into Qr Size box in the customizer.

Seventh, open “QR DATA.txt” it should contain a very large vector (the qr size squared to be exact). This is a list of the black and white pixel values from your QR code image. Copy and paste the entire thing (brackets, zeros, commas, and ones, just copy and paste the whole thing) into the Qr Data box in the customizer. This will allow the algorithm to generate your QR code in geometry.

Finally, download STL and print.

More from Organization

view more

All Apps

Customizer is the easiest way to take great 3D printable designs and make them your own. Make your OpenSCAD designs infinitely more valuable by empowering the community to customize them.

App Info Launch App
Customizer Thing App

Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App
Jun 18, 2016 - Modified Jul 16, 2016

The customizer doesnt work, I input the data and it just shows a solid blue rectangle. Help!?

For running on Linux it will be possible to use wine (https://www.winehq.org/) it can emulate windows systems. It's not super fast but should be enough for this.

Hei guys, I found another web app for QR code generation that produce a pattern of 0's and 1's as required by the customizer.
Simply select the lowest size 1- 93x93 before generating the QR.

Hope it works for all ;)


This just displays the code, not the ones and zeros. Suspect this is spam.

Could you do a step by step youtube video to explain to everyone?

Do I need another program to open the exe file? Its not working on my windows 10.

Exe is a windows program. But it could be that you are missing a dull or need to run in in cmd. To run it in cmd:
Try shift+right click and select copy path way. Then open cmd on your computer and rightklick and paste it in. Then hit enter and see if cmd gives you any errors.

I need help please!
When I put in the Data it shows this:
ERROR: boost::filesystem::canonical: No such file or directory: "/home/cust0mizer/.local/share" ERROR: Parser error in line 518: syntax error Can't parse file '/mnt/www/customizer.makerbot.com/releases/a84b6c97d041aa452fc18c294a27604c9bd12224/tmp/my-customized-qr-code-generator-for-customizer20160122-560-cil03i-0.scad'!

When I delete the "[ ]" nothing happens??
I tried with 0 & 255 and 1 &0. 0&255 didn't work at all.

Did you fix this? i had the same issue???

Comments deleted.

Hello mcg1355,
I am running Linux and I have read your comment about your .exe files will run on Windows, not on Linux. You also wrote that you are interested to get help to get your .exe files running on Linux. Well, I have done this successfully with other .exe files before. So maybe I can help.
What I need from you is a runtime library that comes with your .exe files (maybe you can ask your software supplier). On my machine I have installed a software called WINE which acts as a Windows software layer between the .exe file and Linux. See https://www.winehq.org/
I already tried to start your .exe files (without runtime library) + WINE but unfortunately, I did not got it working yet...
If this helps, let me know.

Doesn't work for me.
I couldn't produce a 42x42 image from any of the suggested generator sites.
I tried with 50x50 and 25x25 images.
none of them produces any result with the customizer here:

What should I do ?

p.s.: I also tried replacing 0 with 1 and 255with 0 as suggested in the previous comment.

I successfully made it.
Here is the QRCode generator I used: https://www.the-qrcode-generator.com/
Select Free Text, Save, No margin, 50px and you'll get a 42x42 bitmap

You may need to find and replace 0 with 1 and 255 with 0.

Remove then the first byte (should be a 1) to have the QRCode properly formatted.

have tried this a few times over the past few days with errors :(

Wondering if I am doing something wrong or if something is broken :(

I generated the QR code at http://www.free-qr-code.net/ just a simple 'test' text message

copy QRsize and QRdata in fields

the QR code appears in the preview window, but when clicking 'create thing' and going into queue after several minutes an unspecified error returns and it fails

let me know if I am doing anything wrong.:)

I did some testing in GIMP and if you make all the small blocks, points it also scans. This way you won't have any floating sections. You can also make a stencil with this knowledge. Just a FYI. Sweet idea. I think I'll use this. Thanks for the upload.

The exe file does not open in Windows 8.1.
Is there a work around?
I cannot generate a QR Data.txt file to use in customizer.

Does anyone have advice on what printer settings are best for this? I have been trying to print one for like 2 days and can't seem to get the resolution. Using a .3 nozzle with pla, extruder temp 200, heatbed 46. Layer height .2

ok, a little confused by step 6 and 7

in the customizer the only values that I can input into are Width, Height, Thickness, and Post Diameter.

QR size is a single number, but where is that inputted?

QR data is a series of numbers, where is that inputted?


Had similar issues to folks below, but worked through it. This isn't ideal (and might not all be necessary), but if you're anxious to make something and can jump through hoops, here's what I did. First, in the website code generator, adjust the length of your string to encode and the Error Correction Code (ECC) until your code has the SAME number of "squares" as the sample image; it's 19 squares between the two pattern anchor points, but re-count to be sure. The higher your ECC, the more "squares" your pattern will have. I found that medium ECC with a fairly short URL (like Facebook or LinkedIn page) came up correct.

Once you have that, save the image. But it saves as 280px, the default is only 41. So use a decent image resizer and resize down to 41px. I used Photoshop, your mileage may vary. With your new image now the same dimensions and "square" count as the default, run it through the exe file. Open up the results. It should be just 0 (white) and 1 (black). If you see something else, like 255 and 0, do a search and replace. This shouldn't happen if the image stays only black and white (basically it has a two-color palette with white in the first slot and black in the second), but if it does it's an easy fix. Have nothing but 0s and 1s and you're good.

Then paste in the data value. Leave the size value the default 41 (since we made your image match that size). It works for me!

Like I said, maybe there are other easier ways around some of the bugs, but if you just want a code, this should get you through.

it's trimming the right side of my qrcode off, and putting it on the left side.

Any idea how to make this work with a Mac?

Use the app called wine that allows you to open exe files.

hey. try to use it but i generate "test" and get size of 280 in the TXT. in low rec and 1 on he generator.
please help?

I am getting the same issue

same issue. 280 seems to be the default value no matter what is inputed. i've tried other QR code generators and the result is the same

If you use the subtract QR code, does the software connect the floating bits that appear to not be connected to anything. for example, the center of the squares in the corners. How do they stay connected?


i have made a online programm which can output the data for you script directly from the text input: http://www.nischelwitzer.com/data/javascript/demos/qr/http://www.nischelwitzer.com/d...

so no need to create a image and process this file with the python programm.

the only thing. it seems, that your script has some problems with the first pixel.
i am quite sure, that my date is correct because i tested it also in xls: http://www.nischelwitzer.com/data/javascript/demos/qr/qr_code.xlsxhttp://www.nischelwitzer.com/d...

best wishes,

I figured out what was wrong with the pixel thing. You just have to remove a minus 1 from the for loop.

Did you update the Customizer version of the scad file ?

Update: It appears that the QR code data is still passed to the customizer it just wont generate a preview. As far as I can tell you should be able to use the customizer without an issue, just add the QR data as the last step then hit the generate stl button. If you look at the instructions in your customized thing is should reflect that qr_data is equal to the QR data you copied in. I'll post this as an update in the instructions as well. This appears to work but I'm new to all this and haven't found a way to confirm as I don't have all the printer software to check the stl file, considering I don't have a printer yet.

Never mind, please see UPDATE (2) in instructions.

See UPDATE (3): Now fully functional within the customizer!!!

AWESOME script - this is a great way to implant tags directly into things!

Thanks! I can't wait to see what people do with it.

Another coloring method that has given me good results with small text/icons: Print in white or clear, and rub the raised surface with an angled fat-tip black sharpie. It takes a little bit of practice, but the normal "bleeding" that occurs between the print-layers is surprisingly invisible when done that way.

The technique works best if there's a small panel on the object that contains the inscription with sharp edges on the outside, such as the butt of a handle. In this case, I would assume it would mean putting the QR code in a raised square frame.

Thank you, that is an awesome tip. Is it okay if I add it to the description so the different possible methods are in one place? I'll credit you of course.

It appears that the QR data entry is not working in the customizer. This seems to be because there is some limit on the character count that can be entered into a text box. I'm not sure if this is the case but suspect that it is. As a workaround you can customize everything without the QR code data then create your customized "thing". When you go to the page to edit your thing all the parameter you entered should be in the instruction box. Copy and paste those into the OpenSCAD file along with your QR code data. Then render and export to an STL. I will work to see if I can find a solution, but may have to contact the support staff to see if they know what is happening. I apologize it is now working as intended at the moment. I will seek a solution and post any updates at the top of the instructions.

It appears that the customizer app has a limit on the size of data than can be entered into a text box. It returns an error for me when copying the QR code data into the text box. As a workaround you should be able customize everything else, download the thing to copy all your parameters out, then paste your parameters into OpenSCAD as well as pasting in the QR code data. Then render and export to STL. I'll try to figure out a way to make it all work in the customizer, but I may have to ask the support staff if there is a solution.