Question about using DrRacket as a front end and Rhino as a backend with the book "Programming for Architects"

Hello there,
To Whom It May Concern:
I am working along with a book titled “Programming for Architects”, it uses

DrRacket as a frontend and Rhino or AutoCAD as a backend, right now I am on section 3.3 called

“Bi-Dimensional Geometric Modelling” so they ask the user to input this two lines in DrRacket’s interface:

#lang racket
(require (planet aml/rosetta))
(backend rhino)

Now, this doesn’t work, but I manage to get at least to the REPL using the following lines:

#lang racket

(require rosetta)
(backend rhino)

Like I said this seems to work to get to the REPL, now when I try the following commands:

(circle (pol 0 0) 4)
(circle (pol 4 (/ pi 4)) 2)
(circle (pol 6 (/ pi 4)) 1)

No matter which one I type, the error message is always the same:

Couldn’t find Rhinoceros

I know, I am very close but I am missing something, what do I need to do in order to write commands in DrRacket and

get Rhino to follow/obey those commands?

Any and all help will be really appreciated.

Thanks.

Alfonso Urroz-Aguirre

Welcome @urrozalf,

I’ve never heard of this, but I quickly duckduckgo-ed it, and it seems like you need to change your first few lines to (cf. source):

#lang racket

(require (planet aml/rosetta))
(backend rhino5)

I have no idea whether Rhino 6 or 7 are supported. The website only talks about version 5.
It’s up to you to try! :wink:

You should probably install the latest version of this rosetta library, which still seems to be developed and should thus have support for later Rhino versions? It seems that these packages are installed from a package manager within DrRacket.

I’m sure this is a good introduction, but you should probably learn Python or C# instead. :wink:

1 Like

You aren’t by chance using a brand new MacBook or Air with Apple silicon are you?

I really appreciate the help by user “diff-arch” and indeed I have tried the two lines mentioned by you:
(require (planet aml.rosetta))
(backend rhino5)

and I explained in my original post that those two lines didn’t and that I tried using:
(require rosetta)
(backend rhino)

and I repeat again, those two lines worked, at least as far as getting me to the REPL, and if I type
(xyz 6 8 4)
then that works fine but if I type:
(point (xyz 6 8 4))
then the REPL returns the same message:
Couldn’t find Rhinoceros

And to user “AIW”, I am using a computer that is at least 3-4 years old and is not a MacBook nor it is an Air.

Again, if anyone has succeeded in using DrRacket as a frontend and Rhino as a backend, please let me know what to do.

Thanks.

Alfonso Urroz-Aguirre

I think the main difference between your first and my first post was the version declaration (backen rhino5).
Which version of Rhino are you using? I’d try with version 5, if you haven’t already, since this seems to be the last supported version.
Now, since Rhino 5 was the first version of Rhino that even had macOS support, couldn’t it be that Rosetta simply isn’t supported (windows-only)?
I’ve found the GitHub repo, and it seems like the code hasn’t been touched in a long time (i.e. 2-4 years), which kind of is a bad sign. It usually means that the project isn’t developed anymore. Your best bet would probably be to contact the developer on GitHub!

I have also found the book, you were talking about.

Look, if you have to go through this book for school - which I think would be nonsense -, do it, but if you simply want to learn programming, I’d recommend you go with Python.
It’s very beginner friendly and approachable, it’s supported in Rhino/Grasshopper, Blender, Maya, Revit, etc., open-source, and multi-platform. It can also be used for many other applications (e.g. web development, machine learning, data science, system administration, etc.)!

There are many free and great resources on how to get started! Here is a dedicated page about Python in Rhino, which points to some:


There you can also download the Rhino Python Primer by McNeel, which is a tremendous book, and could be an alternative to the one you found! As far as I can tell, it’s as much about architecture as the one you found: :wink:

It’s totally up to you, but instead of waiting for days and days to get help for something that doesn’t seem very popular and probably has been abandoned for years, it would make much more sense to dive head first into learning Python or some other language.
Programming is mainly about understanding the base concepts (i.e. variables, loops, conditionals, functions, classes, etc.), which are the same or very similar along many languages. Once you get those down, it is only a matter of adapting to another syntax to learn another language.

And if you need help with your Python or C# endeavors, this forum is a great resource.

2 Likes

Wise words.

1 Like