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

Fix the uv naming of the NURBSSurface #1252

Closed

Conversation

ZacZhangzhuo
Copy link
Contributor

@ZacZhangzhuo ZacZhangzhuo commented Jan 6, 2024

Changed names:
degree_u -> u_degree
degree_v -> v_degree
otherwise, the program would raise unexpected param error. @Licini

@tomvanmele
Copy link
Member

the names are correct. what kind of error is raised and under which circumstances?

@ZacZhangzhuo
Copy link
Contributor Author

the names are correct. what kind of error is raised and under which circumstances?

Traceback (most recent call last):
  File "c:/Zac/GitHub/compas-dev/compas_viewer/temp/temp.py", line 32, in <module>
    surface = NurbsSurface.from_points(points=points)
  File "C:\Zac\GitHub\compas-dev\compas\src\compas\geometry\surfaces\nurbs.py", line 278, in from_points
    return new_nurbssurface_from_points(cls, points, degree_u=degree_u, degree_v=degree_v)
  File "C:\Zac\GitHub\compas-dev\compas\src\compas\plugins.py", line 301, in wrapper
    return plugin_impl.method(*args, **kwargs)
  File "C:\Applications\Miniconda\envs\compas-2-3.8-occ\lib\site-packages\compas_occ\geometry\surfaces\__init__.py", line 32, in new_nurbssurface_from_points
    return OCCNurbsSurface.from_points(*args, **kwargs)
TypeError: from_points() got an unexpected keyword argument 'degree_u'

since the occ uses:
https://github.com/compas-dev/compas_occ/blob/d95a6b1d78809901e435a966a91874117f38a05a/src/compas_occ/geometry/surfaces/nurbs.py#L296

@ZacZhangzhuo
Copy link
Contributor Author

ZacZhangzhuo commented Jan 6, 2024

alright, I know why now.. You updated the code 2 months ago while the last release of the occ was still on Mar 21, 2023 :)

@tomvanmele
Copy link
Member

so can we close this?
until we release new versions everywhere, you will have to work with a dev install of all main packages...

@ZacZhangzhuo ZacZhangzhuo deleted the bug/nurbssurface-naming branch January 8, 2024 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants