Коммит 04d6f759 создал по автору satabol's avatar satabol
Просмотр файлов

Update docs and menu Matrix/*, some fixes other menus and docs

владелец 693a9c9f
Matrix Apply to Mesh
====================
.. image:: https://user-images.githubusercontent.com/14288520/189549058-5f162b01-31f8-4c95-a4b4-25ac884343b0.png
:target: https://user-images.githubusercontent.com/14288520/189549058-5f162b01-31f8-4c95-a4b4-25ac884343b0.png
Functionality
-------------
......@@ -58,10 +61,42 @@ In this mode and with numpy implementation mode you will get numpy output for ve
Examples
--------
.. image:: https://cloud.githubusercontent.com/assets/284644/6096652/ac13659e-afbf-11e4-83c9-e13b75c0e346.png
.. image:: https://user-images.githubusercontent.com/14288520/189549063-bbbd055b-a0d5-47d4-88de-f386b494c664.png
:target: https://user-images.githubusercontent.com/14288520/189549063-bbbd055b-a0d5-47d4-88de-f386b494c664.png
* Generator-> :doc:`Box </nodes/generator/box_mk2>`
* Generator-> :doc:`Sphere </nodes/generator/sphere>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`
.. image:: https://user-images.githubusercontent.com/14288520/189549067-823dbfc0-0b81-4df1-a46f-5341138f630a.png
:target: https://user-images.githubusercontent.com/14288520/189549067-823dbfc0-0b81-4df1-a46f-5341138f630a.png
.. image:: https://cloud.githubusercontent.com/assets/284644/6096654/b300fbfa-afbf-11e4-901b-1361a44238c2.png
* Generator-> :doc:`Plane </nodes/generator/plane_mk3>`
* Number-> :doc:`Random </nodes/number/random>`
* Vector-> :doc:`Vector In </nodes/vector/vector_in>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* List->List Struct-> :doc:`List Length </nodes/list_main/length>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`
**Example of usage of nested list of matrices (list of lists of matrices):**
.. image:: https://user-images.githubusercontent.com/28003269/82114656-2bc95400-976f-11ea-8b6a-b539060b03e6.png
.. image:: https://user-images.githubusercontent.com/14288520/189549070-7d976ed9-01c4-4a97-a24c-2caca93f7872.png
:target: https://user-images.githubusercontent.com/14288520/189549070-7d976ed9-01c4-4a97-a24c-2caca93f7872.png
* Generator-> :doc:`Suzanne </nodes/generator/suzanne>`
* Generator-> :doc:`Sphere </nodes/generator/sphere>`
* Generator-> :doc:`Box </nodes/generator/box_mk2>`
* Generator-> :doc:`Torus </nodes/generator/torus_mk2>`
* Generator-> :doc:`Cricket </nodes/generator/cricket>`
* Number-> :doc:`A Number </nodes/number/numbers>`
* Number-> :doc:`Number Range </nodes/number/number_range>`
* Number-> :doc:`Random Num Gen </nodes/number/random_num_gen>`
* List->List Struct-> :doc:`List Split </nodes/list_struct/split>`
* List->List Main-> :doc:`List Join </nodes/list_main/join>`
* Vector-> :doc:`Vector In </nodes/vector/vector_in>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Viz-> :doc:`Mesh Viewer </nodes/viz/mesh_viewer>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`
\ Нет новой строки в конце файла
Matrix Deform
=============
\ Нет новой строки в конце файла
=============
.. image:: https://user-images.githubusercontent.com/14288520/189551372-e1578053-1b50-4eb7-ab56-b9fcad19d9b9.png
:target: https://user-images.githubusercontent.com/14288520/189551372-e1578053-1b50-4eb7-ab56-b9fcad19d9b9.png
\ Нет новой строки в конце файла
Matrix Euler
============
.. image:: https://user-images.githubusercontent.com/14288520/189551518-13e8e6e0-6182-4fd2-a1c5-704d39ff2529.png
:target: https://user-images.githubusercontent.com/14288520/189551518-13e8e6e0-6182-4fd2-a1c5-704d39ff2529.png
This node creates a transformation Matrix by defining the angles with X, Y and Z and the rotation order.
On the right-click menu there is a "Flat Output" toggle. While active (as it is by default)
......
Matrix Input
============
\ Нет новой строки в конце файла
============
.. image:: https://user-images.githubusercontent.com/14288520/189551430-3b474f37-edbc-41da-82d7-9b9751e6479b.png
:target: https://user-images.githubusercontent.com/14288520/189551430-3b474f37-edbc-41da-82d7-9b9751e6479b.png
\ Нет новой строки в конце файла
Matrix Interpolation
====================
\ Нет новой строки в конце файла
====================
.. image:: https://user-images.githubusercontent.com/14288520/189599483-353e3df0-06e8-4128-9415-a408c0b80157.png
:target: https://user-images.githubusercontent.com/14288520/189599483-353e3df0-06e8-4128-9415-a408c0b80157.png
Interpolate between two matrices.
See also
--------
* Number-> :doc:`Mix Inputs </nodes/number/mix_inputs>` (Can do non linear matrix interpolation)
* Vector-> :doc:`Vector Interpolation </nodes/vector/interpolation_mk3>`
\ Нет новой строки в конце файла
Iterate Matrix Transformation
=============================
.. image:: https://user-images.githubusercontent.com/14288520/189550986-f7b0bce0-c82a-4e82-a3d5-4622ff5b02ad.png
:target: https://user-images.githubusercontent.com/14288520/189550986-f7b0bce0-c82a-4e82-a3d5-4622ff5b02ad.png
Functionality
-------------
......@@ -67,17 +69,42 @@ Examples
Circle as input, Iterations = 3; one matrix specifies scale by 0.65 (along all axis) and translation along X axis by 0.3:
.. image:: https://cloud.githubusercontent.com/assets/284644/5691511/05057312-98ec-11e4-97b9-cd24206970d5.png
.. image:: https://user-images.githubusercontent.com/14288520/189550990-87147385-9f4e-4a2f-b1c8-a2bcbbf8072c.png
:target: https://user-images.githubusercontent.com/14288520/189550990-87147385-9f4e-4a2f-b1c8-a2bcbbf8072c.png
* Generator-> :doc:`Circle </nodes/generator/circle>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
One object as input, Iterations = 4; one matrix specifies scale by 0.6 along X and Y axis, and translation along Z by 1:
.. image:: https://cloud.githubusercontent.com/assets/284644/5691510/05039af6-98ec-11e4-9984-9cb85ec580bb.png
.. image:: https://user-images.githubusercontent.com/14288520/189550997-ede7060e-9806-4745-bed1-f5d476cbf651.png
:target: https://user-images.githubusercontent.com/14288520/189550997-ede7060e-9806-4745-bed1-f5d476cbf651.png
* Generator-> :doc:`Cylinder </nodes/generator/cylinder_mk2>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
.. image:: https://user-images.githubusercontent.com/14288520/189550930-bf0fa44a-e125-4955-b729-2d8703655a52.gif
:target: https://user-images.githubusercontent.com/14288520/189550930-bf0fa44a-e125-4955-b729-2d8703655a52.gif
One Box as input, Iteration = 3, two matrices:
.. image:: https://cloud.githubusercontent.com/assets/284644/5691509/04d79802-98ec-11e4-9560-e6346c6ab7c8.png
.. image:: https://user-images.githubusercontent.com/14288520/189551001-415db1a9-7543-4cf6-adc0-4f1a6bb05a57.png
:target: https://user-images.githubusercontent.com/14288520/189551001-415db1a9-7543-4cf6-adc0-4f1a6bb05a57.png
* Generator-> :doc:`Box </nodes/generator/box_mk2>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
Iterate cubes along with pentagons:
.. image:: https://cloud.githubusercontent.com/assets/284644/6249157/241a50c2-b7a7-11e4-9937-adb096f1d694.png
.. image:: https://user-images.githubusercontent.com/14288520/189551009-d76b48d0-c329-4a92-9ab6-3f095619a79a.png
:target: https://user-images.githubusercontent.com/14288520/189551009-d76b48d0-c329-4a92-9ab6-3f095619a79a.png
* Generator-> :doc:`Box </nodes/generator/box_mk2>`
* Generator-> :doc:`NGon </nodes/generator/ngon>`
* Number-> :doc:`A Number </nodes/number/numbers>`
* Vector-> :doc:`Vector In </nodes/vector/vector_in>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
\ Нет новой строки в конце файла
Matrix In
=========
.. image:: https://user-images.githubusercontent.com/14288520/189546077-7329965e-3c8e-40e8-8917-e54d80b0dc32.png
:target: https://user-images.githubusercontent.com/14288520/189546077-7329965e-3c8e-40e8-8917-e54d80b0dc32.png
Functionality
-------------
......@@ -22,10 +25,11 @@ All inputs are vectorized and they will accept single or multiple values.
- **Angle Z** [3,4]
Notes:
[1] : Input is available when "Quaternion" mode is selected
[2] : Inputs are available when "Axis Angle" mode is selected
[3] : Inputs are available when "Euler Angles" mode is selected
[4] : The angles are in DEGREES. The Property Panel has option to set angle units as: RADIANS, DEGREES or UNITIES.
* [1] : Input is available when "Quaternion" mode is selected
* [2] : Inputs are available when "Axis Angle" mode is selected
* [3] : Inputs are available when "Euler Angles" mode is selected
* [4] : The angles are in DEGREES. The Property Panel has option to set angle units as: RADIANS, DEGREES or UNITIES.
The node accepts as inputs either lists of items (vectors, numbers, quaternions), such as: [[v, v, v]], [[a, a, a]], [[q, q, q]]. in which case it would generate a set of matrices: [[m, m, m]], but it also accepts lists of lists of items, such as [[v, v], [v, v, v]], in which case it will produce a set of matrices: [[m, m], [m, m, m]].
......@@ -40,41 +44,54 @@ All parameters except **Mode**, **Angle Units** and **Flat Output** can be given
+-----------------+----------------+--------------+-------------------------------------------------------+
| Param | Type | Default | Description |
+=================+================+==============+=======================================================+
| **Mode** | Enum | Axis Angle | Specifies how the rotation component is provided |
| | Quaternion | | to the node as an input. |
| | Axis Angle | | |
| | Euler Angles | | |
| **Mode** | Enum | Axis Angle | Specifies how the rotation component is |
| | | | |
| | * Quaternion | | provided to the node as an input. |
| | * Axis Angle | | |
| | * Euler Angles | | |
+-----------------+----------------+--------------+-------------------------------------------------------+
| **Location** | Vector | (0, 0, 0) | The translation component of the matrix. |
+-----------------+----------------+--------------+-------------------------------------------------------+
| **Scale** | Vector | (1, 1, 1) | The scale component of the matrix. |
+-----------------+----------------+--------------+-------------------------------------------------------+
| **Angle Units** | Enum | Deg | Specifies the units for the angle values. [1] |
| | Deg, Rad, Uni | | |
| **Angle Units** | Enum | Deg | Specifies the units for the angle values. **[1]** |
| | | | |
| | * Deg | | |
| | * Rad | | |
| | * Uni | | |
+-----------------+----------------+--------------+-------------------------------------------------------+
| **Quaternion** | Quaternion | (1, 0, 0, 0) | The rotation component given as a quaternion. [2] |
| **Quaternion** | Quaternion | (1, 0, 0, 0) | The rotation component given as a |
| | | | |
| | | | quaternion. **[2]** |
+-----------------+----------------+--------------+-------------------------------------------------------+
| **Axis** | Vector | (0, 0, 1) | The axis of rotation. |
+-----------------+----------------+--------------+-------------------------------------------------------+
| **Angle** | Float | 0.0 | The rotation angle about the given rotation axis. [4] |
| **Angle** | Float | 0.0 | The rotation angle about the given rotation |
| | | | |
| | | | axis. **[4]** |
+-----------------+----------------+--------------+-------------------------------------------------------+
| **Euler Order** | Enum | XYZ | Specifies the order of the euler angle rotations. |
| | XYZ, XZY, | | |
| | YXZ, YZX, | | |
| | ZXY, ZYX | | |
| | | | |
| | * XYZ | | |
| | * XZY | | |
| | * YXZ | | |
| | * YZX | | |
| | * ZXY | | |
| | * ZYX | | |
+-----------------+----------------+--------------+-------------------------------------------------------+
| **Angle X** | Float | 0.0 | The angle of rotation about the X axis. [3][4] |
| **Angle X** | Float | 0.0 | The angle of rotation about the X axis. **[3][4]** |
+-----------------+----------------+--------------+-------------------------------------------------------+
| **Angle Y** | Float | 0.0 | The angle of rotation about the Y axis. [3][4] |
| **Angle Y** | Float | 0.0 | The angle of rotation about the Y axis. **[3][4]** |
+-----------------+----------------+--------------+-------------------------------------------------------+
| **Angle Z** | Float | 0.0 | The angle of rotation about the Z axis. [3][4] |
| **Angle Z** | Float | 0.0 | The angle of rotation about the Z axis. **[3][4]** |
+-----------------+----------------+--------------+-------------------------------------------------------+
NOTES:
[1] : The "Angle Units" parameter is available for "Axis Angle" and "Euler Angle" modes. When switching the units the angle values are converted to the selected unit. Connected angle inputs are also considered to have the selected angle units.
[2] : The quaternion is expected to be normalized (corresponding to a rotation matrix). If it is not normalized, the result is undefined.
[3] : The XYZ angle parameters are available for "Euler Angle" mode. The order of applying these rotations is given by the "Euler Order" parameter.
[4] : Angles are given by default in DEGREES. The Property Panel has option to set angle units as: RADIANS, DEGREES or UNITIES.
* **[1]** : The "Angle Units" parameter is available for "Axis Angle" and "Euler Angle" modes. When switching the units the angle values are converted to the selected unit. Connected angle inputs are also considered to have the selected angle units.
* **[2]** : The quaternion is expected to be normalized (corresponding to a rotation matrix). If it is not normalized, the result is undefined.
* **[3]** : The XYZ angle parameters are available for "Euler Angle" mode. The order of applying these rotations is given by the "Euler Order" parameter.
* **[4]** : Angles are given by default in DEGREES. The Property Panel has option to set angle units as: RADIANS, DEGREES or UNITIES.
Extra Parameters
----------------
......@@ -87,10 +104,12 @@ These parameters do not receive external input.
| **Flat Output** | Bool | True | Flattens the matrix output [#1]_ [#2]_ |
+------------------+----------+---------+----------------------------------------+
| **Angle Units** | Enum | DEGREES | Interprets the angle values based on |
| | RADIANS | | the selected angle units: |
| | DEGREES | | Radians = 0 - 2pi |
| | UNITIES | | Degrees = 0 - 360 |
| | | | Unities = 0 - 1 |
| | | | |
| | | | the selected angle units: |
| | | | |
| | * RADIANS| | * Radians = 0.0 - 2pi |
| | * DEGREES| | * Degrees = 0.0 - 360.0 |
| | * UNITIES| | * Unities = 0.0 - 1.0 |
+------------------+----------+---------+----------------------------------------+
NOTES:
......@@ -116,3 +135,15 @@ All outputs will be generated only when output socket is connected.
Example of usage
----------------
.. image:: https://user-images.githubusercontent.com/14288520/189546149-4a603282-7346-48d5-9491-5a043eac51dc.png
:target: https://user-images.githubusercontent.com/14288520/189546149-4a603282-7346-48d5-9491-5a043eac51dc.png
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`
.. image:: https://user-images.githubusercontent.com/14288520/189546359-8f061a85-72aa-44bf-8dde-70c386cace6c.gif
:target: https://user-images.githubusercontent.com/14288520/189546359-8f061a85-72aa-44bf-8dde-70c386cace6c.gif
* Generator-> :doc:`Segment </nodes/generator/segment>`
* Vector-> :doc:`Vector In </nodes/vector/vector_in>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`
\ Нет новой строки в конце файла
......@@ -5,15 +5,15 @@ Matrix
.. toctree::
:maxdepth: 1
matrix_in_mk4
matrix_out_mk2
apply_and_join
iterate
deform
euler
input
interpolation
matrix_in_mk4
matrix_out_mk2
matrix_math
matrix_track_to
euler
shear
matrix_normal
iterate
matrix_track_to
matrix_math
interpolation
Matrix Math
===========
.. image:: https://user-images.githubusercontent.com/14288520/189597709-68ea2c85-c478-403f-9555-87fcc0096684.png
:target: https://user-images.githubusercontent.com/14288520/189597709-68ea2c85-c478-403f-9555-87fcc0096684.png
Functionality
-------------
......@@ -12,13 +15,14 @@ Inputs
All inputs are vectorized and they will accept single or multiple values.
- **A**
- **B** [1]
- **B** **[1]**
- ...
- **Z** [2]
- **Z** **[2]**
Notes:
[1] : The second input is only available for the operations that require a second operand, like Multiply.
[2] : For multiple input operation (e.g. Multiply) the input sockets extend to allow arbitrary number of input matrices and their socket name progress alphabetically.
* **[1]** : The second input is only available for the operations that require a second operand, like Multiply.
* **[2]** : For multiple input operation (e.g. Multiply) the input sockets extend to allow arbitrary number of input matrices and their socket name progress alphabetically.
Parameters
----------
......@@ -30,35 +34,39 @@ All parameters except **Operation**, **PrePost** and **Filter T/R/S** can be giv
+---------------+------------+----------+--------------------------------------------------+
| Param | Type | Default | Description |
+===============+============+==========+==================================================+
| **Operation** | Enum: | Multiply | Multiply: A,B => C = A*B [1] |
| | Multiply | | Invert: A => C = A^-1 |
| | Invert | | Filter: A => C = [AT]*[AR]*[AS] |
| | Filter | | Basis: A => X, Y, Z |
| | Basis | | |
| **Operation** | Enum: | Multiply | Multiply: A,B => C = A*B **[1]** |
| | | | |
| | * Multiply | | * Invert: A => C = A^-1 |
| | * Invert | | * Filter: A => C = [AT]*[AR]*[AS] |
| | * Filter | | * Basis: A => X, Y, Z |
| | * Basis | | |
+---------------+------------+----------+--------------------------------------------------+
| **PrePost** | Enum: | Pre | Determines the order the operands [2] |
| | Pre | | |
| | Post | | |
| **PrePost** | Enum: | Pre | Determines the order the operands **[2]** |
| | | | |
| | * Pre | | |
| | * Post | | |
+---------------+------------+----------+--------------------------------------------------+
| **Filter T** | Bool | False | Filter out the Translation component [3] |
| **Filter T** | Bool | False | Filter out the Translation component **[3]** |
+---------------+------------+----------+--------------------------------------------------+
| **Filter R** | Bool | False | Filter out the Rotation component [3] |
| **Filter R** | Bool | False | Filter out the Rotation component **[3]** |
+---------------+------------+----------+--------------------------------------------------+
| **Filter S** | Bool | False | Filter out the Scale component [3] |
| **Filter S** | Bool | False | Filter out the Scale component **[3]** |
+---------------+------------+----------+--------------------------------------------------+
| **A** | Matrix | identity | First matrix input |
+---------------+------------+----------+--------------------------------------------------+
| **B** | Matrix | identity | Second matrix input [4] |
| **B** | Matrix | identity | Second matrix input **[4]** |
+---------------+------------+----------+--------------------------------------------------+
Notes:
[1] : The order of multiplication is given by the PrePost setting.
[2] : The PrePost setting is only available for the Multiply operation.
[3] : The Filter T/R/S toggle settings are only available for the Filter operation.
[4] : Second input is only available for Multiply operation.
* **[1]** : The order of multiplication is given by the PrePost setting.
* **[2]** : The PrePost setting is only available for the Multiply operation.
* **[3]** : The Filter T/R/S toggle settings are only available for the Filter operation.
* **[4]** : Second input is only available for Multiply operation.
Operations
----------
**Multiply**
The multiplication of the 4x4 homogeneous matrices result in a composite 4x4 homogeneous matrix having a composed Translation, a composed Rotation and a composed Scale. The order of multiplication is given by the PrePost setting, which is set to PRE-multiplication by default (C = A*B). The POST multiplication reverses the order of multiplication (C = B*A).
......@@ -80,12 +88,14 @@ This operation extacts the basis vector from the rotation part of the 4x4 homoge
Outputs
-------
**Matrix**
* **Matrix**
Outputs will be generated when connected.
**X**
**Y**
**Z**
* **X**
* **Y**
* **Z**
These outputs are available only for the Basis operation and will be generated when connected.
Example of usage
......
Matrix Normal
=============
.. image:: https://user-images.githubusercontent.com/14288520/189594017-c08d8a4b-943f-41bf-aa97-3a94802b48a8.png
:target: https://user-images.githubusercontent.com/14288520/189594017-c08d8a4b-943f-41bf-aa97-3a94802b48a8.png
Functionality
-------------
......@@ -33,5 +36,12 @@ Examples
Using the the node to place a mesh according to a base mesh vertex normals.
.. image:: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/matrix/matrix_normal/matrix_normal_sverchok_blender.png
:alt: Matrix_Normal_Sverchok.PNG
.. image:: https://user-images.githubusercontent.com/14288520/189552392-26211080-9e83-44e2-ac7d-f2909ed49b3d.png
:target: https://user-images.githubusercontent.com/14288520/189552392-26211080-9e83-44e2-ac7d-f2909ed49b3d.png
* Generator-> :doc:`IcoSphere </nodes/generator/icosphere>`
* Generator-> :doc:`NGon </nodes/generator/ngon>`
* Analyzers-> :doc:`Component Analyzer </nodes/analyzer/component_analyzer>`
* List->List Struct-> :doc:`List Length </nodes/list_main/length>`
* Number-> :doc:`Random Num Gen </nodes/number/random_num_gen>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
\ Нет новой строки в конце файла
Matrix Out
==========
.. image:: https://user-images.githubusercontent.com/14288520/189547490-4e7e7879-dfbb-4622-850b-6a8845f6956e.png
:target: https://user-images.githubusercontent.com/14288520/189547490-4e7e7879-dfbb-4622-850b-6a8845f6956e.png
Functionality
-------------
......@@ -19,24 +22,25 @@ Regardless of the selected mode the node always outputs the **Location** and the
| Mode | Description |
+============+=======================================================================================+
| EULER | Converts the rotation component of the matrix into X, Y, Z angles |
| | corresponding to the Euler rotation given an Euler rotation order. [1,2] |
| | |
| | corresponding to the Euler rotation given an Euler rotation order. **[1,2]** |
+------------+---------------------------------------------------------------------------------------+
| AXIS-ANGLE | Converts the rotation component of the matrix into the Axis & Angle of rotation. [1] |
| AXIS-ANGLE | Converts the rotation component of the matrix into the Axis & Angle |
| | of rotation. **[1]** |
+------------+---------------------------------------------------------------------------------------+
| QUATERNION | Converts the rotation component of the matrix into a quaternion. |
+------------+---------------------------------------------------------------------------------------+
Notes:
[1] : For EULER and AXIS-ANGLE modes, which output angles, the node provides an angle unit conversion to let the angle output values be converted to Radians, Degrees or Unities (0-1 range).
[2] : For EULER mode the node provides the option to select the Euler rotation order: "XYZ", "XZY", "YXZ", "YZX", "ZXY" or "ZYX".
* **[1]** : For EULER and AXIS-ANGLE modes, which output angles, the node provides an angle unit conversion to let the angle output values be converted to Radians, Degrees or Unities (0-1 range).
* **[2]** : For EULER mode the node provides the option to select the Euler rotation order: "XYZ", "XZY", "YXZ", "YZX", "ZXY" or "ZYX".
Inputs
------
**Matrix**
The node takes a list of (one or more) matrices and based on the selected mode
it converts the matrices into the corresponding components.
* **Matrix** The node takes a list of (one or more) matrices and based on the selected mode it converts the matrices into the corresponding components.
Extra Parameters
......@@ -48,15 +52,17 @@ These parameters do not receive external input.
| Extra Param | Type | Default | Description |
+=================+==========+=========+======================================+
| **Angle Units** | Enum | DEGREES | Interprets the angle values based on |
| | RADIANS | | the selected angle units: |
| | DEGREES | | Radians = 0 - 2pi |
| | UNITIES | | Degrees = 0 - 360 |
| | | | Unities = 0 - 1 |
| | | | |
| | | | the selected angle units: |
| | * RADIANS| | |
| | * DEGREES| | * Radians = 0 - 2pi |
| | * UNITIES| | * Degrees = 0 - 360 |
| | | | * Unities = 0 - 1 |
+-----------------+----------+---------+--------------------------------------+
Outputs
=======
-------
Based on the selected **Mode** the node makes available the corresponding output sockets:
......
Matrix Track To
===============
.. image:: https://user-images.githubusercontent.com/14288520/189595208-d6f50d63-ea5f-42b5-bb7f-85d16751b606.png
:target: https://user-images.githubusercontent.com/14288520/189595208-d6f50d63-ea5f-42b5-bb7f-85d16751b606.png
Functionality
-------------
......@@ -30,6 +33,7 @@ Parameters
| Param | Type | Default | Description |
+======================+=========+===========+================================================+
| **Track/Up Axes** | Enum: | X Y | Selects which of the X,Y,Z axes are the Track |
| | | | |
| | | | axis and the Up axis. |
| | X Y | | |
| | | | |
......@@ -81,16 +85,23 @@ A set of extra parameters are available on the property panel. These parameters
| Extra Param | Type | Default | Description |
+=========================+============+============+===============================================+
| **Normalize Vectors** | Bool | True | Normalize the output X, Y, Z vectors and |
| | | | |
| | | | the rotation component of the matrix. |
| | | | |
| | | | Turn this OFF when normalization is not |
| | | | |
| | | | needed to optimize computation. |
+-------------------------+------------+------------+-----------------------------------------------+
| **Flat Output** | Bool | True | While active it will join the first level to |
| | | | |
| | | | output a regular matrix list ([M,M,..]) that|
| | | | |
| | | | can be plugged to any other node. |
| | | | |
| | | | If it is disabled the node will keep the |
| | | | |
| | | | original structure outputting a list of |
| | | | |
| | | | matrix lists ([[M,M,..],[M,M,..],..]). |
+-------------------------+------------+------------+-----------------------------------------------+
......@@ -100,13 +111,16 @@ Outputs
**Matrix**, **X**, **Y**, **Z**.
All outputs will be generated when connected.
The **Matrix** is the homogeneous 4x4 matrix composed by the given location, rotation and scale : m = T * R * S. [1]
The **Matrix** is the homogeneous 4x4 matrix composed by the given location, rotation and scale :
The **X**, **Y**, **Z** are the orthonormal vectors, oriented along the Track and Up axes. [2]
m = T * R * S. **[1]**
The **X**, **Y**, **Z** are the orthonormal vectors, oriented along the Track and Up axes. **[2]**
Notes:
[1] : The rotation component is ortho-normal only if the "Normalize Vectors" option is ON (in the Property Panel).
[2] : The axes are ortho-normal only if the "Normalize Vectors" option is ON (in the Property Panel), otherwise the vectors are only orthogonal.
* **[1]** : The rotation component is ortho-normal only if the "Normalize Vectors" option is ON (in the Property Panel).
* **[2]** : The axes are ortho-normal only if the "Normalize Vectors" option is ON (in the Property Panel), otherwise the vectors are only orthogonal.
Example of usage
......
Matrix Shear
============
.. image:: https://cloud.githubusercontent.com/assets/619340/4186363/32974f5a-3760-11e4-9be7-5e16ce549d0d.PNG
:alt: Matrix_Shear.PNG
.. image:: https://user-images.githubusercontent.com/14288520/189551821-9e2d3f6c-bf42-4d00-aafa-abd84259180e.png
:target: https://user-images.githubusercontent.com/14288520/189551821-9e2d3f6c-bf42-4d00-aafa-abd84259180e.png
Functionality
-------------
......@@ -19,7 +19,9 @@ Inputs & Parameters
+===================+==================================================================================================+
| Plane | ``options = (XY, XZ, YZ)`` |
+-------------------+--------------------------------------------------------------------------------------------------+
| Factor1 & Factor2 | these are *Scalar float* values and indicate how much to affect the axes of the transform matrix |
| Factor1 & Factor2 | these are *Scalar float* values and indicate how |
| | |
| | much to affect the axes of the transform matrix |
+-------------------+--------------------------------------------------------------------------------------------------+
Outputs
......@@ -33,5 +35,5 @@ Examples
Usage: This is most commonly connected to Matrix Apply to produce the Shear effect.
.. image:: https://cloud.githubusercontent.com/assets/619340/4186364/3298a5f8-3760-11e4-83ad-e26989cb5133.PNG
:alt: Matrix_Shear_Demo1.PNG
\ Нет новой строки в конце файла
.. image:: https://user-images.githubusercontent.com/14288520/189551825-0438f07d-4fcd-4a60-90c2-643844cc8036.png
:target: https://user-images.githubusercontent.com/14288520/189551825-0438f07d-4fcd-4a60-90c2-643844cc8036.png
\ Нет новой строки в конце файла
......@@ -90,4 +90,8 @@ Outputs
Based on the selected **Mode** the node outputs the corresponding type value.
See also
--------
* Vector-> :doc:`Vector Interpolation </nodes/vector/interpolation_mk3>`
* Matrix-> :doc:`Matrix Interpolation </nodes/matrix/interpolation>`
......@@ -36,7 +36,7 @@ Examples
* Modifier->Modifier Change-> :doc:`Polygon Boom </nodes/modifier_change/polygons_boom>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* List->List Main-> :doc:`List Length </nodes/list_main/length>`
* List->List Struct-> :doc:`List Length </nodes/list_struct/slice>`
* List->List Struct-> :doc:`List Length </nodes/list_main/length>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Viz-> :doc:`Viewer 2D </nodes/viz/viewer_2d>`
......
......@@ -86,3 +86,9 @@ Notes
-------
The node doesn't extrapolate. Values outside of ``[0, 1]`` are ignored.
See also
--------
* Number-> :doc:`Mix Inputs </nodes/number/mix_inputs>`
* Matrix-> :doc:`Matrix Interpolation </nodes/matrix/interpolation>`
......@@ -121,8 +121,7 @@ def join_meshes(*, vertices: List[SvVerts], edges: List[SvEdges], polygons: List
class SvMatrixApplyJoinNode(bpy.types.Node, SverchCustomTreeNode):
"""
Triggers: matrix mesh join
Tooltip: Multiply vectors on matrices with several objects in output, processes edges & faces too.
It can also join the output meshes in to a single one
Tooltip: Multiply vectors on matrices with several objects in output, processes edges & faces too. It can also join the output meshes in to a single one\n\t-\n\tIn: Verts, Edges, Faces, Matrices\n\tParam: Join On/[Off]\n\tOut:Verts, Edges, Faces
"""
bl_idname = 'SvMatrixApplyJoinNode'
......@@ -130,7 +129,7 @@ class SvMatrixApplyJoinNode(bpy.types.Node, SverchCustomTreeNode):
bl_icon = 'OUTLINER_OB_EMPTY'
sv_icon = 'SV_MATRIX_APPLY_JOIN'
do_join: BoolProperty(name='Join', default=True, update=updateNode)
do_join: BoolProperty(name='Join', default=True, update=updateNode, description="If set, then this node will join output meshes into one mesh")
implementation_modes = [
("NumPy", "NumPy", "NumPy", 0),
......
......@@ -38,7 +38,7 @@ def matrix_euler(param, order):
class SvMatrixEulerNode(bpy.types.Node, SverchCustomTreeNode):
"""
Triggers: from axis rotation
Tooltip: Construct a Matirx from Euler rotations
Tooltip: Create a transformation Matrix by defining the angles with X, Y and Z and the rotation order.\n\tIn: X/Y/Z [0.0]\n\tParams: Order ([XYZ]/.../ZYX)\n\tOut: Matrix
"""
bl_idname = 'SvMatrixEulerNode'
......@@ -79,14 +79,14 @@ class SvMatrixEulerNode(bpy.types.Node, SverchCustomTreeNode):
self.outputs.new('SvMatrixSocket', "Matrix")
def draw_buttons(self, context, layout):
layout.prop(self, "order", text="Order:")
layout.prop(self, "order", text="Order")
def draw_buttons_ext(self, context, layout):
layout.prop(self, "order", text="Order:")
layout.prop(self, "order", text="Order")
layout.prop(self, "flat_output", text="Flat Output", expand=False)
def rclick_menu(self, context, layout):
layout.prop_menu_enum(self, "order", text="Order:")
layout.prop_menu_enum(self, "order", text="Order")
layout.prop(self, "flat_output", text="Flat Output", expand=False)
def process(self):
......
......@@ -31,7 +31,10 @@ from sverchok.data_structure import (updateNode, fullList)
class MatrixInterpolationNode(bpy.types.Node, SverchCustomTreeNode):
''' Interpolate between two matrices '''
'''Interpolate between two matrices. (See also number->mix inputs. Can do non linear iterpolation)
In: Factor (0.0-1.0), Matrix A, B
Out: Matrix C
'''
bl_idname = 'MatrixInterpolationNode'
bl_label = 'Matrix Interpolation'
bl_icon = 'OUTLINER_OB_EMPTY'
......
......@@ -99,7 +99,10 @@ def calc_matrix_powers(matrices, count):
class SvIterateNode(bpy.types.Node, SverchCustomTreeNode):
''' Iterate Matrix Transformation '''
'''Iterate Matrix Transformation. [default]
In: Matrix, Vertices, Edges, Polygons, Iterations [4]
Out: Vertices, Edges, Polygons, Matrices
'''
bl_idname = 'SvIterateNode'
bl_label = 'Iterate Matrix Transformation'
bl_icon = 'OUTLINER_OB_EMPTY'
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать