I Built My First Rhino Command with Claude AI... and It Actually Works!

Guys, I still can’t believe it.

Last night I almost finished a new command I’m developing with Claude connected to Visual Studio Code. So far, everything seems to be working correctly: the output file is an .rhp, and I’m currently optimizing it because I want the commands to have a floating options window, similar to the new Patch command in Rhino WIP.

The crazy part is that, to my surprise, it actually works!

I’m now creating the icons for the commands, and I also asked Claude to generate a dedicated toolbar to organize them.

Unfortunately, my Claude subscription only allows a certain amount of work before I have to wait for the session limits to reset, so I have to take breaks between development sessions. In the meantime, I’m continuing to refine and improve the commands.

The most absurd part of all this? I know absolutely nothing about programming! :joy:

I basically just explain what I want the command to do, how it should behave, and which options it should have… and Claude writes all the code for me. It honestly feels like having a personal programmer working at my side. :laughing:


In this video I showcase the development of my SmoothMorph plugin for Rhino 8, built with Claude AI and Visual Studio Code. The plugin introduces professional RBF-based morphing tools for surface deformation, springback compensation, continuity analysis (G0/G1/G2), deviation mapping, and curve-driven morphing, designed for advanced CAD and die-compensation workflows.
Here I show you the first two commands.


From 3:00 onward, the first command, called “SmoothMorph”.
From 6:00 onward, the second command, “CurveMorph”, which uses a guide curve as a reference to modify the surface.


I also created a user help guide. :winking_face_with_tongue:
Of course, it still needs quite a bit of work, so consider it a beta. :rofl::partying_face:
At the moment, the guide is only available in Italian. :italy:
SmoothMorph_Help.rar (337.1 KB)

These are the icons, along with an example of the command window.



Surface morphing plug-in — command list

A Rhino 8 plug-in for deforming surfaces and polysurfaces using a radial basis function (RBF) field. Aimed at die work: free-form morphing, springback compensation, deviation measurement and continuity checking. The engine can work globally (thin-plate spline, a fair deformation across the whole model) or locally (compactly-supported kernel, so edits stay within a region).

Commands are typed at the Rhino command line.


SmoothMorph

Deforms the selected objects by dragging picked points to new locations: you pick a point on the object and where it should move to, and the whole geometry follows smoothly. The more handles you define, the more control over the shape.

Use: select the objects → Enter → pick a base point → pick its target point → repeat for more handles → Enter to apply. Options: Smoothing (0 = passes exactly through the points, higher values relax the fit); Radius (0 = global; > 0 = local falloff, geometry beyond that radius is left untouched).

CurveMorph

Curve-driven deformation — the typical die-compensation workflow: you supply “before” curves (current position) and “after” curves (compensated position) and the surface flows from one to the other. Opens an options panel with a live viewport preview.

Use: select the objects → Enter → select the SOURCE curves → select the TARGET curves in the same order → adjust the panel → OK. Options (panel): Density (sample points per curve), Smoothing, Radius (0 = global), Distance (refit tolerance), Preview (live preview).

SpringbackMorph

Automatic springback compensation. You select the die / nominal surface and the sprung surface (measured or simulated); the die is pre-deformed opposite to the springback, by target = P − k·(sprung − nominal).

Use: select the die surface to compensate → Enter → select the sprung surface → Enter. Options: Grid (U×V sampling density), Factor (k; 1 = full compensation), Smoothing, Radius. Note: this is a first-order, single-shot compensation; real cases iterate (re-measure → re-compensate).

MorphDeviation

Builds a colour map of the signed distance from a “test” surface to a “reference” surface: blue = below, green = on target, red = above. Prints min/max, mean and RMS to the command line. This is the measurement half that closes the springback loop.
Use: select the surface(s) to analyse → Enter → select the reference surface → Enter. Options: Grid (sampling density), ColorRange (0 = auto, from the max deviation).

MorphG2Check

