Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistant PolylineCurve.TryGetPolyline() method #610

Open
xarthurx opened this issue Apr 29, 2024 · 3 comments
Open

Inconsistant PolylineCurve.TryGetPolyline() method #610

xarthurx opened this issue Apr 29, 2024 · 3 comments

Comments

@xarthurx
Copy link

For the python lib, when trying to convert from PolylineCurve to Polyline, the actual function usage is

ply = plyCrv.TryGetPolyline()

However, the linting and code are all TryGetPolyline(polyline: Polyline) which seems to be inherited from .NET method, but not working in Python.
image
image

@fraguada fraguada added the py label Apr 29, 2024
@fraguada fraguada added the docs label May 10, 2024
@fraguada
Copy link
Member

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.

@xarthurx
Copy link
Author

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.

@fraguada
Copy link
Member

fraguada commented May 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants