Notifications
Clear all

Embed QR Code into a 3D Print  

  RSS
eager
(@eager)
Trusted Member
Embed QR Code into a 3D Print

Hi All...

I was reading in a printed (not 3D printed, but all in 1 printer) book that you can just take an .stl file of a QR code and embed that QR Code into an .stl or .obj file and prrnt htat 3D print wit the embedded QR code using Tinkercad's Workplane.

Is it really that easy?

Maybe just as big a question is how do you get your QR Code as an .stl file?

Can you take a graphic file of a QR code and export that as  a .stl file using OpenScad? Meshmixer?

Ex. You find a .stl file on Thingiverse and then you embed your QR code on to that Thingiverse file?

Thank you!

 

 

 

 

Posted : 07/05/2025 7:58 pm
JP Guitars
(@jp-guitars)
Reputable Member
RE: Embed QR Code into a 3D Print

You don't even need to use tinker CAD.

  1. In Prusa slicer add a square object to the build plate, I would go 100mm / 4 inches square by 1 or 2 mm thick.
  2. Do a Google search for a QR code generator, generate a svg of the QR code. It's a while since I did it so I might have generated a jpg then converted to an svg
  3. Overlay the svg on the square and raise it by 1mm. 
  4. Print it with the start being in white with a switch to black at the boundary between the square and the QR card.
Posted : 07/05/2025 8:06 pm
_KaszpiR_
(@_kaszpir_)
Prominent Member
RE: Embed QR Code into a 3D Print

1. generate qr code, export as SVG or image
2. if exported as image you need to convert it to vector and save as SVG, can be done with potrace (or inkscape via importing image and using Path > Trace Bitmap Item, )
3. in tinkercad import svg, set depth - to say 1mm, export as stl, which can be embedded to another objects in another programs
4 another option is to use PrusaSlicer to apply SVG directly https://help.prusa3d.com/article/svg-embossing-tool_686167

See my GitHub and printables.com for some 3d stuff that you may like.

Posted : 07/05/2025 8:07 pm
Diem
 Diem
(@diem)
Illustrious Member

If you are using OpenSCAD the surface command will do the job.

Cheerio,

Posted : 07/05/2025 8:22 pm
eager
(@eager)
Trusted Member
Topic starter answered:
RE: Embed QR Code into a 3D Print

Thank you all! I'm digesting your suggestions. I would be getting the QR code in jpg or png ans was surprised  I can't export that to SVG in GIMP.

I downloaded Imkscape long ago and it's on my bucket list to learn.

Off hand, has anyone used Inkscape to convert a jpg/PNG to SVG?

Thank you again so much.

 

 

 

Posted : 07/05/2025 9:42 pm
JP Guitars
(@jp-guitars)
Reputable Member
RE: Embed QR Code into a 3D Print

 

Posted by: @eager

Off hand, has anyone used Inkscape to convert a jpg/PNG to SVG?

Yes, done it multiple times. It's easy enough, just use Path => Trace bit map.

Thing you need to watch is it will leave the jpg in place as well as the vector so you need to delete it so you just have the vector. If you don't Prusa slicer will either not import it or not allow y9u to use it.

Posted : 07/05/2025 9:54 pm
Chris Hill
(@chris-hill)
Reputable Member
RE: Embed QR Code into a 3D Print

You could always cheat and use an online QR Code to STL generator 🤣 

https://printer.tools/qrcode2stl/

Posted : 07/05/2025 10:44 pm
Chris Hill
(@chris-hill)
Reputable Member
RE: Embed QR Code into a 3D Print

Actually, this one seems to have more features.

Posted : 08/05/2025 7:23 am
LarGriff liked
eager
(@eager)
Trusted Member
Topic starter answered:
RE: Embed QR Code into a 3D Print

1st - Thank you all as I'm learning a ton on the run thanks to you all!

So the original QRC is in png so I imported that into Inkscape and exported as a .svg (thank you for teaching me that alone!)

I then created the square - 100 mm x 4 inches x 2 mm thick and saved that as a .stl file.

I then opened the latest Prusa Slicer and imported that square (.stl) but when I tried to import or drag over that .svg (created in Inkscape) I got the error message attached.

So... I'm kind of stuck.

Thank you!

 

 

 

Posted : 10/05/2025 1:19 pm
JP Guitars
(@jp-guitars)
Reputable Member
RE: Embed QR Code into a 3D Print

That looks like the problem I warned you about that you get if you do not delete the png image from the inkscape file. In my experience it is all too easy to delete the newly created vector rather than the image it was derived from.

Posted : 10/05/2025 2:07 pm
_KaszpiR_
(@_kaszpir_)
Prominent Member
RE:

