Euclid 0.6.1

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package Euclid --version 0.6.1
NuGet\Install-Package Euclid -Version 0.6.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Euclid" Version="0.6.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Euclid --version 0.6.1
#r "nuget: Euclid, 0.6.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Euclid as a Cake Addin
#addin nuget:?package=Euclid&version=0.6.1

// Install Euclid as a Cake Tool
#tool nuget:?package=Euclid&version=0.6.1

Euclid

code size

Logo

Euclid is a 2D and 3D geometry library without dependencies. It is mostly focused on creating and manipulating primitives such as points, vectors, lines, planes, boxes, and bounding boxes, and polylines. For transformations of those there are rotations, quaternions, 4x4 and rigid ortho normal 4x3 matrices.

Written in F# and designed for use with F#. All primitive types are immutable and functions are curried where appropriate. This library is intended to be used for design, construction and manufacturing too. So it is using double precision floating point numbers for all values. (While most geometry libraries for games use single precision floats.)

This library can be used in JavaScript via Fable too.

See Euclid.Rhino for converting form and to Rhino3D geometry.

Documentation

This library assumes a right handed coordinate system with the Z-axis pointing up. Just like Rhino3D, SketchUp, Revit, AutoCAD and Blender have it. But unlike Unity or Unreal Engine.

In this library a point is a position in space, a vector is a direction in space. A 4x4 transformation matrix applied to a vector will only rotate and scale the vector but not translate it. ( = Homogeneous coordinates)

For the full API see fuget.org for now.

License

MIT

Build

Just run dotnet build in the root directory.

Test

To just run once: dotnet run Tests\Euclid.Tests.fsproj To run and watch the tests use: dotnet watch --project Tests\Euclid.Tests.fsproj run

Release Notes

0.6.1

  • remove reflection form error messages for nicer Fable output
  • rename Rect.Rotate to Rect.RotateOrientation
  • add Rect.grid
  • fix Rect.subdivide

0.5.0

  • allow equality checks to use zero tolerance.
  • better docstring
  • add more angle calculation functions
  • rename distanceFromPoint to distanceToPt
  • add rotateByQuarterCircle
  • add ExtendRel functions for Lines
  • use *** as operator for dot product, and matrix multiplication
  • add splitting with gap to Lines and Rects

0.4.1

  • fix bug in rect.Edge23
  • add BBox.createFromIList

0.4.0

  • add Line.withLengthFromMid
  • rename isAngleLessThan functions
  • add spherical interpolation (slerp) for vectors
  • rename Length to Width on Boxes and Rects
  • rename Width to Height2D on Rects
  • rename Width to Depth on Boxes
  • add EdgeMethods on Rects and Boxes

0.3.0

  • renamed OrthoMatrix to RigidMatrix
  • add DataMember Attributes for serialization
  • ofXZY functions renamed to createFromMembersXYZ
  • add DivideByInt static members for Array.average and Array.sum for functions
  • fixed typos, improve documentation

0.2.1

  • fix fable support

0.2.0

  • fable support
  • improved xml documentation

0.1.0

  • first public release
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Euclid:

Package Downloads
Euclid.Rhino The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Utilities to use types from Euclid in Rhino3d

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.6.1 127 2/17/2024
0.6.1-a 65 2/13/2024
0.5.0 125 1/6/2024
0.4.1 107 12/2/2023
0.4.0 88 11/28/2023
0.3.0 108 10/22/2023
0.2.1 241 2/26/2023
0.2.0 269 2/4/2023
0.1.0 254 1/21/2023
0.0.0 312 11/2/2022

- remove reflection form error messages for nicer Fable output
     - rename Rect.Rotate to Rect.RotateOrientation
     - add Rect.grid
     - fix Rect.subdivide