Skip to content

Conversation

@tomvanmele
Copy link
Member

What type of change is this?

  • Bug fix in a backwards-compatible manner.
  • New feature in a backwards-compatible manner.
  • Breaking change: bug fix or new feature that involve incompatible API changes.
  • Other (e.g. doc update, configuration, etc)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I added a line to the CHANGELOG.md file in the Unreleased section under the most fitting heading (e.g. Added, Changed, Removed).
  • I ran all tests on my computer and it's all green (i.e. invoke test).
  • I ran lint on my computer and there are no errors (i.e. invoke lint).
  • I added new functions/classes and made them available on a second-level import, e.g. compas.datastructures.Mesh.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate)


'RhinoNurbsCurve'
'RhinoNurbsCurve',
'RhinoNurbsSurface',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry my first time looking at this part. I'm a bit confused here RhinoSurface and RhinoNurbsSurface are very similarly named, and they are more or less both wrappers of Rhino geometry instances, however they have quite different kind of APIs, what's the designed context for each of these classes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RhinoSurface is a backwards compatibility import from compas_rhino.conversions that allows Rhino surface objects and geometries to be converted to compas equivalents.

RhinoNurbsSurface is the Rhino plugin implementation of compas.geometry.NurbsSurface

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see!

import Rhino.Geometry


def rhino_surface_from_parameters(points, weights, u_knots, v_knots, u_mults, v_mults, u_degree, v_degree, is_u_periodic=False, is_v_periodic=False):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking here, just feel a bit strange of this function hanging here outside with a class, could it be part of class or in a collection of helpers in case it can be re-used elsewhere? (Same goes with RhinoNurbsCurve)

Copy link
Contributor

@Licini Licini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, generally LGTM!

Copy link
Member

@gonzalocasas gonzalocasas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry the late reviewing...
LGTM!!! 💯

Comment on lines +31 to +32
* Fixed bug in `compas_rhino.conversions.plane_to_compas_frame`.
* Changed implementation of `compas.geometry.NurbsSurface.xyz`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not to change right now, but these messages should be a tad more specific, both fixed bug and changed impl are so generic that a user would need to go read the code to understand what's being talked about.

:class:`ConversionError`
If the surface BRep contains more than one face.
"""
from compas.geometry import NurbsSurface
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason for this import to be inlined instead of at the top?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was originally because of a circular import but perhaps this is not the case anymore. will investigate...

@tomvanmele tomvanmele merged commit 7460734 into main Dec 17, 2021
@tomvanmele tomvanmele deleted the nurbs-surface branch December 17, 2021 15:49
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.

4 participants