Rhino 9 makes it very easy to drive Rhino with AI. All you need is an MCP-compatible AI desktop application, such as Claude or ChatGPT. Make sure to be signed into your AI client account first, then open the
AI panel in Rhino. Once opened, describe the geometry or task you want in plain language, watch the assistant build it live in your Rhino session, and refine it by continuing the conversation. In this tutorial, we’ll use this method to prototype a circular grid of holes, like a speaker grille, and then turn the finished script into a real, reusable SpeakerGrid command with its own command-line prompts.
What You’ll Need
- Download Rhino 9 Evaluation for Windows or Mac.
- An MCP-compatible AI desktop application. Supported apps are Claude Desktop and Codex.
- A subscription to that AI service. Everything here was done on the standard Claude plan.
- No Python knowledge required. The assistant writes and edits the script for you; some familiarity with Python is helpful, but not necessary, if you want to read along.
Verifying your Connection
In this section, we will make sure we have the panel open and docked in a suitable way to start our conversation. We will verify that the client is connected. In this example, we are using Claude as our AI client.
- If not, open the
AI Settings
to verify which Agent is available and eventually select a Model:
- If it is still not connected, run
/logoutfollowed by/loginby typing it directly in the AI Panel’s chat box. This should force the connection.
Prototype the Grid in Conversation
-
With the bridge running, in the AI Panel, describe the pattern you’re after instead of writing it from scratch:
Write RhinoScript-Python that draws a circular grid of small circles around a center point, arranged in concentric rings, like the holes in a speaker grille. Run it in Rhino so I can see it.
-
The assistant writes the script and calls
RhinoMCP’s execute_rhinoscript_python_codetool, which runs the code directly in your open Rhino document. The grille pattern appears in the viewport immediately, so you can keep iterating conversationally:Space the rings further apart near the center, and make the holes a bit smaller.
-
Tell the assistant what’s wrong and how you want it fixed:
The holes look randomly scattered instead of forming clean rings. Update the script so each additional ring adds exactly 6 more circles than the ring before it, keeping them evenly spaced around the circle. Keep the original values obtained: center
0, overall radius50, hole radii4 -
Let it run the updated script and check the result in the viewport.
-
The assistant’s modified script should now look close to this:
|
|
- Download the fixed script: speaker_grid.py
Save the Working Script
Once you’re happy with the result, save the script you downloaded above to disk somewhere permanent, for example Documents\Scripts\speaker_grid.py. You’ll point to it when turning the script into a command in the next step.
Turn the Script into a Command
To turn the script into a reusable command you can type in Rhino’s Command Prompt , pair it up with an Alias.
-
Run the
Options command and open the Aliases page. -
Click New, and set:
Alias Command macro SpeakerGrid! _-ScriptEditor Run "Documents\Scripts\speaker_grid.py" -
Close the
Options dialog. -
Typing
SpeakerGridnow runs your script exactly like a built-in command, prompts and all, any time, with no AI connection required.
Add a Toolbar Icon
Typing SpeakerGrid works, but a clickable icon is faster to reach for a command you use often.
-
Create a new button by right-clicking a gray area of the Standard Toolbar and choosing New Button….
-
The Button Editor - Empty dialog appears:
- For the Left Mouse Button Tooltip, enter
Speaker Grid. - Under Command, enter the same macro you used for the alias:
`!_-ScriptEditor Run "Documents\Scripts\speaker_grid.py"`- Under Appearance, in the top-left corner of the editor, select the
LightorDarkicon to open the built-in Image Editor. Draw an icon with the built-in tools. - Alternatively, go to File → Open to bring in an SVG you’ve made or use this example speaker-grill-icon.svg.
- Select OK to close the Image Editor, then OK again to close the Button Editor.
- For the Left Mouse Button Tooltip, enter
-
Select the new button to test it. It walks through the same prompts as typing
SpeakerGridat the command line.
