Sometimes you just want to 3D print a QR code.

Blender has an import feature to convert *.svg to a Curve (or many of them), which you can convert into a mesh, but with the problem of the result being not manifold.

I circumvented this problem by finding an website that creates the SVG with each pixel being a separte curve, which I convert and extrude separately with a script, because I am a very lazy person. (Of course you can do all this by hand, but that’s your time you are wasting! Learn coding πŸ˜€)

# get the svg from https://qrd.by/qr-code-generator-svg
# download the zip and import the svg, and run this script (maybe it helps to delete all objects first)
# resize

import bpy

bpy.ops.object.select_all(action='DESELECT')
bpy.ops.object.select_all(action='TOGGLE')
bpy.ops.transform.resize(value=(800, 800, 800), constraint_axis=(False, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
bpy.ops.object.select_all(action='DESELECT')

for obj in bpy.context.scene.objects:
    if obj.type == 'CURVE' and obj.name != "Curve":
        bpy.context.scene.objects.active = None
        bpy.context.scene.objects.active = obj
        obj.select = True
        bpy.ops.object.convert(target='MESH')
        bpy.ops.object.modifier_add(type='SOLIDIFY')
        bpy.context.object.modifiers["Solidify"].thickness = 0.002

bpy.ops.object.select_all(action='DESELECT')
for obj in bpy.context.scene.objects:
    if obj.name == "Curve":
        bpy.context.scene.objects.active = None
        bpy.context.scene.objects.active = obj
        obj.select = True
        bpy.ops.object.convert(target='MESH')
        bpy.ops.object.modifier_add(type='SOLIDIFY')
        bpy.context.object.modifiers["Solidify"].thickness = 0.001
        bpy.ops.transform.translate(value=(0, 0, -1), constraint_axis=(False, False, True), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)