Skip to content

Commit

Permalink
Merge pull request #4860 from nortikin/update_menu_nodes_comments_30
Browse files Browse the repository at this point in the history
Update docs of some nodes curves:
- cast_curve
- curve_frame
- curve_frame_on_surface
- offset_mk2
- project_curve_surface
  • Loading branch information
satabol authored Jan 6, 2023
2 parents 07fc860 + 9911d00 commit 8b4b73a
Show file tree
Hide file tree
Showing 9 changed files with 367 additions and 31 deletions.
52 changes: 52 additions & 0 deletions docs/nodes/curve/cast_curve.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Cast Curve
==========

.. image:: https://user-images.githubusercontent.com/14288520/210331787-21a0ac18-34ad-4c72-80e2-02e205155415.png
:target: https://user-images.githubusercontent.com/14288520/210331787-21a0ac18-34ad-4c72-80e2-02e205155415.png

Functionality
-------------

Expand All @@ -25,15 +28,24 @@ This node has the following inputs:
* for **Plane**, this is the normal direction of the plane;
* for **Cyinder**, this is the directing vector of cylinder's axis line.

.. image:: https://user-images.githubusercontent.com/14288520/210342515-508ba724-b85d-4794-a2d2-b39d6ed9dd5d.png
:target: https://user-images.githubusercontent.com/14288520/210342515-508ba724-b85d-4794-a2d2-b39d6ed9dd5d.png

* **Radius**. This parameter is available only when **Target form** parameter is set to **Sphere** or **Cylinder**. It's meaning depends on target form:

* for **Sphere**, this is the radius of the sphere;
* for **Cylinder**, this is the radius of the cylinder.

.. image:: https://user-images.githubusercontent.com/14288520/210342769-14a50d6d-75a6-4497-b132-a4571697bb01.png
:target: https://user-images.githubusercontent.com/14288520/210342769-14a50d6d-75a6-4497-b132-a4571697bb01.png

* **Coefficient**. Casting effect coefficient. 0 means no effect, 1.0 means
output the curve on the target form. Use other values for linear
interpolation or linear extrapolation. The default value is 1.0.

.. image:: https://user-images.githubusercontent.com/14288520/210342988-32076af3-a43b-4c88-aabb-0e81aacfedb2.png
:target: https://user-images.githubusercontent.com/14288520/210342988-32076af3-a43b-4c88-aabb-0e81aacfedb2.png

Parameters
----------

