Skip to main content
.NETFramework4.8net8.0

Utilities to use types from Euclid in Rhino3d

Published
Jun 13, 2026
4mo ago
Total Downloads
3.8K
3,814

Install

dotnet add package Euclid.Rhino --version 0.40.0
ProductVersions
.NET
net8.0
Other
.NETFramework4.8

README

Logo

Euclid.Rhino

Euclid.Rhino on nuget.org Build Status Docs Build Status

license code size

This package is for using the Euclid geometry library in Rhino3D.
It provides extension members for drawing Euclid geometry in Rhino.
And for converting Rhino geometry to Euclid geometry. And vice versa.
The version number of Euclid.Rhino is aligned with the referenced version of Euclid.

How to use

After referencing the package Euclid.Rhino in your project or F# script
just open the Euclid namespace:

open Euclid

This will auto-open the module AutoOpenRhinoIntegration
You will get access to all the extension methods for Rhino integration.

See goswinr.github.io/Euclid.Rhino for the full documentation.
For the main functions you can also look at main.fs .

Sample Code

Type Conversions

open Euclid
open Rhino.Geometry

// Rhino → Euclid (via extension properties)
let rhinoPoint = Point3d(1.0, 2.0, 3.0)
let euclidPnt : Pnt = rhinoPoint.Pnt       // 3D point
let euclidPt  : Pt  = rhinoPoint.Pt        // 2D point (Z ignored)

let rhinoVec = Vector3d(1.0, 0.0, 0.0)
let euclidVec : Vec = rhinoVec.Vec         // 3D vector
let euclidVc  : Vc  = rhinoVec.Vc          // 2D vector (Z ignored)

// Euclid → Rhino (via .Rh* properties)
let pnt = Pnt(1.0, 2.0, 3.0)
let rhPoint : Point3d = pnt.RhPt

let vec = Vec(1.0, 0.0, 0.0)
let rhVec : Vector3d = vec.RhVec

let line = Line3D(Pnt.Origin, Pnt(10.0, 5.0, 0.0))
let rhLine : Line = line.RhLine

Drawing in Rhino

open Euclid

// Draw on current layer
let pt = Pnt(5.0, 10.0, 0.0)
pt.Draw()

// Draw on a specific layer (auto-created if missing)
pt.Draw("MyLayer")

// Draw with layer and object name
pt.Draw("MyLayer", "object name xyz")

// Draw with labeled dot
pt.DrawDot("Start")

// Functional style for piping
let points = [Pnt(0,0,0); Pnt(1,0,0); Pnt(1,1,0)]
points |> List.iter Pnt.draw

// Draw lines and polylines
let ln = Line3D(Pnt.Origin, Pnt(10.0, 10.0, 0.0))
ln.Draw("layer name")

let poly = Polyline3D.create points
poly.Draw("layer name", "Object Name")

Changelog

see CHANGELOG.md

Build from source

Just run dotnet build in the root directory.

Use of AI and LLMs

All core function are are written by hand to ensure performance and correctness.
However, AI tools have been used for code review, typo and grammar checking in documentation
and to generate not all but many of the tests.

License

MIT

Changes from Previous Version

No structural changes between v0.30.1 and v0.40.0.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.