This repo contains a Rhino plugin to host Fesh. Fesh is an F# scripting editor based on AvalonEdit for Windows. The editor supports the latest features of F# 8.0 via Fsharp Compiler Service. It has semantic syntax highlighting, auto completion and type info tooltips. The output window supports colored text.
Until RhinoCommon is targeted properly for .NET 7 this plugin only supports .NET Framework 4.8 . In Rhino use the command SetDotNetRuntime to switch between .NET Framework and .NET Core.
The example script LouvreAbuDhabi.fsx in the root folder generates the axes for cladding of the Louvre Abu Dhabi. As shown in my talk at FSharpConf 2016:
After downloading from Releases or compiling via dotnet build
.
Drag and drop the file Fesh.rhp
into Rhino.
Then launch the editor with the command Fesh
.
You will always need to add a reference to RhinoCommon.dll
#r "C:/Program Files/Rhino 8/System/RhinoCommon.dll" // or where ever you have it
If you are used to doing Rhino Scripting with Python I recommend using the Rhino.Scripting nuget package to have the same 900 functions available.
#r "C:/Program Files/Rhino 8/System/RhinoCommon.dll"
#r "nuget:Rhino.Scripting.Fsharp, 0.8.1"
open System
open Rhino.Scripting
open Rhino.Scripting.Fsharp //recommended for F#
open FsEx // part of Rhino.Scripting
type rs = RhinoScriptSyntax
// use the rs object to call RhinoScript functions like in python
let crv = rs.GetObject("Select a curve", rs.Filter.Curve)
Run your script by presssing F5
key.
Like in Visual Studio you can also just evaluate the selected text by pressing Alt
+ Enter
keys.
See the FSI
menu for more options.