McNeel Wiki
Rhino 4.0 .NET Framework SDK
edit · print · help · all topics
Main Pages

AccuRender

Bongo

Brazil r/s

Developer

Flamingo

Penguin

Rhino Blogs

Rhino

Rhino Labs

Search

Languages

Česky

Deutsch

English

Español

Français

Italiano

Polish

日本語

한국어

中文(繁體)

中文(简体)

 
.

Rhino 4.0 .NET Framework Plug-In Development

(Rhino 3.0 .NET plug-in development pages can be found here)

Rhino 4.0 ships with the necessary components to enable Rhino.NET plug-ins on users computers. Rhino4.NET plug-ins can be created with a compiler that compiles assemblies using .NET 2.0, including:

  • C# 2008 (including Express) - be sure to target .NET 2.0
  • VB.NET 2008 (including Express) - be sure to target .NET 2.0
  • C# 2005
  • VB.NET 2005
  • SharpDevelop 2.0

Older versions of VB.NET and C# (ie 2001 and 2003) will not work

Rhino 4.0 NET plug-ins are treated as "first-class" plug-ins in Rhino and are installed through the Plug-In Manager command (the Rhino 3.0 DotNetManager command no longer exists)

Downloads

What is .NET?

The term .NET can be confusing because it is used in several different contexts. With respect to Rhino, we are talking about the Microsoft .NET framework. This is a programming model that exposes Windows and its related services through an object oriented interface. The model is language neutral i.e any programming language that compiles to .NET intermediate language can use the .NET framework. Complete information on .NET is at: http://www.microsoft.com/net/

What is the Rhino.NET SDK?

Rhino.Net SDK helps developers to extend Rhino's functionality using 'Rhino plug-ins'. The Rhino.NET SDK provides the tools to develop Rhino plug-ins using a .NET programming language. This means that Rhino plug-ins can now be developed using VB.NET, C#, C++.NET, Delphi.NET (and the list goes on).

The Rhino.NET SDK is actually a wrapper around the Rhino C++ SDK. Most of the classes and methods provided by the C++ SDK are available through .NET.

Where is the Rhino.NET SDK?

The Rhino.NET SDK is composed of a rhino plug-in named RhinoDotNetManager.rhp and an assembly named Rhino_DotNET.dll located in the Rhino system directory. The Rhino_DotNET.dll assembly is what all Rhino.NET plug-ins reference to get exported classes and functions from Rhino. These files are installed with Rhino and are not a separate download.

What can I do with the Rhino.NET SDK?

The Rhino.NET SDK is designed to allow .NET developers to create Rhino plug-ins with the same capabilities as C++ developers.

Learning Resources

VB.NET School - Covers all you need to know to start programming in VB.NET.

C# School - Covers all you need to know to start programming in C#.

Questions

Post questions or read other people's questions/answers on the plug-ins newsgroup

Some of your questions may be answered by the DotNET Essentials page

Rhino.NET Articles

