I am trying to write some python programs to automate some steps that I normally would do manually in the Rhino6 GUI. I always run into the same problem: The GUI commands don’t correspond to Python rhinoscript or RhinoCommon commands. Is there any comprehensive correspondence table?
In particular I am looking for the equivalents to be usable in Python for:
to just name a few.
Also an annoying fact is that CreateUVCrv creates the trimmed and the untrimmed uv curves. Is there any way to stop Rhino from providing the untrimmed versions?
Neither RhinoCommon nor Python have any ‘commands’. Rather, they APIs that have functions and classes, with properties and methods, that can be used to construction commands.
For example, if you wanted to create a planar surface using Rhino, you might run the PlanarSrf command. However, if you wanted to create a planar surface using Rhino using RhinoCommon, you’d use Brep.CreatePlanarBreps.
I am well aware of the difference between the GUI commands and the API calls they are internally mapped to.
Your example of the mapping of the command ‘PlanarSrf’ to the API call ‘Brep.CreatePlanarBreps’ is exactly what I am looking for in the form of a comprehensive correspondence list mapping all the GUI commands to their corresponding API calls.
As one can easily see the command name (PlanarSrf) has not much in common with the API method name (Brep.CreatePlanarBreps). Thus, guessing or searching through the RhinoCommon API documentation isn’t very efficient.
I would really appreciate if you could provide such a correspondence list.
Because it is not necessarly the same. However, the command might use the method as part of its internal structure. Therefor, the list you are asking for would basicly mean to open up the source of the commands.
The best we can do today is the RhinoCommon API documents and the developer samples on GitHub. When you’ve looked there and here (on Discourse) and still can’t find what your looking for, don’t hesitate to ask.