Python_rhino3dm vs cpython example of rhino-inside

(IVELIN PEYCHEV) #1

I’m sorry if this is very clear but I still cannot completely figure it out.

What are the differences between rhino3dm module and rhinoinside cpython example?

One needs a rhino license the other doesn’t.

I feel like rhinoinside has a version of pythonnet embedded in it. But I cannot use rhinoscript or scriptsyntax. I’m confused.

I don’t know which one I need to choose for what type of project.

Thanks in advance.

0 Likes

Rhino Inside in Blender
(IVELIN PEYCHEV) #2

As I read further:
My current understanding is:

  • compute-rhino3dm is merely a rhino-inside implementation on a server running Windows Server and has Rhino7 installed.
  • rhino3dm module simply opens/writes 3dm files and adds rhino objects. Similar to what scriptsyntax does. Python module similar to the Rhino3dIO dotnet library.
  • you can’t do much using just rhino3dm you have to also use compute.rhino3d (or some local implementation of rhino-inside) so that besides adding/deleting objects you can also make stuff with them like boolean/intersection/trim/boundingbox, etc.

Am I correct in all of these conclusions?

Can I reference rhinoscriptsyntax somehow?
Is it possible to turn rhinoscriptsyntax into a PyPi module?

0 Likes

(Luis Fraguada) #3

More or less, yes. This is what we call ‘Compute’.

rhino3dm module simply opens/writes 3dm files and adds rhino objects. Similar to what scriptsyntax does. Python module similar to the Rhino3dIO dotnet library.

rhino3dm is essentially the openNURBS library targeting various programming languages and runtime environments. rhino3dm (ECMAScript/Javascript, CPython), rhino3dmIO (.net), and openNURBS (C++) are supposed to do the same thing, including 3dm file writing and reading.

This depends on what you want to do. If you want to create a file import plugin for some application, rhino3dm is enough. Anything related to computing (i.e. intersections, trimming, meshing) need the Rhino core, so you need to call Compute or Inside.

Pretty close! Thanks for taking the time to ask. We are also trying to do our best to clarify this.

This @stevebaer will have to answer!

1 Like

(Steve Baer) #4

I know this is all a big stinking mess of confusion as there are so many related but not the same technologies at play. All of this is compounded by the fact that a bunch of this technology is extremely new so we haven’t had the time to document it yet. It also may not be worth documenting yet as things are still changing.

rhinoscriptsyntax and scriptcontext are currently not available when running Rhino embedded inside of the CPython process. It may be possible eventually, but not at the moment.

2 Likes