Create Surfaces From Corner Points Demonstrates how to creates a surface from specified corner points.
Mesh Types Discusses the types of meshes found in Rhino.
Passing Arrays from .NET to RhinoScript Demonstrates how to pass arrays of data from .NET to RhinoScript.
Projecting Points to Breps Demonstrates how to project points onto Brep objects.
Another Approach to Picking Objects Demonstrates how to pick objects without using CRhinoGetObject.
Adding command line options Demonstrates how to add a different type of command line options to a custom command.
Adding Textures to Objects Demonstrates how to add a texture bitmap to an object.
Hatching Boundaries Demonstrates how to hatch a closed planar boundary using the Rhino SDK.
DisplayConduit Introduction A How-To introduction to writing display conduits
Loading failure of DotNET plugins What to do when DotNET plugins fail to load.
Dealing with commas and periods Demonstrates how to consistently read/write numbers to strings.
Obtaining the Insertion Point of a Block Demonstrates how to obtain the insertion point of a block.
Adjusting Surface Isocurve Density Demonstrates how to modify the isocurve density of a surface.
Sorting 3-D Points How to sort 3-D points in a .NET plug-in.
How To: Add a Mesh Object to Rhino Demonstrates how to add a simple mesh object to Rhino.
How To: Sweeping Surfaces using RhinoSweep2 Demonstrates how perform a two-rail sweep using the RhinoSweep2 SDK function.
How To: Sweeping Surfaces using RhinoSweep1 Demonstrates how perform a one-rail sweep using the RhinoSweep1 SDK function.
How To: Add a Line Curve Object Demonstrates how to add a line curve to Rhino using the Rhino SDK.
Determine the Maximum Z Coordinate Value of a Surface Demonstrates how determine the maximum Z coordinate of a surface using the Rhino SDK.
Using Express Editions of VB.NET and C# How to build and debug Rhino.NET plug-ins for Rhino4 with the free express editions of Microsoft VB.NET 2005 and C# 2005
How To: Divide a Curve by Segments Demonstrates how to divide a curve object by a specified number of segments.
How To: Modify an Object's Name Demonstrates how to modify an object's user-defined name.
Showing Dynamic Object Transformations Demonstrates how to show objects transformating dynamically.
How To: Add a New Layer Demonstrates how to add a new layer to Rhino.
How To: Determine Rhino's Language Setting How to determine Rhino's current language setting when developing localized plug-ins.
How To: Add a Custom Menu to Rhino How to add a custom popup menu to Rhino's main menu from a Rhino plug-in.
RegionSelect An example of a VB.NET plugin with some nice advanced stuff in it.
Creating NURBS Surfaces Demonstrates how to create a NURBS surface using the Rhino SDK.
How to extend RhinoScript with a .NET plug-in Rhino 4.0 plug-ins can now add new scripting methods to RhinoScript.
Passing data from a .NET plug-in to RhinoScript Demonstrates how to pass different data types from .NET to RhinoScript.
Calculate the angle between two vectors Demonstrates how to calculate the angle between two 3-D vectors using the Rhino SDK.
How To: Get and Set the Active View Demonstrates how to get and set the active view using the Rhino SDK.
Info: Registering Plug-ins Step-by-step instructions for registering your plug-in.
How To: Modify a Light's Color How to modify the diffuse color of an exising CRhinoLight object.
Rhino 3.0 .NET Framework SDK Plug-In developer support for the .NET Framework SDK and Rhino 3.0
Simple VB.NET Plug-In How to create a basic Rhino plug-in with VB.NET. Discusses each of the major components that go into creating a plug-in.
How To: Create a NURBS Curve from Control Points Demonstrates two ways to create clamped ON_NurbsCurve from a set of control points.
Creating Radial Dimensions Demonstrates how to create radial dimensions using the Rhino SDK.
Creating Aligned Dimensions Demonstrates how to create linear dimensions lined up with two points using the Rhino SDK.
Info: Defining New Plug-in Commands How to add new command classes to Rhino plug-ins.
Shading Viewports Demonstrates how to set a viewport to shaded display using the Rhino SDK.
How To: Create a Custom CRhinoGetObject Class Demonstrates how to derive a class from CRhinoGetObject to handle special case object picking.
Setting a Viewport's Title Demonstrates how to set the title of a viewport using the Rhino 4.0 SDK.
Calculating the Volumes of Solid Objects Demonstrates how to calculating the volumes of closed surface, polysurface, and mesh objects using the Rhino 4.0 SDK.
Calculating the Volume Centroid of Solid Objects Demonstrates how to calculating the volume centroid of closed surface and polysurface objects using Rhino 4 SDK.
Identifying Curve Shapes Demonstrates how to identify curve shapes using the Rhino 4.0 SDK.
How to: Document Data commands in a Rhino.NET plug-in. Demonstrates how to use RhinoScript's Document Data commands inside a Rhino.NET plug-in.
Bounding Box of a Curve Object Demonstrates how to calculate the bounding box of a curve object.
How To: Synchronize a Layer's Rendering Color Demonstrates how to synchronize the basic material color of a layer with the layer's color.
How To: Create a NURBS Circle Demonstrates how to use ON_NurbsCurve to create a circle.
How To: Insert a Block Demonstrates how to insert a block instance at a user specified location.
How To: Divide a Curve by Length Demonstrates how to divide a curve object by a specified length.
Split a set of BReps with a plane Demonstrates how to make a command that splits a bunch of BReps with a plane.
Divide a curve using equi-distance points. A small plugin + source code for equi-distance curve division.
How To: Run a Rhino Command from a Plug-in Command Discusses the proper techniques to use when running Rhino command from within the context of a plug-in command.
Creating Sublayers Demonstrates how to create sublayers using the Rhino SDK.
Replacing a Hatch Object's Pattern Demonstrates how to replace a Hatch Object's pattern using the Rhino SDK.
Selecting Objects that are in a Group Demonstrates how to select all of the objects that are members of an object group.
Moving Point Objects Demonstrates how to move point objects using the Rhino .NET SDK
Extracting Isoparametric Curves from Surfaces Demonstrates how to extract isoparametric curves from surfaces using the Rhino SDK.
Reversing the Direction of Curves Demonstrates how to reverse the direction of curves using the Rhino SDK.
How To: Iterate through Rhino's Geometry Table. Demonstrates how to use the CRhinoObjectIterator class to iterate through the document.
How To: Pre-Pick and Post-Pick Objects Demonstrates how to both pre-pick and post-pick objects using a single CRhinoGetObject object.
How To: Pick Point Objects Demonstrates how to use CRhinoGetObject to pick point objects.
Reading/Writing plug-in user data to a Rhino .3dm file Demonstrates how to save a restore document data
How To: Dynamically Draw Geometry when Picking Points Demonstrates how to derive a new class from CRhinoGetPoint to dynamically draw geometry during a point picking operation.
Info: What is a Rhino Plug-in? Overview of Rhino plug-ins and how to get started in plug-in development.
Passing Arrays from RhinoScript to .NET Demonstrates how to pass VBScript SafeArrays to from RhinoScript to .NET.
How To: Add a Brep Box Rhino Demonstrates how to add a Brep Box from a Rhino plug-in.
How To: Mesh Objects using RhinoMeshObjects Demonstrates how to mesh surface and polysurface objects using the RhinoMeshObjects SDK function.
Simplifying a Curve Demonstrates how to use the RhinoSimplifyCurve SDK function.
Offset a Curve Demonstrates how offset a curve using the Rhino SDK.
Inflection point plugin An implementation of a binary searcher for 3D curve inflection points.
Info: Plug-in Loading A brief discussion on how Rhino loads plug-ins.
Retrieving Annotation Text Demonstrates how to retrieve the text string from an annotation text object using the Rhino 4.0 SDK.
Modifying an Annotation Object's Dimension Style Demonstrates how to modify the dimension style of a annotation object.
Orienting Objects on a Surface Demonstrates how to orient objects on a surface using Rhino 4 SDK.
View and Screen Capture Demonstrates how to capture view and screen to an image file using the Rhino SDK.
Calculating the Volumes of Mesh Objects Demonstrates how to calculating the volumes of mesh objects using Rhino 4.0 SDK.
Detecting Custom Texture Mapping Demonstrates how detect if an object uses a custom texture map using the Rhino SDK.
Creating a Leader Demonstrates how to an annotation leader using the Rhino 4 SDK.
Intersecting Line Curves Demonstrates how to intersect line curves using the Rhino SDK.
Calculating Curve Intersections Demonstrates how to calculate the intersection of two curves.
Determining the Normal Direction of a Brep Face Discusses how to determine the normal direction of a brep face using the Rhino SDK.
Class Prefixes in the Rhino .NET SDK Discusses the differences in the class prefixes in the Rhino .NET SDK.
Create a Bounding Polyline of a Mesh Object Demonstrates how to create a bounding polyline of a mesh object using the Rhino SDK.
Dynamically Drawing Text Strings Demonstrates how to dynamically draw text strings using the Rhino SDK.
Drawing Meshes Demonstrates how to draw a mesh using a display conduit.
Creating Blocks Demonstrates how to create an instance definition using the Rhino 4.0 SDK.
Changing the Display Precision Demonstrates how to change the unit's display precision of the current document using the Rhino SDK.
Determine the Deviation between two Curves Demonstrates how to determine the deviation between two curves using the RhinoGetOverlapDistance() SDK function.
Adjusting Clipping Planes from a Conduit How to adjust Rhino's near and far clipping planes from CRhinoDisplayConduit object.
Adding Background Bitmaps to Viewports Demonstrates how to add a background bitmap to a viewport using the SDK function.
Command Prompt Window Moves when Setting Language Demonstrates how to prevent the command prompt from moving when setting application settings.
Finding the Centers of Circles Demonstrates how to find the center point of a circle curve using the Rhino SDK.
Enabling Orthogonal Mode Demonstrates how enable and disable ortho mode using the Rhino SDK.
Adding Arrowheads to Curves Discusses how to add arrowheads to curve objects using the Rhino SDK.
Comparing Planar Surfaces and Planes Demonstrates how to see if a planar surface lies in a specific plane.
Modifying Advanced Display Settings Demonstrates how to modify advanced display settings using the Rhino SDK.
Picking Text Dots with CRhinoGetObject Demonstrates how to interactively select Text Dot objects with CRhinoGetObject.
How To: Get an Object's UUID Demonstrates how to get an object's UUID using the Rhino SDK.
Lofting Surfaces that Maintain Tangency Demonstrates how to loft surfaces that maintain tangency with adjacent surfaces using the RhinoSdkLoftSurface SDK function.
Circle Packing Plugin A basic 2D circle packing plugin for Rhino4
How To: Simplify polylines An implementation of the Douglas~Peucker polyline reduction algorithm
How To: Add a Linear Dimension to Rhino Demonstrates how to add a linear dimension object to Rhino.
How To: Select Objects How to interactively select objects from a Rhino plug-in.
How To: Loft Surfaces using RhinoSdkLoftSurface Demonstrates how to loft surfaces using the RhinoSdkLoftSurface SDK function.
DotNetEventWatcher
How To: Add a named view Demonstrates how to define and add a named view
Info: Attaching User Data to Brep Components Demonstrates how to attach object user data to components of a Brep.
How to use RhinoScript from a Rhino.NET plug-in Demonstrates how to get at and use RhinoScript from inside a Rhino.NET plug-in.
Info: Rhino 4.0 SDK: Textures and Mappings How to set texture coordinates and texture mappings.
Displaying Toolbars in Rhino 4.0 Demonstrates how to open a toolbar collection and display a toolbar in Rhino 4.0.
How To: Create Contour Curves Demonstrates how to create contour curves through surfaces, breps, and meshes using the MakeRhinoContours() SDK function.
How To: Modify an Object's Color Discuss how to modify an object's color with the Rhino SDK.
How To: Select All Objects on a Layer. Demonstrates how to select all of the objects on a specified layer.
How To: Modify the Weight of a Grip Object Demonstrates how to modify the weight of a grip object using the Rhino 4.0 SDK.
How To: Synchronize an Object's Rendering Color Demonstrates how to synchronize the basic material color of an object with the object's display color.
How To: Dump Debug Information to a Log File Discusses the use of the ON_TextLog class for debugging plug-ins.
Transforming Brep Objects Demonstrates how to transform brep, or boundary representation, objects using the Rhino SDK.
How To: Retrieve the Unit System of the Active Document Demonstrates how to determine the current unit system of the current document using the Rhino SDK.
How To: Set a View's Construction Plane Demonstrates how to set a view's construction plane.
How To: Show All Hidden Objects Demonstrates how to iterate throught the geometry table an unhide hidden objects.
How To: Replace Rhino's Color Picking Dialog Demonstrates how to replace Rhino's color picking dialog using the Rhino 4.0 SDK.
How To: Reparameterize a Curve Demonstrates how to reparameterize a curve objeect.
How To: Rename a Layer Discusses how to rename a layer using the Rhino SDK.
How To: Create a Plane Surface Demonstrates how to create a plane surface using the Rhino SDK.
How To: Determine an Object's Layer Name Demonstrates how to determine a selected object's layer name using the Rhino SDK.
How To: Maximize a View Demonstrates how to maximize a view using the Rhino SDK.
How To: Interactively Pick an Angle Demonstrates how to use the CRhinoGetAngle class to pick an angle.
How To: Extend a Surface Demonstrates how to use RhinoExtendSurface() to extend a surface object.
How To: Extend a Curve Object Demonstrates how to extend a curve by a line, arc or smooth extension until it intersects a collection of objects.
How To: Create a Surface from Edge Curves Demonstrates how to create a surface object from four edge curves.
How To: Copy a CRhinoObject Object Demonstrates how to make a copy of a CRhinoObject-derived object.
Duplicate the Borders of Surfaces Demonstrates how to duplicate the borders of surfaces and polysurfaces.
How To: Find the Parameter of a Curve at a Point Demonstrates how to find the parameter of a curve at a given 3D point.
How To: Convert an Arc curve to a NURBS curve Demonstrates how to convert an ON_ArcCurve object to an ON_NurbsCurve object.
How To: Clear Rhino's Undo and Redo Lists Demonstrates how to clear Rhino's Undo and Redo lists.
How To: Boolean Difference How to perform a Boolean Difference using the Rhino 4.0 SDK
How To: Add a Truncated Cone to Rhino Demonstrates how to create a truncated cone ON_BrepRevSurface and add it to Rhino.
How To: Add a Torus to Rhino Demonstrates how to create a torus using ON_BrepTorus and add it to Rhino.
How To: Add Objects to a Group Demonstrates how to add selected objects to an object group.
How To: Add a Cylinder to Rhino Demonstrates how to create a cylinder using ON_BrepCylinder and add it to Rhino.
What about: Discrepancies between the different SDK's List the differences between the C++ SDK and the Rhino 3 .NET SDK.
How To: Move Objects to the Current Layer Discusses how to iterate through the Rhino geometry table and modify the layer of selected objects.
How To: Move a Construction Plane Demonstrates how to move the origin of a construction plane.
VB.NET plugin for Molecular modeling Complete source-code for a VB.NET plugin. This plugin covers importing and selecting Protein Data Bank files as atoms and bonds in Rhino.
How To: Test if an Object is a Circle Demonstrates how to test if an object looks like a circle.
Curve-Surface Intersection Demonstrates how to get the intersection between a surface and a curve
How To: Find Surface Curvatures Demonstrates how to analytically solve for gaussian, mean and principal curvatures and principal directions on a surface
DotNET Plug-in: base surface from a trimmed one A small plug-in that creates a copy of the original surface from a trimmed surface.
How To: Set a CPlane to a View Demonstrates how to set the construction plane in the active viewport parallel to the view.
How To: Add Text to Rhino Demonstrates how to use ON_TextEntity2 to add text to Rhino.
How To: Add a Spherical Surface to Rhino Demonstrates how to create a sphere using ON_RevSurface and add it to Rhino.

Rhino 4.0 .NET SDK Samples

Batch Render with VB - creates a console application that will batch render a folder of 3dm files. Demonstrates how to access RhinoScript from an external .NET application.

BrepSamples - demonstrates how to create a planar face with hole, and how to create a trimmed planar face in C#.

Docking Dialog with VB - creates a custom user control in VB.NET that works as a dockable dialog in Rhino.

Docking Dialog with C# - creates a custom user control in C# that works as a dockable dialog in Rhino.

Event Watcher with VB - create a class that is notified when changes occur in Rhino.

Extend Object Properties with C# - demonstrates how to extend Rhino's Object Properties window.

Object Manager in C# - creates a docking dialog of object uuids that responds to selection events.

Read Points from a Text File in C# - Uses System.IO.StreamReader to read from a text file.

Last Modified [5/8/2009] rename · changes · history · subscriptions · references · file upload