BHoM_Engine icon indicating copy to clipboard operation
BHoM_Engine copied to clipboard

Geometry_Engine: NurbsSurface.Degrees is not Correct for Closed Surfaces

Open enarhi opened this issue 6 years ago • 3 comments

Description:

NurbsSurface.Degrees is returning the wrong value for closed NurbsSurfaces, causing a breaking error when the NurbsSurface is read in Dynamo (and potentially elsewhere).

How to replicate:

Any closed nurbssurface will return degrees of 1 in the closed direction as a result of this bug as shown below. image

image

Expected behaviour:

Degrees should return 3 for U and V. NurbsSurface.Degrees should not rely on repeated Knots at the start to deduce degrees. A potential fix could be querying control points for repeated control points which can indicate a closed surface.

Test file(s):

Test File

enarhi avatar Jul 17 '19 17:07 enarhi

@epignatelli assigning you to get your eyes on this, go ahead and pass along as you see fit. Hoping we can sort it out without an oM change.

enarhi avatar Jul 17 '19 17:07 enarhi

Added a sphere test case to the test file as this looks to be effectively a third case. The current definition of NurbsSurface does not translate correctly for a sphere in Rhino either, as shown below. May need to create a separate issue for this in the Rhinoceros_Toolkit.

image

enarhi avatar Jul 17 '19 17:07 enarhi

Thanks @enarhi, I am passing this to @pawelbaran, he should be able to solve the problem.

epignatelli avatar Jul 18 '19 08:07 epignatelli