Request new rhino.compute.py API calls

Hello,

I am trying to use a rhino.compute to run scripts that are currently written in python using the RhinoCommon API. Is there a way to request new API calls to be added to rhino.compute.py? I’ve found that some functionality I need is missing, and expect to run into more issues as I get further into the project. I’m wondering if new functionality can or will be added, or if I should spend the time to rewrite the code to work around the missing methods. Some rewriting will be easier than others.

The methods are:
BrepFace.CreateExtrusion()
Transform.Multiply()
Vector3d.VectorAngle()

All three of these appear to be available in the C# SDK but not in the python SDK.

Thanks,
Michael

1 Like

While our client libraries might be outdated (looking into publishing some updated ones) you can look at how they are structured and create these calls yourself.

Here is what the CreateDevelopableLoft utility function looks like:

You can search the SDK available on the compute server by going to its /sdk endpoint. That will give you the URL to target. You can discern the args from the method arguments.

For example, BrepFace.CreateExtrusion:

warning: untested pseudocode

url = "rhino/geometry/brepface/createextrusion-brepface_curve_bool"
args = [pathCurve, capBool]
response = Util.ComputeFetch(url, args)
response = Util.DecodeToCommonObject(response)

That being said, we should update our client libraries.

Finally, all of the methods you are requesting are (or should) actually available in the rhino3dm.py library:

  • BrepFace.CreateExtrusion() - should be available, but has not been wrapped yet. I’ve opened an issue to get that in the library
  • Transform.Multiply() - available in rhino3dm but not documented
  • Vector3d.VectorAngle() - available in rhino3dm but not documented