AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

rhino3d-scripts

Authoring and debugging scripts for Rhinoceros 3D (Rhino 8 and later). Use when asked to write RhinoScript (VBScript / .rvb / .vbs), RhinoPython, or RhinoCommon-based scripts; automate Rhino modeling tasks; build command macros; manipulate Rhino geometry, layers, blocks, or document objects; pick objects from the viewport; control redraw and undo; or load and run scripts from the Rhino Script Editor. Covers `rhinoscriptsyntax`, `scriptcontext`, the `Rhino.*` RhinoCommon namespaces (`Rhino.Geometry`, `Rhino.DocObjects`, `Rhino.Input`, `Rhino.UI`, `Rhino.Display`, `Rhino.FileIO`), and the Rhino 8 unified Script Editor.

Original source
github
License
MIT
Pinned revision
5269f7ea2d6c3a9bfda5ed878b6726cf509121fd

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

Ask your assistant

Use Agentic Memory skills to read github--rhino3d-scripts at revision 5269f7ea2d6c3a9bfda5ed878b6726cf509121fd, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 5

references/rhinocommon-map.md

RhinoCommon Namespace Map

Use this to decide which Rhino.* namespace to import for a task. All of these are accessible from Python with import Rhino.

Document & Object Model

| Need | Namespace | Key types | |---|---|---| | The active document, units, tolerances, undo | Rhino | RhinoDoc, RhinoApp | | Reading/writing objects in the doc | Rhino.DocObjects | RhinoObject, ObjectAttributes, Layer, ObjectType | | Tables (layers, materials, blocks, dim styles) | Rhino.DocObjects.Tables | LayerTable, InstanceDefinitionTable, MaterialTable | | Custom per-object user data | Rhino.DocObjects.Custom | UserData | | File I/O (.3dm, import/export) | Rhino.FileIO | File3dm, File3dmObject |

Geometry

| Need | Namespace | Key types | |---|---|---| | Points, vectors, transforms | Rhino.Geometry | Point3d, Vector3d, Transform, Plane, BoundingBox | | Curves | Rhino.Geometry | Curve, NurbsCurve, PolylineCurve, LineCurve, ArcCurve | | Surfaces & breps | Rhino.Geometry | Surface, NurbsSurface, Brep, BrepFace, Extrusion | | Meshes | Rhino.Geometry | Mesh, MeshFace, MeshNgon | | SubD | Rhino.Geometry | SubD, SubDFace, SubDEdge | | Geometry collections (vertices, edges, faces lists) | Rhino.Geometry.Collections | MeshVertexList, BrepEdgeList | | Intersections | Rhino.Geometry.Intersect | Intersection, CurveIntersections | | Mesh refinement | Rhino.Geometry.MeshRefinements | | | Space morphs (bend, twist, etc.) | Rhino.Geometry.Morphs | BendSpaceMorph, TwistSpaceMorph |

User Interaction

| Need | Namespace | Key types | |---|---|---| | Prompts, getters, command results | Rhino.Input / Rhino.Input.Custom | RhinoGet, GetObject, GetPoint, GetOption | | Commands (when building a plugin) | Rhino.Commands | Command, Result | | Forms, dialogs, panels | Rhino.UI | Dialog, Panels, RhinoEtoExtensions | | UI controls / data sources | Rhino.UI.Controls | | | Gumball | Rhino.UI.Gumball | |

Display & Rendering

| Need | Namespace | Key types | |---|---|---| | Viewports, display conduits, draw overlays | Rhino.Display | DisplayPipeline, DisplayConduit, RhinoViewport | | Render content (materials, environments) | Rhino.Render | RenderContent, RenderMaterial, RenderTexture | | Render mesh customization | Rhino.Render.CustomRenderMeshes | | | Post effects | Rhino.Render.PostEffects | |

Runtime & Plugins

| Need | Namespace | Key types | |---|---|---| | Plugin lifecycle, settings | Rhino.PlugIns | PlugIn, FileImportPlugIn, FileExportPlugIn | | In-process Rhino (run Rhino from external .NET) | Rhino.Runtime.InProcess | RhinoCore | | Native interop (pointers, marshalling) | Rhino.Runtime.InteropWrappers | | | User notifications (toasts) | Rhino.Runtime.Notifications | |

Common Patterns

import Rhino
import scriptcontext as sc
import System.Drawing

doc = sc.doc                                          # Rhino.RhinoDoc
tol = doc.ModelAbsoluteTolerance                      # float
view = doc.Views.ActiveView                           # Rhino.Display.RhinoView
layer_index = doc.Layers.Add("MyLayer", System.Drawing.Color.Red)

# Find a Rhino object from a rhinoscriptsyntax GUID
rhobj = doc.Objects.Find(guid)                        # Rhino.DocObjects.RhinoObject
geom  = rhobj.Geometry                                # Rhino.Geometry.GeometryBase

# Add geometry with attributes
attrs = Rhino.DocObjects.ObjectAttributes()
attrs.LayerIndex = layer_index
attrs.Name = "example"
new_id = doc.Objects.AddCurve(curve, attrs)

Undo

undo_serial = doc.BeginUndoRecord("Batch Op")
try:
    # ... many doc.Objects.* calls ...
    pass
finally:
    doc.EndUndoRecord(undo_serial)
    doc.Views.Redraw()