Rhino.Inside for Rhino 8, and WIP

Rhino.Inside

Rhino.Inside NuGet library has been updated to load Rhino 8 and Rhino WIP under net48 or netcore:

  • Currently it only works on Windows only.

  • As of now, Rhino.Inside supports:

    • net48 for Rhino 7 just like before. No API changes there.
    • net48, net7.0-windows and net8.0-windows for Rhino 8 with (Rhino.Inside v8)
    • net48, net9.0-windows for Rhino WIP (Rhino.Inside v9)
  • See SampleConvert example to see how to use Rhino.Inside NuGet library

rhinoinside

Newer versions of this library are included in the rhinoinside python package as well.

This is an example of loading Rhino inside of a python process:

import rhinoinside
rhinoinside.load()    # this will load rhino 7 on dotnet framework (net48)
import System
import Rhino

# for now, you need to explicitly use floating point
# numbers in Point3d constructor
pts = System.Collections.Generic.List[Rhino.Geometry.Point3d]()
pts.Add(Rhino.Geometry.Point3d(0.0,0.0,0.0))
pts.Add(Rhino.Geometry.Point3d(1.0,0.0,0.0))
pts.Add(Rhino.Geometry.Point3d(1.5,2.0,0.0))

crv = Rhino.Geometry.Curve.CreateInterpolatedCurve(pts,3)
print (crv.GetLength())

You can also choose which specific Rhino installation and runtime to load:

# Loading Rhino 7
rhinoinside.load(7) # defaults to net48
rhinoinside.load(7, 'net48')
rhinoinside.load(r"C:\Program Files\Rhino 7\System") # defaults to net48
rhinoinside.load(r"C:\Program Files\Rhino 7\System", 'net48')

# Loading Rhino 8
rhinoinside.load(8) # defaults to net48
rhinoinside.load(8, 'net48')
rhinoinside.load(8, 'net7.0')
rhinoinside.load(8, 'net8.0')
rhinoinside.load(r"C:\Program Files\Rhino 8\System") # defaults to net48
rhinoinside.load(r"C:\Program Files\Rhino 8\System", 'net48')
rhinoinside.load(r"C:\Program Files\Rhino 8\System", 'net7.0')
rhinoinside.load(r"C:\Program Files\Rhino 8\System", 'net8.0')

# Loading Rhino 9
rhinoinside.load(9) # defaults to net48
rhinoinside.load(9, 'net48')
rhinoinside.load(9, 'net9.0')
rhinoinside.load(r"C:\Program Files\Rhino 9 WIP\System") # defaults to net48
rhinoinside.load(r"C:\Program Files\Rhino 9 WIP\System", 'net48')
rhinoinside.load(r"C:\Program Files\Rhino 9 WIP\System", 'net9.0')

Rhino.Testing

Rhino.Testing NuGet library is also updated to use Rhino.Inside and load Rhino 8 and WIP for testing

3 Likes

Update
rhinoinside module that was published (v0.8.0 and v0.8.1) had bad RhinoInside dotnet assemblies so I yanked those versions from PyPI and published a fixed package with version v0.8.2

2 Likes