Expand All @@ -47,11 +59,17 @@ This node has the following parameter:
**Direction** (directing vector of the cylinder's axis) and **Radius** of
the cylinder.

.. image:: https://user-images.githubusercontent.com/14288520/210343311-5baadd9d-482d-4da4-88f0-2ee7b56571eb.png
:target: https://user-images.githubusercontent.com/14288520/210343311-5baadd9d-482d-4da4-88f0-2ee7b56571eb.png

* **Use control points**. If checked, then for NURBS curves the node will
project only control points of the curve, instead of projecting each point of
the curve. For non-NURBS curves, the node will raise an error (become red),
and processing will stop. Unchecked by default.

.. image:: https://user-images.githubusercontent.com/14288520/210350854-0cec95d6-4330-4f4d-ba33-ed21a0b58293.png
:target: https://user-images.githubusercontent.com/14288520/210350854-0cec95d6-4330-4f4d-ba33-ed21a0b58293.png

Outputs
-------

Expand All @@ -66,3 +84,37 @@ A line and the same line casted onto the unit sphere:

.. image:: https://user-images.githubusercontent.com/284644/77565225-ba46f500-6ee5-11ea-95ea-1baa8555d024.png

* Curves->Curve Primitives-> :doc:`Line (Curve) </nodes/curve/line>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`

---------

.. image:: https://user-images.githubusercontent.com/14288520/210354406-ffb583a6-a9e6-421b-9274-39f1ca1af5ea.png
:target: https://user-images.githubusercontent.com/14288520/210354406-ffb583a6-a9e6-421b-9274-39f1ca1af5ea.png

* Generator-> :doc:`NGon </nodes/generator/ngon>`
* Generator-> :doc:`Plane </nodes/generator/plane_mk3>`
* Generator-> :doc:`Segment </nodes/generator/segment>`
* Generator-> :doc:`IcoSphere </nodes/generator/icosphere>`
* Generator-> :doc:`Cylinder </nodes/generator/cylinder_mk2>`
* Curves-> :doc:`Approximate Bezier Curve </nodes/curve/bezier_fit>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* Transform-> :doc:`Noise Displace </nodes/transforms/noise_displace>`
* Transform-> :doc:`Rotate </nodes/transforms/rotate_mk3>`
* Number-> :doc:`A Number </nodes/number/numbers>`
* DEGREES: Number-> :doc:`Scalar Math </nodes/number/scalar_mk4>`
* Vector-> :doc:`Vector In </nodes/vector/vector_in>`
* Vector-> :doc:`Vector Polar Input </nodes/vector/vector_polar_in>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Viz-> :doc:`Viewer Draw Curve </nodes/viz/viewer_draw_curve>`

.. image:: https://user-images.githubusercontent.com/14288520/210355094-6388d29c-17c0-451d-bce9-50b5081fc638.gif
:target: https://user-images.githubusercontent.com/14288520/210355094-6388d29c-17c0-451d-bce9-50b5081fc638.gif

.. image:: https://user-images.githubusercontent.com/14288520/210355510-aa8825b8-a1b9-4a24-8212-b247a5f40d86.gif
:target: https://user-images.githubusercontent.com/14288520/210355510-aa8825b8-a1b9-4a24-8212-b247a5f40d86.gif

.. image:: https://user-images.githubusercontent.com/14288520/210356368-addf641c-74d6-4e4c-b452-ef0bec313674.gif
:target: https://user-images.githubusercontent.com/14288520/210356368-addf641c-74d6-4e4c-b452-ef0bec313674.gif
48 changes: 45 additions & 3 deletions docs/nodes/curve/curve_frame.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Curve Frame
===========

.. image:: https://user-images.githubusercontent.com/14288520/210581705-55a64f81-6a4d-40b3-81bd-03179b7cbd16.png
:target: https://user-images.githubusercontent.com/14288520/210581705-55a64f81-6a4d-40b3-81bd-03179b7cbd16.png

Functionality
-------------

Expand All @@ -9,17 +12,26 @@ for the given value of curve's T parameter. Basically, the node allows one to
place some object at the curve, by aligning the object with curve's "natural"
orientation.

.. image:: https://user-images.githubusercontent.com/14288520/210584549-8a57a141-95a3-4ae2-8afb-be674cb7b1c0.png
:target: https://user-images.githubusercontent.com/14288520/210584549-8a57a141-95a3-4ae2-8afb-be674cb7b1c0.png

.. _Frenet: https://en.wikipedia.org/wiki/Frenet%E2%80%93Serret_formulas

**Note 1**: Frenet frame of the curve rotates around curve's tangent according to
curve's own torsion. Thus, if you place something by this frame, the result can
be somewhat twisted. If you want to minimize the twist, you may wish to use
**Zero-Twist Frame** node.

.. image:: https://user-images.githubusercontent.com/14288520/210585812-b8893694-5d38-43b2-9921-cc03e29714d3.png
:target: https://user-images.githubusercontent.com/14288520/210585812-b8893694-5d38-43b2-9921-cc03e29714d3.png

**Note 2**: it is not possible to correctly calculate Frenet frame of the curve
at points where it has zero curvature (or at straight segments of the curve).
The node will give an error or produce invalid output in such cases.

.. image:: https://user-images.githubusercontent.com/14288520/210587935-40dd1b37-ba5c-412c-b88c-277aeb5f782f.png
:target: https://user-images.githubusercontent.com/14288520/210587935-40dd1b37-ba5c-412c-b88c-277aeb5f782f.png

Inputs
------

Expand All @@ -28,6 +40,9 @@ This node has the following inputs:
* **Curve**. The curve to calculate frame for. This input is mandatory.
* **T**. The value of curve's T parameter. The default value is 0.5.

.. image:: https://user-images.githubusercontent.com/14288520/210601868-cb2097f6-8736-435e-9284-9efd4a4afca0.png
:target: https://user-images.githubusercontent.com/14288520/210601868-cb2097f6-8736-435e-9284-9efd4a4afca0.png

Parameters
----------

Expand All @@ -36,6 +51,10 @@ This node has the following parameters:
* **Join**. If checked, the node will output the single list of matrices,
joined from any number of input curves provided. Otherwise, the node will
output a separate list of matrices for each input curve. Checked by default.

.. image:: https://user-images.githubusercontent.com/14288520/210603851-9f5659d6-5904-4dcc-a0c5-3cba1303eeff.png
:target: https://user-images.githubusercontent.com/14288520/210603851-9f5659d6-5904-4dcc-a0c5-3cba1303eeff.png

* **On zero curvature**. This parameter is only available in the N panel. This
defines what the node should do if it is instructed to calculate curve frame
at the point where curve has zero curvature. The available options are:
Expand All @@ -45,9 +64,13 @@ This node has the following parameters:
* **Arbitrary frame**. The node will return some arbitrary frame, with only
guaranteed property of having Z axis parallel to curve's tangent (two
other axes will be chosen arbitrarily).

