Skip to content

goswinr/Rhino.Scripting.Fsharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rhino.Scripting.Fsharp

Rhino.Scripting.Fsharp on nuget.org Rhino.Scripting.Fsharp on fuget.org code size license

logo

What is Rhino.Scripting.Fsharp?

Rhino.Scripting.Fsharp is a set of useful extensions to the Rhino.Scripting library. This includes type extension for pretty printing of Rhino objects as well as implementations of commonly used functions in curried form for use with F#.

This library allows you to compose RhinoScript functions with pipelines:

Get started by opening the Rhino.Scripting namespaces:

open Rhino.Scripting
open Rhino.Scripting.Fsharp // opening this will extend RhinoScriptSyntax and some Rhino.Geometry types with additional static and member functions.
type rs = RhinoScriptSyntax
rs.AddPoint( 1. , 2.,  3.)
|>! rs.setLayer "my points"
|>! rs.setUserText "id" "point123"
|>  rs.setName "123"

instead of

let guid = rs.AddPoint( 1. , 2.,  3.)
rs.ObjectLayer (guid, "my points")
rs.SetUserText (guid, "id", "point123")
rs.ObjectName (guid, "123")

The |>! operator is part of Rhino.Scripting via the FsEx library. It passes it's input on as output. See definition.

License

MIT

Change Log

0.8.1

  • align Plane API with Euclid library

0.8.0

  • align Line, Point3d and Vector3d API with Euclid library
  • referencing Rhino.Scripting 0.8.0

0.5.0

  • first public release
  • referencing Rhino.Scripting 0.5.0