Geometry methods - return values

unhandled

#1

Hi,

Just taking a quick look to the service, it looks awesome! Thanks for it :slight_smile:

I have some feedback related with the return values of the methods. Some of the classes (Brep/Mesh… probably more) have methods that modify the object but returns a bool (depending if the result can be computed). As a sample, but there are a bunch of them:

These methods do not return the resulting Brep/Mesh, only true/false so we can’t retrieve the resulting Brep/Mesh. Would be helpful to allow to get the resulting geometry modifying the returning result (null in case of error or the resulting Geometry)

Regards,


(Steve Baer) #2

Yep, you’re absolutely correct. We need to adjust our API to return these objects. We generate the entire API using reflection and need to figure out how to determine the case where the object itself is being modified in order to return a copy of it. This may require a custom attribute to be applied to functions in RhinoCommon.


#3

Yes, we thought that since the methods are exactly the same as RhinoCommon.

Let’s see where this arrives, it looks so promising!

Regards,


(Steve Baer) #4

@mpcarlos87, I just updated the compute server to return a modified instance of the object when methods that modify the object at called.

The RhinoCompute.cs C# SDK file has also been updated to reflect this change.

Thanks,
-Steve


#5

Thank you @stevebaer! Sorry I was not in the office for a while, I will take a look as soon as I have a moment!

Regards,