that's why I suggested potrace. If you have a linux and installed imagemagick package (sudo apt-get install -y imagemagick potrace)
and your logo is in source_file.png with a transparency (alpha channel), then below commands will generate intermediate BMP file and svg from it named source_file.svg

convert source_file.png -background white -alpha remove -alpha off source_file.bmp
potrace source_file.bmp -b svg -o source_file.svg

then use source_file.svg in the PrusaSlicer.

Of course adjust commands params as needed.

See my GitHub and printables.com for some 3d stuff that you may like.

Posted : 10/05/2025 2:51 pm
eager
(@eager)
Trusted Member
Topic starter answered:
RE: Embed QR Code into a 3D Print

JP - This is my 1st time using Inkscape so all I did (apparently incorrectly) was import the QRC.png into Inkscapce then chose Path > Bit Item and then chose Export as .svg.

I'm unsure how to delete the .png file and at which point I do that (before/after?) I export that "converted PNG into an 'svg file"?

Thank you.

Posted : 10/05/2025 3:07 pm
eager
(@eager)
Trusted Member
Topic starter answered:
RE: Embed QR Code into a 3D Print

Hi Kas.... I don't have linux and only used Mint for a couple of days (which I liked).

Do yo know of anyone who has created a guide to transition into Linux for Windoze users?

I'm not a Windows fan but must use it at work. It seems daunting transitioning and accomplishing the many tasks we do in Windows in Linux as like most other software the verbs, nouns and even adjective don't migrate form the one to the other.

Little off track as for now I'm just trying to create the svg in Windows to import into the Prusa Slicer.

I know the Cricut machines use software where files are created and modified in .svg.

Perhaps, I can try importung the QRC.png into the Cricut software and export an .svg that way?

Thank you.

 

 

Posted : 10/05/2025 3:16 pm
JP Guitars
(@jp-guitars)
Reputable Member
RE: Embed QR Code into a 3D Print

After you've traced to bit map, grap the image and move it sideways, you will see another copy of the image underneath. One image is the bitmap the other is the vector. You need to remove the bitmap. Unfortunately I cannot remember which is which and don't have access to a PC at the moment. But as there are only two options trial and error is not going to be too bad.

Posted : 10/05/2025 3:39 pm
Diem
 Diem
(@diem)
Illustrious Member
RE: Embed QR Code into a 3D Print

Using OpenSCAD:

(You may not need invert depending on how you wish to colour the output, it makes black the highest part and white the lowest)

side=100;
depth=2;

resize([side,side,depth]){
  surface(file = "/path/to/qrcode.png", invert = true);
}  

Render (button) and export as STL or SVG as required.

Cheerio,

Posted : 10/05/2025 4:30 pm
eager
(@eager)
Trusted Member
Topic starter answered:
RE: Embed QR Code into a 3D Print

Diem.... Thank you for sharing that. I've used OpenScad once and that was to convert a scad file to stl.

When I open Openscad and choose Open to find the QRC.png it only says it's loooing ofr scad files.

So, I dragged the QRC.png into AutoScad and the attached is what I see. 

Not sure what I do next?

Thank you so much.

 

Posted : 10/05/2025 9:35 pm
Diem
 Diem
(@diem)
Illustrious Member

You need to tell OpenSCAD to render the one-line-script you have generated:  F6, or the second button in the view pane, or button at top, or the design menu - this runs your script.  Once run you can export the result - STL button at top or any of the formats in the File > Export menu.

But I doubt your single line will give you a useful result, it will be far too blocky.

You have effectively auto-generated the "/path/to/qrcode.png" part of my mini-script above, copy and paste in the other lines and you should have control of the dimensions.

Cheerio,

Posted : 10/05/2025 11:12 pm
eager
(@eager)
Trusted Member
Topic starter answered:
RE: Embed QR Code into a 3D Print

Diem... It seems like you have a good grasp on OpenScad and 3D modeling.

But, to a novice this appears beyond my skill set in printing simpler projects in Tinkercad.

I do appreciate you sharing your knowledge but in also educating me that this is not a simple project at this time.

Thank you!

 

 

Posted : 11/05/2025 5:42 pm
Diem
 Diem
(@diem)
Illustrious Member

Copy and paste my five line script above into OpenSCAD's editor.

Delete the file-path in quotes and copy and paste the file-path in quotes from your one line script into its place.

Render.

Export an STL as above.

Open TinkerCAD

Click the “Import” button in the top right corner. You can then drag and drop your new STL file into the window; and from there, it's over to you.

Cheerio,

 

Posted : 11/05/2025 6:35 pm
Share: