Skip to content

Commit

Permalink
condition checking for rhino3dm
Browse files Browse the repository at this point in the history
  • Loading branch information
fraguada committed Dec 18, 2023
1 parent f8a4211 commit 1425422
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/dotnet/opennurbs/opennurbs_extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4158,6 +4158,7 @@ public File3dmObject[] GroupMembers(int groupIndex)
/// Adds a new empty group to the group table.
/// </summary>
/// <returns>>=0 index of new group or -1 on error.</returns>
/// <sice>8.4</since>
public int AddGroup() {

IntPtr ptrFile3dm = m_parent.NonConstPointer();
Expand Down
8 changes: 7 additions & 1 deletion src/librhino3dm_native/on_nurbscurve.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "stdafx.h"



RH_C_FUNCTION ON_NurbsCurve* ON_NurbsCurve_New(ON_NurbsCurve* pOther)
{
RHCHECK_LICENSE
Expand Down Expand Up @@ -55,8 +56,13 @@ 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

0 comments on commit 1425422

Please sign in to comment.