
Rhino.Scripting.QrCode
Rhino.Scripting.QrCode is a small library for creating QR codes as Rhino3D Meshes or Hatches.
It uses ZXing.Net to encode the text.
The QR code is vector geometry, not an image, so it stays sharp at any size.
It works in Rhino 8 and later, from F#, C# and IronPython.
The QR code is created at the World Origin with a size of 1.0 x 1.0 units, using the high error correction level (30%).
Text with non-ASCII characters is encoded as UTF-8.
Use in F#
For example in the Fesh.Rhino scripting editor:
#r "nuget: Rhino.Scripting.QrCode"
open Rhino
open Rhino.Geometry
open Rhino.Scripting
let doc = RhinoDoc.ActiveDoc
// as a Mesh, scaled to 50 units
let mesh = QrCode.asMesh "https://www.rhino3d.com"
mesh.Transform(Transform.Scale(Point3d.Origin, 50.0)) |> ignore
doc.Objects.AddMesh(mesh) |> ignore
// as Hatches, using the 'Solid' hatch pattern of the active document
for hatch in QrCode.asHatches "https://www.rhino3d.com" do
doc.Objects.AddHatch(hatch) |> ignore
doc.Views.Redraw()
Use in C#
For example in the Rhino 8 script editor:
|
Use in Python
1) Get the files Rhino.Scripting.QrCode.dll, zxing.dll and FSharp.Core.dll into one folder.
Run dotnet build on this repository, then they are all in bin/Release/net48.
If you download dll files instead, you might need to unblock them first:

2) Reference the dll in IronPython:
|
Full API Documentation
goswinr.github.io/Rhino.Scripting.QrCode
Alternatives
There are other QR code tools for Rhino that create images instead of geometry,
see discourse.mcneel.com.
Contributing
Contributions are welcome even for small things like typos. If you have problems with this library please submit an issue.
License
Changelog
see CHANGELOG.md
<summary> This module provides functions to create QR codes as Rhino Meshes or Hatches. </summary>
Rhino.Scripting.QrCode