Skip to content

Commit

Permalink
Add curve and surface order properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Onur R. Bingol committed Sep 5, 2017
1 parent 77f637b commit 3e20687
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
16 changes: 16 additions & 0 deletions nurbs/Curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,22 @@ def __init__(self):
self._mDelta = 0.01
self._mCurvePts = []

@property
def order(self):
""" Curve order
Follows the following equality: order = degree + 1
:getter: Gets the curve order
:setter: Sets the curve order
:type: integer
"""
return self._mDegree + 1

@order.setter
def order(self, value):
self.degree = value - 1

@property
def degree(self):
""" Curve degree
Expand Down
32 changes: 32 additions & 0 deletions nurbs/Surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,38 @@ def __init__(self):
self._mDelta = 0.01
self._mSurfPts = []

@property
def order_u(self):
""" Surface order for U direction
Follows the following equality: order = degree + 1
:getter: Gets the surface order for U direction
:setter: Sets the surface order for U direction
:type: integer
"""
return self._mDegreeU + 1

@order_u.setter
def order_u(self, value):
self.degree_u = value - 1

@property
def order_v(self):
""" Surface order for V direction
Follows the following equality: order = degree + 1
:getter: Gets the surface order for V direction
:setter: Sets the surface order for V direction
:type: integer
"""
return self._mDegreeV + 1

@order_v.setter
def order_v(self, value):
self.degree_v = value - 1

@property
def degree_u(self):
""" Surface degree for U direction
Expand Down

0 comments on commit 3e20687

Please sign in to comment.