QR Code Generator for Customizer
by mcg1355, published
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 Commentsview all
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 figured out what was wrong with the pixel thing. You just have to remove a minus 1 from the for loop.
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...
Liked Byview all
Give a Shout Out
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.
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.
You must be logged in to post a comment.