尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗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.
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()
For example in the Rhino 8 script editor:
#r "nuget: Rhino.Scripting.QrCode"
using Rhino;
using Rhino.Scripting;
var mesh = QrCode.asMesh("https://www.rhino3d.com");
RhinoDoc.ActiveDoc.Objects.AddMesh(mesh);
RhinoDoc.ActiveDoc.Views.Redraw();
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:
Reference the dll in IronPython:
import clr
clr.AddReferenceToFileAndPath(r"C:\path\to\bin\Release\net48\Rhino.Scripting.QrCode.dll")
import Rhino
from Rhino.Scripting import QrCode
mesh = QrCode.asMesh("https://www.rhino3d.com")
Rhino.RhinoDoc.ActiveDoc.Objects.AddMesh(mesh)
Rhino.RhinoDoc.ActiveDoc.Views.Redraw()
goswinr.github.io/Rhino.Scripting.QrCode
There are other QR code tools for Rhino that create images instead of geometry, see discourse.mcneel.com.
Contributions are welcome even for small things like typos. If you have problems with this library please submit an issue.
see CHANGELOG.md