• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
QR code generator - 2D barcode 3D Printer File Image 1
QR code generator - 2D barcode 3D Printer File Image 2
QR code generator - 2D barcode 3D Printer File Thumbnail 1
QR code generator - 2D barcode 3D Printer File Thumbnail 2

QR code generator - 2D barcode

GrayLite avatarGrayLite

September 1, 2025

makerworld-icon
DescriptionCommentsTags

Description

🧩 Parametric QR Code Generator (OpenSCAD)

Create 3D-printable QR codes directly in OpenSCAD. Type your text/URL, pick error-correction, set size and thickness, and (optionally) add a solid background plate (β€œquiet zone”) for reliable scanning.

This project uses the excellent scadqr library by Darwin Schuppan (MIT). It renders true QR modules (squares), auto-sizes the grid for your content, and supports UTF-8 text.

πŸš€ Quick Start

  1. INPUT_TEXT β†’ type what you want to encode (e.g., https://example.com).
  2. SIZE β†’ final QR size in mm (module size scales with it).
  3. CODE_EXTRUDE β†’ thickness of the black QR squares.
  4. Optional: SHOW_GRID_FILL + FILL_EXTRUDE + QUIET_ZONE for a solid backing plate.
  5. Render, export STL, print with strong contrast (dark QR on light background), and test with a phone.

Tip: Colors here are preview-only; STL exports are colorless. Use filament swap or multi-material for two colors.

πŸ”§ Parameters

Main

  • INPUT_TEXT β€” What the QR encodes (text/URL/anything UTF-8).
  • ERROR_CORRECTION β€” "L" (~7%), "M" (~15%), "Q" (~25%), "H" (~30%).
    Higher = more robust to damage/overhangs, but uses a denser grid.

Pattern & Rendering

  • MASK β€” 0–7. Different QR mask patterns. Leave at 0 unless a scanner struggles; try other values.
  • SHOW_GRID_FILL β€” true/false. Adds a flat backing plate (recommended for small QRs).

Style (Preview only)

  • CODE_COLOR β€” color of QR modules in preview.
  • FILL_COLOR β€” color of backing plate in preview.

Thickness

  • CODE_EXTRUDE β€” QR module height (mm). 0.6–1.2 mm works well for FDM.
  • FILL_EXTRUDE β€” backing plate thickness (mm) when enabled.

Dimensions

  • SIZE β€” overall QR width/height (mm), excluding quiet zone.
  • QUIET_ZONE β€” margin (mm) added around all sides of the QR when the fill is shown.
    Effective plate size = SIZE + 2*QUIET_ZONE.

πŸ–¨οΈ Printing Tips

  • Contrast is king. Dark modules on a light plate (or vice versa). Matte materials scan best.
  • First-layer quality matters most. Slow down and ensure good bed adhesion.
  • Module thickness (CODE_EXTRUDE):
    • Single color: 0.6–1.2 mm is usually enough to be visible.
    • Two colors: pause/filament swap at Z = FILL_EXTRUDE to print modules in a second color.
  • Size: For typical phone scanners, 40–60 mm with "M" or "Q" correction is a sweet spot. Long URLs may need larger SIZE or lower error correction.

πŸ§ͺ Validation

Always scan the rendered (or printed) QR with your phone before use. If scanning fails:

  • Increase SIZE or CODE_EXTRUDE.
  • Try higher ERROR_CORRECTION.
  • Enable SHOW_GRID_FILL with a larger QUIET_ZONE (4–6 mm total is common).
  • Try a different MASK value (0–7).

You can swap the CreateQR(INPUT_TEXT); call with these helpers’ outputs to encode richer data.

βš™οΈ What’s happening under the hood

  • The code picks a QR version/size based on your content & error level.
  • MASK selects one of 8 standard mask patterns.
  • Modules are drawn as unit squares, scaled to SIZE, then extruded by CODE_EXTRUDE.
  • When SHOW_GRID_FILL is true, a centered square plate (with QUIET_ZONE) is extruded below the code to improve scan reliability and make filament swaps easy.

βœ… Recommended Presets

  • Link/URL (general use):
    SIZE=50 β€’ ERROR_CORRECTION="M" β€’ CODE_EXTRUDE=0.8 β€’ SHOW_GRID_FILL=true β€’ FILL_EXTRUDE=1 β€’ QUIET_ZONE=2
  • Harsh handling / outdoor:
    ERROR_CORRECTION="Q" or "H" β€’ increase SIZE by 10–20 mm

License:

BY-NC-SA

Related Models

Christmas Reindeer kit card preview image

Christmas Reindeer kit card

tone001 profile image

tone001

21,186

Cat Bathroom Sign - Are you pooping? preview image

Cat Bathroom Sign - Are you pooping?

LabLab profile image

LabLab

2,311

Disney Font Customizable Tag  preview image

Disney Font Customizable Tag

Canale profile image

Canale

2,287

Lion Wall Sculpture 2D preview image

Lion Wall Sculpture 2D

UnpredictableLab profile image

UnpredictableLab

9,230

The Great Wave [Framed] - Bookmark preview image

The Great Wave [Framed] - Bookmark

C3D profile image

C3D

1,883

Puffer Letters | Full A-Z Set (Capital Only) preview image

Puffer Letters | Full A-Z Set (Capital Only)

A_ilterish profile image

A_ilterish

4,801

Tri Fidget Spinner Toy preview image

Tri Fidget Spinner Toy

2ROBOTGUY profile image

2ROBOTGUY

8,638

+100 World famous logos (+DXF) preview image

+100 World famous logos (+DXF)

Referentiel profile image

Referentiel

2,278