The default option is **Raise error**.

.. image:: https://user-images.githubusercontent.com/14288520/210600874-0b03994e-c1fb-4203-9de8-9ce8c8fda0a4.png
:target: https://user-images.githubusercontent.com/14288520/210600874-0b03994e-c1fb-4203-9de8-9ce8c8fda0a4.png


Outputs
-------

Expand All @@ -59,14 +82,33 @@ This node has the following outputs:
* **Normal**. The direction of curve's main normal at the specified value of T parameter.
* **Binormal**. The direction of curve's binormal at the specified value of T parameter.

.. image:: https://user-images.githubusercontent.com/14288520/210584549-8a57a141-95a3-4ae2-8afb-be674cb7b1c0.png
:target: https://user-images.githubusercontent.com/14288520/210584549-8a57a141-95a3-4ae2-8afb-be674cb7b1c0.png

Examples of usage
-----------------

Visualize curve's frame at some points:

.. image:: https://user-images.githubusercontent.com/284644/78504334-eb48e480-7785-11ea-81cb-6987e67830b0.png
.. image:: https://user-images.githubusercontent.com/14288520/210607852-abd7b756-69cb-4a29-a2fa-684df1020529.png
:target: https://user-images.githubusercontent.com/14288520/210607852-abd7b756-69cb-4a29-a2fa-684df1020529.png

* Generator-> :doc:`Random Vector </nodes/generator/random_vector_mk3>`
* Curves-> :doc:`Cubic Spline </nodes/curve/cubic_spline>`
* Curves-> :doc:`Cubic Domain </nodes/curve/curve_range>`
* Number-> :doc:`Number Range </nodes/number/number_range>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`

---------

Use these frames to put cubes along the curve, aligning them along curve's natural orientation:

.. image:: https://user-images.githubusercontent.com/284644/78504337-ed12a800-7785-11ea-9a6c-1427ced45d55.png
.. image:: https://user-images.githubusercontent.com/14288520/210609386-6a21cb63-bcce-4ad1-a8d0-893ac7b11861.png
:target: https://user-images.githubusercontent.com/14288520/210609386-6a21cb63-bcce-4ad1-a8d0-893ac7b11861.png

