use-rhino

Drive Rhino documents, .3dm files, and Grasshopper 2 canvases through MCP slots.

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/bsamiee/Rasm --skill use-rhino-bsamiee
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: use-rhino
Source: https://github.com/bsamiee/Rasm/tree/main/.claude/skills/use-rhino
Command: npx skills add https://github.com/bsamiee/Rasm --skill use-rhino-bsamiee

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires msgspec, pillow, rhino3dm, and includes scripts (resource) and references (resource) components.

What problem does it solve? Working with Rhino 3D documents programmatically requires coordinating a shared Rhino process, routing calls to the correct document slot, and avoiding UI-thread deadlocks and modal dialogs. This Skill provides the operational knowledge and scripts to create geometry, manage layers and materials, run commands, capture views, and build Grasshopper 2 definitions without disrupting the user's session. ## Core Features & Use Cases - Document Operations: Add geometry, find and change objects, manage layers and physically based materials, run Rhino command macros, and capture viewport images as PNG evidence. - File Workflows: Read .3dm files on disk via openNURBS without Rhino, open files behind the user's application, and export or convert between formats (STEP, IGES, glTF, OBJ) through headless documents. - Grasshopper 2 Automation: Build and solve definitions with g2_* tools, assign slider and parameter values, place Python 3 or C# script components, and bake results onto layers. - Use Case: An agent tasked with adding tower massing to a site model lists slots, opens the .3dm file, creates a layer with a color, adds a Box brep, and captures a PNG proving the result. ## Quick Start Ask the agent to open your .3dm file in Rhino and add geometry on a named layer, then capture a view of the result.

Frequently Asked Questions about use-rhino

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Rhino 3D with Python scripts?▼

Use the run_python tool, which executes CPython 3.13 inside Rhino on the UI thread with __rhino_doc__ as the slot's document. Import the document, records, canvas, and assembly modules to add geometry, manage layers, and read results back as records.

How to read a .3dm file without opening Rhino?▼

Run uv run --script scripts/file3dm.py with a file or folder path. It uses openNURBS via the rhino3dm package to print one JSON line per file with layers, materials, object counts, bounding boxes, and validity logs, with no Rhino process involved.

Can multiple sessions share one Rhino process safely?▼

Yes, one Rhino process holds every slot, and each call must pass its slot identified by the recorded pid and port pair. Scripts never activate another session's document, restore views and selections in finally blocks, and avoid modal-raising calls that hold the UI thread.

How do I build a Grasshopper 2 definition programmatically?▼

Call g2_start first, then use g2_search_components and g2_apply_graph to place components and wires, and solve with an empty g2_apply_graph. The canvas module reads output values, assigns inputs, places script components, and bakes results onto layers.

Why does a Rhino script call hang or deadlock?▼

Deadlocks occur when scripts wait on other UI-thread work such as a Grasshopper 2 solve or Task.Wait, or when a macro contains _Pause waiting for a viewport pick. Modal dialogs also hold the UI thread for every session and must be avoided.

What file formats can Rhino export or convert headlessly?▼

The convert and export functions use typed writers for suffixes including STEP, IGES, SAT, Parasolid, OBJ, and glTF. Conversions run in headless documents on the UI thread under a 5 minute limit, and .glb preserves physically based materials for Blender.