Skip to content

Commit

Permalink
keep ON_NurbsCurve_CreateControlPointCurve out of rhino3dm
Browse files Browse the repository at this point in the history
  • Loading branch information
fraguada committed Dec 18, 2023
1 parent 1425422 commit 28b1967
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/librhino3dm_native/on_nurbscurve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ RH_C_FUNCTION bool ON_NurbsCurve_CreatePeriodicUniformNurbs(ON_NurbsCurve* crv,
return crv->CreatePeriodicUniformNurbs(dim, order, count, pts, knot_delta);
}

#if !defined(RHINO3DM_BUILD)
RH_C_FUNCTION ON_NurbsCurve* ON_NurbsCurve_CreateControlPointCurve(int count, /*ARRAY*/const ON_3dPoint* points, int degree)
{
if (count < 2 || nullptr == points)
Expand All @@ -56,13 +57,8 @@ RH_C_FUNCTION ON_NurbsCurve* ON_NurbsCurve_CreateControlPointCurve(int count, /*
count = pline.Count();

// clamp
//Luis 2023.12.18
//RhMaxNurbsDegree() isn't available in rhino3dm, but it is just a function that returns the number 11
#if !defined(RHINO3DM_BUILD)
degree = RHINO_CLAMP(degree, 1, RhMaxNurbsDegree());
#else
degree = RHINO_CLAMP(degree, 1, 11);
#endif

// control point curve
degree = (count <= degree) ? count - 1 : degree;

Expand Down Expand Up @@ -98,6 +94,7 @@ RH_C_FUNCTION ON_NurbsCurve* ON_NurbsCurve_CreateControlPointCurve(int count, /*

return pNC;
}
#endif

RH_C_FUNCTION bool ON_NurbsCurve_GetBool(ON_NurbsCurve* pCurve, int which)
{
Expand Down

0 comments on commit 28b1967

Please sign in to comment.