* Generator-> :doc:`Box </nodes/generator/box_mk2>`
* Generator-> :doc:`Random Vector </nodes/generator/random_vector_mk3>`
* Curves-> :doc:`Cubic Spline </nodes/curve/cubic_spline>`
* Curves-> :doc:`Cubic Domain </nodes/curve/curve_range>`
* Number-> :doc:`Number Range </nodes/number/number_range>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
61 changes: 60 additions & 1 deletion docs/nodes/curve/curve_frame_on_surface.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Curve Frame on Surface
======================

.. image:: https://user-images.githubusercontent.com/14288520/210639554-d0a9be1f-e0ef-4c9f-b165-2f17dad71e20.png
:target: https://user-images.githubusercontent.com/14288520/210639554-d0a9be1f-e0ef-4c9f-b165-2f17dad71e20.png

Functionality
-------------

Expand All @@ -13,6 +16,9 @@ Given a surface and a curve in the surface's U/V space, this node calculates a r
This node allows one to place some object at the curve on the surface, while
aligning it both with curve's tangent and surface's normal.

.. image:: https://user-images.githubusercontent.com/14288520/210656324-3e8fdb9f-8654-491b-b305-cf512293a717.png
:target: https://user-images.githubusercontent.com/14288520/210656324-3e8fdb9f-8654-491b-b305-cf512293a717.png

Inputs
------

Expand All @@ -24,6 +30,9 @@ This node has the following inputs:
means V parameter. This input is mandatory.
* **T**. The value of curve's T parameter. The default value is 0.5.

.. image:: https://user-images.githubusercontent.com/14288520/210652754-f1802ae1-4cab-4761-80fc-eab7a03965b2.png
:target: https://user-images.githubusercontent.com/14288520/210652754-f1802ae1-4cab-4761-80fc-eab7a03965b2.png

Parameters
----------

Expand All @@ -33,6 +42,9 @@ This node has the following parameter:
matrices for all input curves. Otherwise, it will output separate list of
matrices per each input curve. Checked by default.

.. image:: https://user-images.githubusercontent.com/14288520/210657860-01c05782-4475-4d65-b6d0-3a22d2fe1bf3.png
:target: https://user-images.githubusercontent.com/14288520/210657860-01c05782-4475-4d65-b6d0-3a22d2fe1bf3.png

Outputs
-------

Expand All @@ -45,16 +57,63 @@ This node has the following outputs:
* **Normal**. The direction of curve's main normal at the specified value of T parameter.
* **Binormal**. The direction of curve's binormal at the specified value of T parameter.

.. image:: https://user-images.githubusercontent.com/14288520/210658893-6fb8a1e6-4913-4d04-8a3d-0d49ea85aa60.png
:target: https://user-images.githubusercontent.com/14288520/210658893-6fb8a1e6-4913-4d04-8a3d-0d49ea85aa60.png

Examples of usage
-----------------

Let's generate an ellipse by generating a sine wave in U/V space of cylindrical
curve. Then we use "Curve Frame" node to place cubes along that ellipse:

.. image:: https://user-images.githubusercontent.com/284644/89296471-d28d0480-d67b-11ea-9ac0-d6104821ea94.png
:target: https://user-images.githubusercontent.com/284644/89296471-d28d0480-d67b-11ea-9ac0-d6104821ea94.png

As you can see, the cubes are aligned with a plane where the ellipse lies, but
they are not aligned with the cylinder surface. Now let's use "Curve frame on surface" node instead:

.. image:: https://user-images.githubusercontent.com/284644/89296479-d456c800-d67b-11ea-9409-2f83e9db415b.png

:target: https://user-images.githubusercontent.com/284644/89296479-d456c800-d67b-11ea-9409-2f83e9db415b.png

**Replay with new nodes**:

https://gist.github.com/c119546943b4ce703d0f55be00cbedbd

.. image:: https://user-images.githubusercontent.com/14288520/210871891-c0228c13-2dc8-472d-ab3d-f806be82aed3.png
:target: https://user-images.githubusercontent.com/14288520/210871891-c0228c13-2dc8-472d-ab3d-f806be82aed3.png

* Generator-> :doc:`Box </nodes/generator/box_mk2>`
* Curves-> :doc:`Circle (Curve) </nodes/curve/curve_circle>`
* Curves-> :doc:`Curve on Surface </nodes/curve/curve_on_surface>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* Curves-> :doc:`Curve Domain </nodes/curve/curve_range>`
* Curves-> :doc:`Curve Frame </nodes/curve/curve_frame>`
* Surfaces-> :doc:`Curve Formula </nodes/curve/curve_formula>`
* Surfaces-> :doc:`Extrude Curve Along Vector </nodes/surface/extrude_vector>`
* Number-> :doc:`A Number </nodes/number/numbers>`
* Number-> :doc:`Number Range </nodes/number/number_range>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Script-> :doc:`Formula </nodes/script/formula_mk5>`

.. image:: https://user-images.githubusercontent.com/14288520/210870497-8c9108bb-0bfa-41d2-b1b8-fdfad1fc59c3.gif
:target: https://user-images.githubusercontent.com/14288520/210870497-8c9108bb-0bfa-41d2-b1b8-fdfad1fc59c3.gif

---------

https://gist.github.com/5fdc5d5e6169a86f9356ff461be321d3

.. image:: https://user-images.githubusercontent.com/14288520/210880364-869888dd-9ede-4131-8bc5-473f5624e5b0.png
:target: https://user-images.githubusercontent.com/14288520/210880364-869888dd-9ede-4131-8bc5-473f5624e5b0.png

* Generator-> :doc:`NGon </nodes/generator/ngon>`
* Generator-> :doc:`Box </nodes/generator/box_mk2>`
* Curves-> :doc:`Cubic Spline </nodes/curve/cubic_spline>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* Surface-> :doc:`Evaluate Surface </nodes/surface/evaluate_surface>`
* Surfaces-> :doc:`Surface from Curves </nodes/surface/interpolating_surface>`
* Transform-> :doc:`Move </nodes/transforms/move_mk3>`
* Number-> :doc:`Number Range </nodes/number/number_range>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Mutrix Multiply: Matrix-> :doc:`Matrix Math </nodes/matrix/matrix_math>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Scene-> :doc:`Bezier Input </nodes/exchange/bezier_in>`
Loading

0 comments on commit 8b4b73a

Please sign in to comment.