gearGen Script for Mac?

Hi, I´m quite new to Rhino and happy to have it on the Mac Platform. I´m in the need of creating some simple gears and wonder if the Script gearGen from Thomas Anagnostou in the link below will also work on Rhino for Mac ?

If it works, can anyone please tell me step by step how to load that. I never touched scripts yet


Those scripts are done in Visual basic, Windows only. You would have to something in Python for it to work on a mac.

Not sure if anything out there.

How simple and how many?

thanks for your reply, really just simple gears for a 3D print of a motorised trolley. Right now my workaround is to get the gears in 2D from gear and use them as template to recreate the gears.

Any better suggestions ?

That plugin was done in vb if I recall correctly, and some months back I posted on it asking if anybody was willing to port it to python, as I don’t have any python chops whatsoever. Never heard anything after that.

It would be handy to have kicking around.

I think the main problem here is that the original script is over 700 lines, and a little hard to decipher. A lot of it was written back when Rhinoscript did not have a lot of UI possibilities, so much of the script deals with the UI choices… The actual math part is not all that big. It could probably be reduced to a couple of hundred lines or so in Python, but I think it would take at least a full day to go through and try to convert it/clean it up. (for me at least)… It is reasonably well commented inside the script, so that will help.


I wonder what ever happened to Thomas. He was a regular on the old newsgroup for years.

Can the Mac version of Rhino load compiled python scripts, looking at the the wip version there’s something about it having support for plugins.

If it does allow loading compiled scripts here’s a wip gear generator, it’s not based on Thomas’s version and works a little differently.

After loading the plugin you get a new command DrawGear, when you run the command first you are prompted to choose Module or Diametric pitch.

Then you get a dialog to enter the gear spec’s.

If all goes well when you click OK you should get a gear drawn at the origin of the current cplane.

I’ve only tested working in millimetres I guess if you work in inches it’ll need scaling by 25.4, I’m not sure how to deal with working with different unit.

DrawGear.rhp (17 KB)

Unfortunately installing that plugin under Rhino for Mac yields this error

. I’m pretty sure the mac version can run regular python scrips though. Compiling a plugin for the mac version is a little different from the windows version. This plugin would be endlessly useful for me, I hope a mac version could be figured out.

Hi Manuel
Try the attached Python (7.1 KB)
Ciao Vittorio

Thanks vittorio for the script, can you point me to link or explain to me how i can load the script into Rhino ?

thanks so much

Hi Manuel
save the script in this directory replacing Angela with your username:
creates a new button where write -__RunPythonScript (IngranaggioDentiDritti_Mac)
Clicking on the button run the script
Ciao Vittorio

1 Like

For Mac users:

Press the Alt key and hit the “Go” menu to see your user library (normally hidden), from there navigate to

Application Support>McNeel>Rhinoceros>Scripts

Copy the .py script file in there.

Then you can simply use the RunPythonScript command, it will automatically open that folder, double click on the script file and it will run.

You can also create an alias to run it automatically:

! _-RunPythonScript "scriptfilename"

(substitute the file name of the script for scriptfilename, of course)

HTH, --Mitch

1 Like

thanks Mitch, that helped.
Unfortunately i get the following error running the script.

im running 10.11.4 on my mac

Yeah, looks like Mac Rhino doesn’t support the rhinoscriptsyntax rs.PropertyListBox() method yet. There are a few rhinoscriptsyntax methods that are not yet implemented on Mac Rhino, basically stuff concerning the UI. So in order for this script to run on Mac Rhino currently, the user input collection now performed with rs.PropertyListBox() would need to be transformed into something that could be entered on the command line, either as a successive set of numbers or a string of command line options…


New version without PropertyListBox: (7.3 KB)
Ciao Vittorio

hi Vittorio, i can now enter teeth, module, with and hole diameter, but then get this message:

after i confirm i get a circle and an part of one teeth drawn as you can see here:

if i rerun the script and don’t change the values finally a gear is drawn.

thanks so much Vittorio - mille grazie :slight_smile: