-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4651 from nortikin/nurbs_degree_nodes
Nurbs degree elevation & reduction nodes
- Loading branch information
Showing
26 changed files
with
1,323 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Elevate Degree (NURBS Curve) | ||
============================ | ||
|
||
Functionality | ||
------------- | ||
|
||
This node elevates (increases) the degree of a NURBS curve. | ||
|
||
The opposite action can be performed with "Reduce Degree (NURBS Curve)" node. | ||
|
||
Curves of higher degrees have more control points, and so, with higher degree, | ||
one control point controls smaller segment of the curve. | ||
|
||
This node can work only with NURBS and NURBS-like curves. | ||
|
||
Inputs | ||
------ | ||
|
||
This node has the following inputs: | ||
|
||
* **Curve**. The curve to perform operation on. This input is mandatory. | ||
* **Degree**. In **Elevate by** mode, this is the delta to be added to curve's | ||
degree. In **Set degree** mode, this is new curve degree to be set. New | ||
degree can not be less than current degree of the curve. The default value is | ||
1. | ||
|
||
Parameters | ||
---------- | ||
|
||
This node has the following parameter: | ||
|
||
* **Mode**. This defines how the new degree of the curve is specified: | ||
|
||
* In **Elevate by** mode, **Degree** input specifies the number to be added | ||
to current degree of the curve. | ||
* In **Set degree** mode, **Degree** input specifies the new degree of the | ||
curve. | ||
|
||
Outputs | ||
------- | ||
|
||
This node has the following output: | ||
|
||
* **Curve**. The curve of elevated degree. | ||
|
||
Example of Usage | ||
---------------- | ||
|
||
Here orange is the original curve of 3rd degree, and green is it's control | ||
polygon. Red is the control polygon of curve with elevated (4th) degree. | ||
|
||
.. image:: https://user-images.githubusercontent.com/284644/189500544-0b0d70b0-f312-43b6-ac5a-b726bce6ccbd.png | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
Reduce Degree (NURBS Curve) | ||
=========================== | ||
|
||
Functionality | ||
------------- | ||
|
||
This node reduces (decreases) the degree of a NURBS curve. | ||
|
||
The action of this node is the opposite to the action of "Elevate Degree (NURBS Curve)" node. | ||
|
||
Degree reduction is the process which can not be always performed exactly. Some | ||
curves can not be degree reduced without visible deviation of curve's geometry. | ||
For other, degree reduction produces only small error. | ||
|
||
This node can work only with NURBS and NURBS-like curves. | ||
|
||
Inputs | ||
------ | ||
|
||
This node has the following inputs: | ||
|
||
* **Curve**. The curve object to perform operation on. This input is mandatory. | ||
* **Degree**. In **Reduce by** mode, this is the delta to be substracted from | ||
curve's degree. In **Set degree** mode, this is new curve degree to be set. | ||
New degree can not be greater than current degree of the curve. The default | ||
value is 1. | ||
* **Tolerance**. Maximum tolerable deviation of new curve from original. If | ||
degree reduction process will have error estimation more than this tolerance, | ||
then, depending on **Only if possible** parameter, the node will either fail or | ||
return the curve untouched (or degree reduced by less than wanted value). The | ||
default value is ``0.0001``. | ||
|
||
Parameters | ||
---------- | ||
|
||
This node has the following parameters: | ||
|
||
* **Mode**. This defines how the new degree of the curve is specified: | ||
|
||
* In **Reduce by** mode, **Degree** input specifies the number to be substracted | ||
from current degree of the curve. | ||
* In **Set degree** mode, **Degree** input specifies the new degree of the | ||
curve. | ||
|
||
* **Only if possible**. If this flag is checked, the node will try to degree | ||
reduce the curve by requested amount; it it is not possible to do so without | ||
deviation greater than the specified tolerance, the node will just degree | ||
reduce the curve the number of times it can. If not checked, then the node | ||
will fail (become red) in such a situation, and the processint will stop. | ||
Unchecked by default. | ||
|
||
Outputs | ||
------- | ||
|
||
This node has the following output: | ||
|
||
* **Curve**. The resulting curve. | ||
|
||
Example of Usage | ||
---------------- | ||
|
||
Here, the initial curve of 3rd degree is reduced to degree of 2. Orange is the | ||
original curve, blue is it's control polygon; green is the resulting curve, and | ||
red is it's control polygon. As you can see, in this case the operation could | ||
not be performed without visible deviation. | ||
|
||
.. image:: https://user-images.githubusercontent.com/284644/189500535-3a126895-7a36-453d-af8a-ff4b0615836e.png | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Elevate Degree (NURBS Surface) | ||
============================== | ||
|
||
Functionality | ||
------------- | ||
|
||
This node elevates (increases) the degree of a NURBS surface. | ||
|
||
The opposite action can be performed with "Reduce Degree (NURBS Surface)" node. | ||
|
||
Surfaces of higher degrees have more control points, and so, with higher degree, | ||
one control point controls smaller segment of the surface. | ||
|
||
Remember that NURBS surface has two degrees, one along U parameter and one | ||
along V. This node can elevate any of them. | ||
|
||
This node can work only with NURBS and NURBS-like surfaces. | ||
|
||
Inputs | ||
------ | ||
|
||
This node has the following inputs: | ||
|
||
* **Surface**. The surface to perform operation on. This input is mandatory. | ||
* **Degree**. In **Elevate by** mode, this is the delta to be added to surface's | ||
degree. In **Set degree** mode, this is new surface degree to be set. New | ||
degree can not be less than current degree of the surface. The default value is | ||
1. | ||
|
||
Parameters | ||
---------- | ||
|
||
This node has the following parameters: | ||
|
||
* **Direction**. This specifies the parameter direction, degree along which is | ||
to be increased. The available options are **U** and **V**. The default | ||
option is **U**. | ||
* **Mode**. This defines how the new degree of the surface is specified: | ||
|
||
* In **Elevate by** mode, **Degree** input specifies the number to be added | ||
to current degree of the surface. | ||
* In **Set degree** mode, **Degree** input specifies the new degree of the | ||
surface. | ||
|
||
Outputs | ||
------- | ||
|
||
This node has the following output: | ||
|
||
* **Surface**. The surface of elevated degree. | ||
|
||
Example of Usage | ||
---------------- | ||
|
||
Here the degree of the surface is increased by 1 along U and then reduced by 1 | ||
also along U, just to illustrate that degree elevation and reduction are the | ||
opposite processes. Red is the control net of the original and the resulting | ||
surfaces. Blue is the control polygon of degree elevated surface. | ||
|
||
.. image:: https://user-images.githubusercontent.com/284644/189500531-e4354c9d-0dd4-4bc5-861d-43d9229c28e6.png | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
Reduce Degree (NURBS Surface) | ||
============================= | ||
|
||
Functionality | ||
------------- | ||
|
||
This node reduces (decreases) the degree of a NURBS surface. | ||
|
||
The action of this node is the opposite to the action of "Elevate Degree (NURBS Surface)" node. | ||
|
||
Degree reduction is the process which can not be always performed exactly. Some | ||
surfaces can not be degree reduced without visible deviation of surface's geometry. | ||
For other, degree reduction produces only small error. | ||
|
||
Remember that NURBS surface has two degrees, one along U parameter and one | ||
along V. This node can reduce any of them. | ||
|
||
This node can work only with NURBS and NURBS-like surfaces. | ||
|
||
Inputs | ||
------ | ||
|
||
This node has the following inputs: | ||
|
||
* **Surface**. The surface to perform operation on. This input is mandatory. | ||
* **Degree**. In **Reduce by** mode, this is the delta to be substracted from | ||
surface's degree. In **Set degree** mode, this is new surface degree to be | ||
set. New degree can not be greater than current degree of the surface. The | ||
default value is 1. | ||
* **Tolerance**. Maximum tolerable deviation of new surface from original. If | ||
degree reduction process will have error estimation more than this tolerance, | ||
then, depending on **Only if possible** parameter, the node will either fail or | ||
return the surface untouched (or degree reduced by less than wanted value). The | ||
default value is ``0.0001``. | ||
|
||
Parameters | ||
---------- | ||
|
||
This node has the following parameters: | ||
|
||
* **Direction**. This specifies the parameter direction, degree along which is | ||
to be decreased. The available options are **U** and **V**. The default | ||
option is **U**. | ||
* **Mode**. This defines how the new degree of the surface is specified: | ||
|
||
* In **Reduce by** mode, **Degree** input specifies the number to be | ||
substracted from current degree of the surface. | ||
* In **Set degree** mode, **Degree** input specifies the new degree of the | ||
surface. | ||
|
||
Outputs | ||
------- | ||
|
||
This node has the following output: | ||
|
||
* **Surface**. The surface of a reduced degree. | ||
|
||
Example of Usage | ||
---------------- | ||
|
||
Here the degree of the surface is increased by 1 along U and then reduced by 1 | ||
also along U, just to illustrate that degree elevation and reduction are the | ||
opposite processes. Red is the control net of the original and the resulting | ||
surfaces. Blue is the control polygon of degree elevated surface. | ||
|
||
.. image:: https://user-images.githubusercontent.com/284644/189500531-e4354c9d-0dd4-4bc5-861d-43d9229c28e6.png | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.