Loading
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

Description

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.

Recent Comments

view all

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?

Did you update the Customizer version of the scad file ?

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?

More from Organization

view more

Makes

Liked By

view all

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

Instructions

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 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 ( 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.

Comments

You must be logged in to post a comment.

tintinz on Feb 15, 2014 said:

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?

cheverton on Nov 11, 2013 said:

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?

nischi on May 25, 2013 said:

hi,

i have made a online programm which can output the data for you script directly from the text input: 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/d...

best wishes,
nischi

danieldaniel on Sep 27, 2013 said:

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

mcg1355 on Feb 4, 2013 said:

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.

mcg1355 on Feb 4, 2013 said:

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

MakerBlock on Feb 4, 2013 said:

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

mcg1355 on Feb 4, 2013 said:

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

Austin on Feb 4, 2013 said:

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.

mcg1355 on Feb 4, 2013 said:

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.

mcg1355 on Feb 4, 2013 said:

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.

mcg1355 on Feb 4, 2013 said:

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.

Top