I’m trying to convert Rhino geometries into Speckle objects using Python. Since the input object is a Rhino.LineCurve, I’m expecting SpeckleCoreGeometryRhino.Conversions.ToSpeckle() method to convert them as SpecklePolyline or SpeckleCurve; yet, the output of the method returns me a SpeckleBoolean. (I also tried converting the same curve on Grasshopper using Speckle Grasshopper Plug-in, and it converted the curve without any problem.)
I’m attaching the code and the output below for reference. I would be glad if anyone could help me with this issue.
Thank you for your response, it works just fine in IronPython. But the thing I need is actually to convert the objects within the CPython environment (using Rhino Compute API to produce Rhino geometry and converting them into Speckle objects by calling Speckle .NET frameworks from CPython).
When I try Serialise method directly with Rhino LineCurve as below, it returns an error that says:
There quite some .NET reflection going on in SpeckleCore, so it might not be easy to understand what’s going on…
Hope it helps & let us know if you find a solution!