Open xarthurx opened 6 months ago
I can imagine that the stubs are very out of date. That being said, there does exist a Curve.TryGetPolyline(out Polyline polyline) method in dotnet. It returns a bool on whether the attempt was successful. In python, the result is the curve or None: https://github.com/mcneel/rhino3dm/blob/main/src/bindings/bnd_curve.cpp#L61
I will see about getting the stubs updated to reflect this.
I can imagine that the stubs are very out of date. That being said, there does exist a Curve.TryGetPolyline(out Polyline polyline) method in dotnet. It returns a bool on whether the attempt was successful. In python, the result is the curve or None: https://github.com/mcneel/rhino3dm/blob/main/src/bindings/bnd_curve.cpp#L61
I will see about getting the stubs updated to reflect this.
There is.
The polyline is obtained with 'out'. The way dotNet and python works very differently.
Indeed, but the stubs are generated from the dotnet source, so we have to update the way they are generated to reflect these differences. Similar issues arise for the javascript library d.ts file. For now I have to essentially hand craft that one to keep it up to date and accurate.
For the python lib, when trying to convert from
PolylineCurve
toPolyline
, the actual function usage isHowever, the linting and code are all
TryGetPolyline(polyline: Polyline)
which seems to be inherited from .NET method, but not working in Python.