BHoM / BHoM/BHoM_Engine

Geometry_Engine: NurbsSurface.Degrees is not Correct for Closed Surfaces

Open
#1,099 3 comments 0 reactions 1 assignee Assigned to @IsakNaslundBh View on GitHub
type:bug
Dominant language
C#
Stars
30
Forks
13
Avg merge
7d 10h
Merged PRs (30d)
5

Description

#### 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](https://user-images.githubusercontent.com/6752345/61394273-97a10e80-a877-11e9-8a19-d12e23b6fa59.png)

![image](https://user-images.githubusercontent.com/6752345/61394281-9c65c280-a877-11e9-9b8b-ac0a0e43cfbf.png)

#### 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](https://burohappold.sharepoint.com/sites/BHoM/02_Current/Forms/AllItems.aspx?useFiltersInViewXml=1&id=%2Fsites%2FBHoM%2F02%5FCurrent%2F12%5FScripts%2F01%5FTest%20Scripts%2FBHoM%5FEngine%2FGeometry%5FEngine%2FBHoM%5FEngine%2DIssue1099%2DNurbSurfaceDegreesError)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.