Analyses tangent (G1) and curvature (G2) continuity across the interior edges of a polysurface. Flags the problem points in the viewport (red = tangent break, orange = curvature-only break) and reports the worst angle gap and the worst relative curvature difference.

Use: select the polysurface → Enter. Options: Samples (points per edge), AngleToleranceDeg (G1 threshold, in degrees), CurvatureRelTol (G2 threshold, relative curvature difference).

MorphContinuityClear

Removes the markers drawn by MorphG2Check.

MorphDeviationClear

Removes the colour map drawn by MorphDeviation.


Status: work in progress. Springback compensation and G2 checking are a first working pass; planned next: iterative springback, automatic G2 continuity restoration, and unified options in a single panel.

Come on, let’s work together and compete with Rhino :joy:

:saluting_face:


LOL

@PowerShape I think I’ll upload these commands to Food4Rhino and share them for free with everyone.

Deforms the selected objects by dragging picked points to new locations: you pick a point on the object and where it should move to, and the whole geometry follows smoothly. The more handles you define, the more control over the shape.
Use: select the objects → Enter → pick a base point → pick its target point → repeat for more handles → Enter to apply. Options: Smoothing (0 = passes exactly through the points, higher values relax the fit); Radius (0 = global; > 0 = local falloff, geometry beyond that radius is left untouched).


@CallumSykes I know nothing about programming, yet I’m building the commands I want. Once I finish these, I’ll tackle Rhino’s biggest pain point: fillets and blends.
Among other things, I’ll make everything public on GitHub because I think it will benefit the Rhino ecosystem and the community. That way, you developers will be able to review the source code and maybe improve or even implement some of these commands directly in Rhino.


@Rhino_Bulgaria I’m also planning to convert some of these into scripts and develop many more.

I’m not quite sure why you’re cc’ing me in this particular comment? I never said this wasn’t possible, it absolutely is! I’ve used AI to make things I know nothing about as well :slight_smile:

I’m glad you’re able to build the tools you need on top of Rhino to get your work done, this is awesome! :100:

@CallumSykes I mentioned it because it’s one of the things I had Claude AI work on. I had it study the different programming languages that can be used to develop for Rhino, and this came up in the discussion about C#. It was part of a phase where I had Claude learn as much as possible to better understand how to approach development.
That sentence has really stuck with me because I made it very clear to Claude that I know absolutely nothing about programming. I told it that it had to take care of everything, because programming isn’t my profession. Yet I was amazed by the fact that a CAD modeler like me can simply ask for a command and have someone—or something—build it for me. A few years ago, this would have sounded like pure science fiction.

Congrats! That’s really cool stuff.

And that’s why it’s important to stay partly ahead of the curve, and partly be skeptical. We work on pushing the limits of AI to see where it breaks, where we can rely on it and where it causes more time spent than earned. One thing is for sure though, a lot of us need to develop new skills so we don’t end up like Kodak when digital photography entered the market, or like Nikon and Canon when Sony entered the market, or like Sony and Nikon and Canon when phone-cameras suddenly evolved and turned phones into cameras you can make movies with, edit and post directly to sosial media, write documents and even 3D scan with. Maybe Rhino’s developers constant focus on making Rhino into a platform rather than a toolbased niche nurbs modelling software is just what makes it robust for this AI transition where everybody can make their own tools.

I have gradually evolved my programming skills since 2011 and suddenly I have a “studio” of ai developers that can assist. So far I have learned a lot by studying their code, but “they” are on the next level and I see that I will struggle to keep up. And that too might be a good thing… only time will show.

Now we are suddenly approaching an era where “Data” from Star Trek is needed to communicate with our systems. Maybe it is purely a good thing.
I for one never liket programming GUI in any language and now suddenly I don’t have to, I can just as AI and then copy paste the code. And rather focus on using the tools to make the world a better place.

@Holo Look what I created for my PC desktop. It’s no longer just an image.