diff --git a/docs/nodes/list_masks/mask_join.rst b/docs/nodes/list_masks/mask_join.rst index 3431394d3c..2cab98d152 100644 --- a/docs/nodes/list_masks/mask_join.rst +++ b/docs/nodes/list_masks/mask_join.rst @@ -1,5 +1,5 @@ -List Mask Join In -================= +List Mask Join (In) +=================== .. image:: https://user-images.githubusercontent.com/14288520/189611716-899bd122-6af1-4025-bc6f-62b2ccff5ade.png :target: https://user-images.githubusercontent.com/14288520/189611716-899bd122-6af1-4025-bc6f-62b2ccff5ade.png diff --git a/docs/nodes/list_struct/flip.rst b/docs/nodes/list_struct/flip.rst index 58d0b31fad..3eaf0ec657 100644 --- a/docs/nodes/list_struct/flip.rst +++ b/docs/nodes/list_struct/flip.rst @@ -41,9 +41,9 @@ Outputs Examples -------- -.. image:: https://user-images.githubusercontent.com/14288520/187999021-e519b2c7-2718-46e6-86ac-e19d8cea2283.png +.. image:: https://user-images.githubusercontent.com/14288520/189832406-cbcd682e-268a-4cae-989c-5d9c06659089.png + :target: https://user-images.githubusercontent.com/14288520/189832406-cbcd682e-268a-4cae-989c-5d9c06659089.png :alt: flip - :target: https://user-images.githubusercontent.com/14288520/187999021-e519b2c7-2718-46e6-86ac-e19d8cea2283.png * Script-> :doc:`Formula ` * List->List Main-> :doc:`List Join ` diff --git a/docs/nodes/list_struct/item_insert.rst b/docs/nodes/list_struct/item_insert.rst index 7e2a6db17d..d634dd93db 100644 --- a/docs/nodes/list_struct/item_insert.rst +++ b/docs/nodes/list_struct/item_insert.rst @@ -1,6 +1,9 @@ List Item Insert ================ +.. image:: https://user-images.githubusercontent.com/14288520/189765700-332fba58-4671-4508-8c86-0756934ef8fc.png + :target: https://user-images.githubusercontent.com/14288520/189765700-332fba58-4671-4508-8c86-0756934ef8fc.png + Functionality ------------- @@ -56,5 +59,11 @@ Examples Trying various inputs, adjusting the parameters, and piping the output to a *Debug Print* (or stethoscope) node will be the fastest way to acquaint yourself with the inner workings of the *List Item Insert* Node. -.. image:: https://github.com/vicdoval/sverchok/raw/docs_images/images_for_docs/list_struct/list_item_insert/list_item_insert.png - :alt: insert_item_in_list_sverchok_blender_example.png \ No newline at end of file +.. image:: https://user-images.githubusercontent.com/14288520/189765911-020958bb-b660-46fd-a635-8616858cecb6.png + :target: https://user-images.githubusercontent.com/14288520/189765911-020958bb-b660-46fd-a635-8616858cecb6.png + +* Generator-> :doc:`Line ` +* Number-> :doc:`List Input ` +* Vector-> :doc:`Vector Math ` +* List->List Struct-> :doc:`List Item ` +* Viz-> :doc:`Viewer Draw ` \ No newline at end of file diff --git a/docs/nodes/list_struct/sort.rst b/docs/nodes/list_struct/sort.rst index 9d68f10c5b..3817338291 100644 --- a/docs/nodes/list_struct/sort.rst +++ b/docs/nodes/list_struct/sort.rst @@ -62,7 +62,7 @@ Sorting a List of Objects: .. image:: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/list_struct/sort/list_sort_sverchok_blender_example_01.png :target: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/list_struct/sort/list_sort_sverchok_blender_example_01.png -* Scene-> :doc:`Objects In ` +* Scene-> :doc:`Objects In Lite ` * Number-> :doc:`List Input ` * Text-> :doc:`Stethoscope ` diff --git a/docs/nodes/logic/custom_switcher.rst b/docs/nodes/logic/custom_switcher.rst index fc17a82936..04a58a969f 100644 --- a/docs/nodes/logic/custom_switcher.rst +++ b/docs/nodes/logic/custom_switcher.rst @@ -47,4 +47,4 @@ Examples .. image:: https://user-images.githubusercontent.com/28003269/59654477-5d285100-91a7-11e9-8a9b-f436d6de57db.gif -.. image:: https://user-images.githubusercontent.com/28003269/59654483-644f5f00-91a7-11e9-92cb-70da3cc641b0.png \ No newline at end of file +.. image:: https://user-images.githubusercontent.com/28003269/59654483-644f5f00-91a7-11e9-92cb-70da3cc641b0.png diff --git a/docs/nodes/logic/evolver.rst b/docs/nodes/logic/evolver.rst index fe4ff52254..81945ef6c4 100644 --- a/docs/nodes/logic/evolver.rst +++ b/docs/nodes/logic/evolver.rst @@ -1,6 +1,9 @@ Evolver ======= +.. image:: https://user-images.githubusercontent.com/14288520/189763466-4ab9972b-505c-4a79-a8e4-11c5a5c69181.png + :target: https://user-images.githubusercontent.com/14288520/189763466-4ab9972b-505c-4a79-a8e4-11c5a5c69181.png + This node implements a Genetics Algorithm system inspired in Galapagos (the Grasshopper plugin) and the 9th chapter of "The Nature of Code" by Daniel Shiffman https://natureofcode.com/book/chapter-9-the-evolution-of-code/ The system creates a starting population, evaluates the fitness of each "agent" and creates a new population bases on the crossover of the fitter agents and a mutation chance. The new population is evaluated and mixed every iteration rising the global fitness of the population by generating fitter agents. @@ -78,11 +81,42 @@ Examples Solved problem: Which is the smallest box (as the sum of faces area) in which I can fit Suzanne mesh? .. image:: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/logic/evolver/evolver_genetics_algorithm_sverchok_blender_example_01.png + :target: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/logic/evolver/evolver_genetics_algorithm_sverchok_blender_example_01.png + +* Transform-> :doc:`Rotate ` +* Analyzers-> :doc:`Bounding Box ` +* Analyzers-> :doc:`Area ` +* Number-> :doc:`A Number ` +* Matrix-> :doc:`Matrix Apply (verts) ` +* Viz-> :doc:`Viewer Draw ` +* Text-> :doc:`Stethoscope ` +* Scene-> :doc:`Objects In Lite ` Solved problem: Where is the point where the minimum distance to a set of points is closest to the maximum distance? .. image:: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/logic/evolver/evolver_genetics_algorithm_sverchok_blender_example_02.png + :target: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/logic/evolver/evolver_genetics_algorithm_sverchok_blender_example_02.png + +* Generator-> :doc:`Circle ` +* Generator-> :doc:`NGon ` +* Analyzers-> :doc:`Distance ` +* Number-> :doc:`A Number ` +* SUB X: Number-> :doc:`Scalar Math ` +* Vector-> :doc:`Vector In ` +* List->List Main-> :doc:`List Math ` +* Viz-> :doc:`Viewer Draw ` +* Text-> :doc:`Stethoscope ` Solved problem: Which is the shortest path that cycles through all the points? .. image:: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/logic/evolver/evolver_genetics_algorithm_sverchok_blender_example_03.png + :target: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/logic/evolver/evolver_genetics_algorithm_sverchok_blender_example_03.png + +* Analyzers-> :doc:`Path Length ` +* Generator-> :doc:`Circle ` +* Number-> :doc:`Random Vector ` +* Number-> :doc:`List Input ` +* Vector-> :doc:`Vector Rewire ` +* List->List Struct-> :doc:`List Item ` +* Viz-> :doc:`Viewer Draw ` +* Text-> :doc:`Stethoscope ` \ No newline at end of file diff --git a/docs/nodes/logic/genes_holder.rst b/docs/nodes/logic/genes_holder.rst index 83613e76fe..c14fa45993 100644 --- a/docs/nodes/logic/genes_holder.rst +++ b/docs/nodes/logic/genes_holder.rst @@ -1,6 +1,9 @@ Genes Holder ============ +.. image:: https://user-images.githubusercontent.com/14288520/189763727-88587af2-16a5-4cc8-9368-be6a089d9b64.png + :target: https://user-images.githubusercontent.com/14288520/189763727-88587af2-16a5-4cc8-9368-be6a089d9b64.png + This node stores a list of values (Integers, Floats or Vectors) that can be modified by the Evolver Node into the Genetics algorithm system. The node will keep the data and wont be affected by the regular updates. @@ -8,39 +11,31 @@ The node will keep the data and wont be affected by the regular updates. Parameters ---------- -**Data type**: Integers (Int), Floats or Vectors - -**Variation Mode**: Order and Range. In Order mode the variation will be made by changing the order of the elements. In Range Mode the variation will be made by variating each element among the defined range(s) - -**Min**: Minimum value a gene can have. Only in "Range" mode - -**Maximum**: Maximum value a gene can have. Note that with the Integers this number will never be reached so to get a "Boolean" genes the maximum should be 2 to get values from 0 to 1. Only in "Range" mode - -**Population amount**: Number of members of the population. - -**Iterations**: Iterations of the system - -**Random Seed**: Random Seed used in the system, this affects the initial population and the crossover and mutation process. +* **Data type**: Integers (Int), Floats or Vectors +* **Variation Mode**: Order and Range. In Order mode the variation will be made by changing the order of the elements. In Range Mode the variation will be made by variating each element among the defined range(s) +* **Min**: Minimum value a gene can have. Only in "Range" mode +* **Maximum**: Maximum value a gene can have. Note that with the Integers this number will never be reached so to get a "Boolean" genes the maximum should be 2 to get values from 0 to 1. Only in "Range" mode +* **Population amount**: Number of members of the population. +* **Iterations**: Iterations of the system +* **Random Seed**: Random Seed used in the system, this affects the initial population and the crossover and mutation process. Operators --------- -**Reset**: This will reset the memory of the node filling it with random values or values coming from the input socket +* **Reset**: This will reset the memory of the node filling it with random values or values coming from the input socket Inputs ------ -**Numbers**: Input to fill the memory of the node with numbers. - -**Vectors**: Input to fill the memory of the node with vectors. - -**Bounding Box**: Input to stablish the boundaries of the vectors (when generating the Evolver population). Only in "Range" mode +* **Numbers**: Input to fill the memory of the node with numbers. +* **Vectors**: Input to fill the memory of the node with vectors. +* **Bounding Box**: Input to stablish the boundaries of the vectors (when generating the Evolver population). Only in "Range" mode Outputs ------- -**Numbers / Vectors**: Outputs memory of the node +* **Numbers / Vectors**: Outputs memory of the node Examples -------- @@ -48,3 +43,13 @@ Examples Solved problem: Which is the shortest path that cycles through all the points?. Note that this problem with 20 points has over 2 trillions of solutions, the Genetics Algorithm offers the best solution in a defined time .. image:: https://user-images.githubusercontent.com/10011941/84772313-113b0280-afdb-11ea-89ec-971d19aee2cc.png + :target: https://user-images.githubusercontent.com/10011941/84772313-113b0280-afdb-11ea-89ec-971d19aee2cc.png + +* Analyzers-> :doc:`Path Length ` +* Modifiers->Modifier Make-> :doc:`UV Connection ` +* Number-> :doc:`Number Range ` +* Number-> :doc:`Random Vector ` +* List->List Struct-> :doc:`List Item ` +* Logic-> :doc:`Evolver ` +* Viz-> :doc:`Viewer Draw ` +* Text-> :doc:`Stethoscope ` diff --git a/docs/nodes/logic/input_switch_mod.rst b/docs/nodes/logic/input_switch_mod.rst index 7c14d16b02..7835fd5e1a 100644 --- a/docs/nodes/logic/input_switch_mod.rst +++ b/docs/nodes/logic/input_switch_mod.rst @@ -1,6 +1,9 @@ Input Switch ------------ +.. image:: https://user-images.githubusercontent.com/14288520/189748974-515ced31-f55e-4125-8593-dd2c97b93d1e.png + :target: https://user-images.githubusercontent.com/14288520/189748974-515ced31-f55e-4125-8593-dd2c97b93d1e.png + This node allows switching among an arbitrary number of sets of any type of inputs connected to the node. Inputs @@ -28,19 +31,20 @@ Parameters The **Selected** parameter accepts single input values directly from the node or from an outside node. The value is sanitized to be bounded by the number N of the connected inputs (0, N-1). In fact, the value is converted via a modulo-N function to wrap around within (0, N-1) range for values larger than N. In other words, as the **Selected** value increases, the node essentially cycles through the connected sets as it picks one to be sent to the output. -+--------------+-------+---------+----------------------------------------------+ -| Param | Type | Default | Description | -+==============+=======+=========+==============================================+ -| **Set Size** | Int | 2 | The number of inputs in a set. [1][2][3] | -+--------------+-------+---------+----------------------------------------------+ -| **Selected** | Int | 0 | The index of the selected set to output. [4] | -+--------------+-------+---------+----------------------------------------------+ ++--------------+-------+---------+--------------------------------------------------+ +| Param | Type | Default | Description | ++==============+=======+=========+==================================================+ +| **Set Size** | Int | 2 | The number of inputs in a set. **[1][2][3]** | ++--------------+-------+---------+--------------------------------------------------+ +| **Selected** | Int | 0 | The index of the selected set to output. **[4]** | ++--------------+-------+---------+--------------------------------------------------+ Notes: -[1] : As the size of the set changes, the corresponding number of inputs are generated for each set with labels in increasing order (e.g. Lambda 1, Lambda 2, ... ). -[2] : When changing the set size, the existing connections of the input & output sockets to the outer nodes are being preserved, unless decreasing the set size renders some of the connected input & output sockets non-existent. -[3] : Currently the node limits the max set size to 9 since it is assumed it's unlikely the user may need sets larger than this. Not putting a limit on the size sets could end up creating very tall nodes. -[4] : The index 0 corresponds to the first set + +* **[1]** : As the size of the set changes, the corresponding number of inputs are generated for each set with labels in increasing order (e.g. Lambda 1, Lambda 2, ... ). +* **[2]** : When changing the set size, the existing connections of the input & output sockets to the outer nodes are being preserved, unless decreasing the set size renders some of the connected input & output sockets non-existent. +* **[3]** : Currently the node limits the max set size to 9 since it is assumed it's unlikely the user may need sets larger than this. Not putting a limit on the size sets could end up creating very tall nodes. +* **[4]** : The index 0 corresponds to the first set Extra Parameters diff --git a/docs/nodes/logic/logic_index.rst b/docs/nodes/logic/logic_index.rst index f42bbd50f3..9a386e4b98 100644 --- a/docs/nodes/logic/logic_index.rst +++ b/docs/nodes/logic/logic_index.rst @@ -6,12 +6,12 @@ Logic :maxdepth: 1 logic_node - neuro_elman - evolver - genes_holder switch_MK2 input_switch_mod + neuro_elman custom_switcher range_switch loop_in loop_out + evolver + genes_holder diff --git a/docs/nodes/logic/logic_node.rst b/docs/nodes/logic/logic_node.rst index d7ce6fb0ec..f74781cd9e 100644 --- a/docs/nodes/logic/logic_node.rst +++ b/docs/nodes/logic/logic_node.rst @@ -1,6 +1,9 @@ Logic Functions =============== +.. image:: https://user-images.githubusercontent.com/14288520/189692704-621b9c7d-f4a7-4950-9ad0-b44a69ed7162.png + :target: https://user-images.githubusercontent.com/14288520/189692704-621b9c7d-f4a7-4950-9ad0-b44a69ed7162.png + Functionality ------------- @@ -51,14 +54,14 @@ Advanced Parameters In the N-Panel (and on the right-click menu) you can find: -**Output NumPy**: Get NumPy arrays in stead of regular lists (makes the node faster). [Not available for GCD or Round-N] - -**List Match**: Define how list with different lengths should be matched. [Not available for GCD or Round-N] +* **Output NumPy**: Get NumPy arrays in stead of regular lists (makes the node faster). [Not available for GCD or Round-N] +* **List Match**: Define how list with different lengths should be matched. [Not available for GCD or Round-N] Example of usage ---------------- -.. image:: https://cloud.githubusercontent.com/assets/5990821/4333087/6b040a3e-3fdc-11e4-9693-7a00b0ce03bc.jpg +.. image:: https://user-images.githubusercontent.com/14288520/189728289-aa5a39d2-0e99-462f-8eb7-b2a771ee1b10.png + :target: https://user-images.githubusercontent.com/14288520/189728289-aa5a39d2-0e99-462f-8eb7-b2a771ee1b10.png In this example we use Logic with Switch Node to choose between two vectors depending on the logic output. diff --git a/docs/nodes/logic/loop_in.rst b/docs/nodes/logic/loop_in.rst index e78d55258a..7de95a6dde 100644 --- a/docs/nodes/logic/loop_in.rst +++ b/docs/nodes/logic/loop_in.rst @@ -1,6 +1,9 @@ Loop In ======= +.. image:: https://user-images.githubusercontent.com/14288520/189755574-a94546ed-4234-4f0c-8735-5792de2c4370.png + :target: https://user-images.githubusercontent.com/14288520/189755574-a94546ed-4234-4f0c-8735-5792de2c4370.png + This node in conjunction with the Loop out node can create loops with nodes Offers two different modes 'Range' and 'For Each' @@ -51,11 +54,42 @@ Examples Range mode example, Break used to control the maximum vertices. .. image:: https://user-images.githubusercontent.com/10011941/101332093-22234d00-3875-11eb-819a-68e86ef8c2c2.png + :target: https://user-images.githubusercontent.com/10011941/101332093-22234d00-3875-11eb-819a-68e86ef8c2c2.png + +* Generator-> :doc:`Box ` +* CA: Faces Area: Analyzers-> :doc:`Component Analyzer ` +* CAD-> :doc:`Inset Special ` +* Number-> :doc:`Random Num Gen ` +* MULT X: Number-> :doc:`Scalar Math ` +* List->List Struct-> :doc:`List Length ` +* BIG X:Logic-> :doc:`Logic Functions ` +* Logic-> :doc:`Logic Functions ` For Each mode example, Skip input used to mask the results. .. image:: https://user-images.githubusercontent.com/10011941/101334215-e047d600-3877-11eb-89df-cfaaf73dd427.png + :target: https://user-images.githubusercontent.com/10011941/101334215-e047d600-3877-11eb-89df-cfaaf73dd427.png + +* Generator-> :doc:`Box ` +* Transform-> :doc:`Noise Displace ` +* CA: Faces Area: Analyzers-> :doc:`Component Analyzer ` +* BIG X:Logic-> :doc:`Logic Functions ` +* Logic-> :doc:`Loop Out ` You can change the socket labels in the N-Panel .. image:: https://user-images.githubusercontent.com/10011941/101360702-519a7f80-389e-11eb-826d-0e1c5a7152d1.png + :target: https://user-images.githubusercontent.com/10011941/101360702-519a7f80-389e-11eb-826d-0e1c5a7152d1.png + +* Generator-> :doc:`Box ` +* CAD-> :doc:`Inset Special ` +* CA: Faces Area: Analyzers-> :doc:`Component Analyzer ` +* CA: Faces Center: Analyzers-> :doc:`Component Analyzer ` +* Modifier->Modifier Change-> :doc:`Smooth Vertices ` +* Number-> :doc:`Random Num Gen ` +* MUL X Number-> :doc:`Scalar Math ` +* Vector-> :doc:`Vector Noise ` +* List->List Struct-> :doc:`List Length ` +* BIG X:Logic-> :doc:`Logic Functions ` +* Logic-> :doc:`Loop Out ` +* Viz-> :doc:`Viewer Draw ` \ No newline at end of file diff --git a/docs/nodes/logic/loop_out.rst b/docs/nodes/logic/loop_out.rst index 3ba173584c..0ada68244f 100644 --- a/docs/nodes/logic/loop_out.rst +++ b/docs/nodes/logic/loop_out.rst @@ -1,6 +1,9 @@ Loop Out ======== +.. image:: https://user-images.githubusercontent.com/14288520/189755933-5fa724a2-a935-4487-b7cd-2983b8b0f69f.png + :target: https://user-images.githubusercontent.com/14288520/189755933-5fa724a2-a935-4487-b7cd-2983b8b0f69f.png + This node in conjunction with the Loop In node can create loops with nodes Offers two different modes 'Range' and 'For Each' @@ -9,17 +12,15 @@ Offers two different modes 'Range' and 'For Each' Operators --------- -**Create Loop In**: creates a Loop In node and links the Loop In - Loop Out socket. +* **Create Loop In**: creates a Loop In node and links the Loop In - Loop Out socket. Inputs ------ -**Loop Out**: Socket to link with the Loop Out node. - -**Break**: If a True value is inputted the loop will stop (Only if Loop In is in Range Mode). - -**Skip**: If a True value is inputted the loop the result wont be added to the output, like a internal mask. (Only if Loop In is in For Each Mode). +* **Loop Out**: Socket to link with the Loop Out node. +* **Break**: If a True value is inputted the loop will stop (Only if Loop In is in Range Mode). +* **Skip**: If a True value is inputted the loop the result wont be added to the output, like a internal mask. (Only if Loop In is in For Each Mode). Data0, Data1... if working on Range Mode inputs will be created copying the Loop in Outputs. If working in For Each mode they will be created when linking the Loop Out inputs @@ -35,5 +36,25 @@ Examples -------- .. image:: https://user-images.githubusercontent.com/10011941/101332093-22234d00-3875-11eb-819a-68e86ef8c2c2.png + :target: https://user-images.githubusercontent.com/10011941/101332093-22234d00-3875-11eb-819a-68e86ef8c2c2.png + +* Generator-> :doc:`Box ` +* CAD-> :doc:`Inset Special ` +* CA: Faces Area: Analyzers-> :doc:`Component Analyzer ` +* Number-> :doc:`Random Num Gen ` +* MUL X: Number-> :doc:`Scalar Math ` +* Logic-> :doc:`Loop In ` +* List->List Struct-> :doc:`List Length ` +* BIG X: Logic-> :doc:`Logic Functions ` +* Text-> :doc:`Stethoscope ` +* Viz-> :doc:`Viewer Draw ` .. image:: https://user-images.githubusercontent.com/10011941/101334215-e047d600-3877-11eb-89df-cfaaf73dd427.png + :target: https://user-images.githubusercontent.com/10011941/101334215-e047d600-3877-11eb-89df-cfaaf73dd427.png + +* Generator-> :doc:`Box ` +* Transform-> :doc:`Noise Displace ` +* CA: Faces Area: Analyzers-> :doc:`Component Analyzer ` +* BIG X: Logic-> :doc:`Logic Functions ` +* Logic-> :doc:`Loop In ` +* Viz-> :doc:`Viewer Draw ` \ No newline at end of file diff --git a/docs/nodes/logic/neuro_elman.rst b/docs/nodes/logic/neuro_elman.rst index 289f7a3f49..e6e8aa36fd 100644 --- a/docs/nodes/logic/neuro_elman.rst +++ b/docs/nodes/logic/neuro_elman.rst @@ -101,6 +101,11 @@ Please, study for XOR operation: ~~~~~~~~~~~~~~~~ .. image:: ../../assets/nodes/logic/neuro_data_in.png + +* List->List Main-> :doc:`List Delete Levels ` +* Text-> :doc:`Viewer Text MK3 ` +* Script-> :doc:`Formula ` + .. image:: ../../assets/nodes/logic/neuro_data_in_text.png Same with expected data: @@ -108,6 +113,9 @@ Same with expected data: .. image:: ../../assets/nodes/logic/neuro_etalon.png +* List->List Main-> :doc:`List Delete Levels ` +* Script-> :doc:`Formula ` + **Node preparations** ~~~~~~~~~~~~~~~~~~~~~ @@ -117,6 +125,9 @@ Same with expected data: .. image:: ../../assets/nodes/logic/neuro_ansumble.png +* List->List Main-> :doc:`List Delete Levels ` +* Script-> :doc:`Formula ` + Running learning and waiting. Interrupt Studying. I had have that result: """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -126,3 +137,7 @@ Compare result: """"""""""""""" .. image:: ../../assets/nodes/logic/neuro_result.png + +* List->List Main-> :doc:`List Delete Levels ` +* Text-> :doc:`Viewer Text MK3 ` +* Script-> :doc:`Formula ` \ No newline at end of file diff --git a/docs/nodes/logic/range_switch.rst b/docs/nodes/logic/range_switch.rst index 0a09e15605..83568b66a3 100644 --- a/docs/nodes/logic/range_switch.rst +++ b/docs/nodes/logic/range_switch.rst @@ -1,6 +1,9 @@ Range Switch ============ +.. image:: https://user-images.githubusercontent.com/14288520/189755062-b5dd1b4e-f6a4-4ab3-8764-650d4a782ce9.png + :target: https://user-images.githubusercontent.com/14288520/189755062-b5dd1b4e-f6a4-4ab3-8764-650d4a782ce9.png + Functionality ------------- @@ -13,11 +16,12 @@ Inputs All inputs will accept single or multiple values. - **Value** -- **Boundary1** [1] -- **Boundary2** [1] +- **Boundary1** **[1]** +- **Boundary2** **[1]** Notes: -[1] : The boundary values do not have to be in increasing order or absolute. + +* **[1]** : The boundary values do not have to be in increasing order or absolute. Parameters @@ -47,7 +51,7 @@ The **Mode** parameter allows to select one of the three switch modes: **Inside +------------------+---------------+--------------+----------------------------------+ | Param | Type | Default | Description | +==================+===============+==============+==================================+ -| **Mode** | Enum | Pass Through | The switching mode [1] | +| **Mode** | Enum | Pass Through | The switching mode **[1]** | | | Inside ON | | | | | Inside OFF | | | | | Pass Through | | | @@ -60,7 +64,8 @@ The **Mode** parameter allows to select one of the three switch modes: **Inside +------------------+---------------+--------------+----------------------------------+ Notes: -[1] : When the mode is **Pass Through** a "Toggle State" button becomes available to allow you to set the initial state of the switch. + +**[1]** : When the mode is **Pass Through** a "Toggle State" button becomes available to allow you to set the initial state of the switch. Outputs diff --git a/docs/nodes/logic/switch_MK2.rst b/docs/nodes/logic/switch_MK2.rst index d7143e4aa4..9a6620a9c6 100644 --- a/docs/nodes/logic/switch_MK2.rst +++ b/docs/nodes/logic/switch_MK2.rst @@ -1,7 +1,8 @@ Switch ====== -.. image:: https://user-images.githubusercontent.com/28003269/71510839-aae5ea80-28a9-11ea-8511-a185fe337206.png +.. image:: https://user-images.githubusercontent.com/14288520/189731409-413d3278-54d4-4474-be18-90d959f0cbbf.png + :target: https://user-images.githubusercontent.com/14288520/189731409-413d3278-54d4-4474-be18-90d959f0cbbf.png Functionality ------------- @@ -40,29 +41,64 @@ Usage **Generation of bool sequence easily:** -.. image:: https://user-images.githubusercontent.com/28003269/39827448-f8d6c08c-53c8-11e8-864e-b72afd67befb.png +.. image:: https://user-images.githubusercontent.com/14288520/189741094-76efb8cf-bc66-4887-b486-7627cd714007.png + :target: https://user-images.githubusercontent.com/14288520/189741094-76efb8cf-bc66-4887-b486-7627cd714007.png + +* Number-> :doc:`Random Num Gen ` +* Text-> :doc:`Stethoscope ` **Working with different types of data:** -.. image:: https://user-images.githubusercontent.com/28003269/39925828-3fc466fe-553e-11e8-861e-f3e3dfbfc92a.png +.. image:: https://user-images.githubusercontent.com/14288520/189732804-2d8be7a3-ba0c-435f-9ef6-605b5044ec3c.png + :target: https://user-images.githubusercontent.com/14288520/189732804-2d8be7a3-ba0c-435f-9ef6-605b5044ec3c.png + +* Scene-> :doc:`Objects In Lite ` +* Text-> :doc:`Stethoscope ` + +.. image:: https://user-images.githubusercontent.com/14288520/189732604-c36ab6c1-bbb4-4eee-b745-de5cc8e1b52e.gif + :target: https://user-images.githubusercontent.com/14288520/189732604-c36ab6c1-bbb4-4eee-b745-de5cc8e1b52e.gif **It is possible to deal with empty objects:** -.. image:: https://user-images.githubusercontent.com/28003269/39926724-225bc0b4-5541-11e8-974f-6efebb68392e.png +.. image:: https://user-images.githubusercontent.com/14288520/189734577-f30d7df8-ef03-4469-9a7a-09f9fd7689fa.png + :target: https://user-images.githubusercontent.com/14288520/189734577-f30d7df8-ef03-4469-9a7a-09f9fd7689fa.png + +* Number-> :doc:`Random Num Gen ` +* Number-> :doc:`Number Range ` +* List-> :doc:`Filter Empty Objects ` +* List->List Main-> :doc:`List Join ` +* List->List Struct-> :doc:`List Split ` +* Text-> :doc:`Stethoscope ` +* Script-> :doc:`Formula ` **Using as filter:** -.. image:: https://user-images.githubusercontent.com/28003269/39926961-dccbb1f2-5541-11e8-8337-281510eec5d8.png +.. image:: https://user-images.githubusercontent.com/14288520/189739541-753f27e2-7129-4fe7-bc29-ce49637f9491.png + :target: https://user-images.githubusercontent.com/14288520/189739541-753f27e2-7129-4fe7-bc29-ce49637f9491.png + +* Number-> :doc:`Number Range ` +* MODULO X, EQUAL: Number-> :doc:`Scalar Math ` +* Text-> :doc:`Stethoscope ` It has supporting of numpy arrays. Output is related with input from socket A and socket B. Output will be numpy array if at least one input sockets (A or B) has numpy array and another socket does not have list with two or more values. -.. image:: https://user-images.githubusercontent.com/28003269/69896932-219cd000-135e-11ea-9e99-93def391466b.png +.. image:: https://user-images.githubusercontent.com/14288520/189739875-0cd27fc9-3e36-48fd-9b5a-e29de6cd2ff9.png + :target: https://user-images.githubusercontent.com/14288520/189739875-0cd27fc9-3e36-48fd-9b5a-e29de6cd2ff9.png + +* Number-> :doc:`Random Num Gen ` +* Number-> :doc:`A Number ` +* Text-> :doc:`Stethoscope ` **Alternative of list mask out node:** -.. image:: https://user-images.githubusercontent.com/28003269/69903773-791b5a00-13b7-11ea-8210-0c73a46cae77.png +.. image:: https://user-images.githubusercontent.com/14288520/189739962-68fc989e-38e6-4845-bc7f-dd473708308e.png + :target: https://user-images.githubusercontent.com/14288520/189739962-68fc989e-38e6-4845-bc7f-dd473708308e.png + +* Number-> :doc:`Random Num Gen ` +* List-> :doc:`List Mask (Out) ` +* Text-> :doc:`Stethoscope ` Working inside and outside of object level ------------------------------------------ @@ -70,8 +106,21 @@ Working inside and outside of object level Something unexpected can be with none iterable objects like matrix or Blender objects. On the picture below it can be expected that switch should add first matrix and second quaternion: -.. image:: https://user-images.githubusercontent.com/28003269/69897081-1054c300-1360-11ea-80de-0aac8f310633.png +.. image:: https://user-images.githubusercontent.com/14288520/189740102-41008bb1-8b2e-4abf-bc82-2d5bdef8de97.png + :target: https://user-images.githubusercontent.com/14288520/189740102-41008bb1-8b2e-4abf-bc82-2d5bdef8de97.png + +* Number-> :doc:`Random Num Gen ` +* Number-> :doc:`Random Vector ` +* Matrix-> :doc:`Matrix In ` +* Text-> :doc:`Stethoscope ` but for this states input should have values on first object level not on second data level: -.. image:: https://user-images.githubusercontent.com/28003269/69897085-38dcbd00-1360-11ea-8939-b6910445e5eb.png \ No newline at end of file +.. image:: https://user-images.githubusercontent.com/14288520/189740124-1ab19668-bf50-4f62-926a-7900cb8dbea1.png + :target: https://user-images.githubusercontent.com/14288520/189740124-1ab19668-bf50-4f62-926a-7900cb8dbea1.png + +* Number-> :doc:`Random Num Gen ` +* Number-> :doc:`Random Vector ` +* Matrix-> :doc:`Matrix In ` +* Text-> :doc:`Stethoscope ` +* List->List Struct-> :doc:`List Sort ` \ No newline at end of file diff --git a/docs/nodes/number/oscillator.rst b/docs/nodes/number/oscillator.rst index 58a45c6fcd..d3feda0b2c 100644 --- a/docs/nodes/number/oscillator.rst +++ b/docs/nodes/number/oscillator.rst @@ -81,7 +81,7 @@ The "Wave" mode allows you to use a custom wave shape: :target: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/number/Oscillator/Oscillator_example_02.png * Generator-> :doc:`Line ` -* Number-> :doc:`Random Vector ` +* Number-> :doc:`Random Vector ` * Vector-> :doc:`Vector Out ` * Vector-> :doc:`Vector Rewire ` * Viz-> :doc:`Viewer Draw ` diff --git a/docs/nodes/quaternion/rotation_difference.rst b/docs/nodes/quaternion/rotation_difference.rst index 0cceda16c8..34c1173afe 100644 --- a/docs/nodes/quaternion/rotation_difference.rst +++ b/docs/nodes/quaternion/rotation_difference.rst @@ -45,7 +45,7 @@ First vector of the node is initial direction of monkey head, second one is dire :target: https://user-images.githubusercontent.com/28003269/72435614-ecd2c400-37b7-11ea-80f2-176a0d1df5ee.png * Generator-> :doc:`Suzanne ` -* Scene-> :doc:`Objects In ` +* Scene-> :doc:`Objects In Lite ` * Matrix-> :doc:`Matrix Out ` * Quaternion-> :doc:`Quaternion Out ` * Viz-> :doc:`Viewer Draw ` @@ -60,7 +60,7 @@ Also it is possible to make movements of monkey head more natural by applying Z :target: https://user-images.githubusercontent.com/28003269/72444577-b7cf6d00-37c9-11ea-8052-0be2fa3de938.png * Generator-> :doc:`Suzanne ` -* Scene-> :doc:`Objects In ` +* Scene-> :doc:`Objects In Lite ` * Component-Wise: Vector-> :doc:`Vector Math ` * Quaternion-> :doc:`Quaternion Out ` * Quaternion Multiply: Quaternion-> :doc:`Quaternion Math ` diff --git a/docs/nodes/vector/interpolation_stripes.rst b/docs/nodes/vector/interpolation_stripes.rst index 14970e1fca..c81be03f7f 100644 --- a/docs/nodes/vector/interpolation_stripes.rst +++ b/docs/nodes/vector/interpolation_stripes.rst @@ -64,7 +64,7 @@ Making surface with stripes separated in two groups of nodes for UVconnect node * Number-> :doc:`A Number ` * Number-> :doc:`Number Range ` * Vector-> :doc:`Vector In ` -* Scene-> :doc:`Objects In ` +* Scene-> :doc:`Objects In Lite ` .. image:: https://user-images.githubusercontent.com/14288520/189498715-ce12c260-ea62-46de-8a03-c304b6ccedd0.png :target: https://user-images.githubusercontent.com/14288520/189498715-ce12c260-ea62-46de-8a03-c304b6ccedd0.png diff --git a/docs/nodes/vector/quad_grid.rst b/docs/nodes/vector/quad_grid.rst index 97d75797ab..8a48689e77 100644 --- a/docs/nodes/vector/quad_grid.rst +++ b/docs/nodes/vector/quad_grid.rst @@ -74,7 +74,7 @@ Take manually subdivided plane (on the left) and sort it's vertices: * Transform-> :doc:`Move ` * Viz-> :doc:`Viewer Draw ` * Viz-> :doc:`Viewer Index+ ` -* Scene-> :doc:`Objects In ` +* Scene-> :doc:`Objects In Lite ` Use together with "Build NURBS Surface" node: @@ -84,4 +84,4 @@ Use together with "Build NURBS Surface" node: * Surface-> :doc:`Build Nurbs Surface ` * Surface-> :doc:`Evaluate Surface ` * Viz-> :doc:`Viewer Draw ` -* Scene-> :doc:`Objects In ` \ No newline at end of file +* Scene-> :doc:`Objects In Lite ` \ No newline at end of file diff --git a/docs/nodes/vector/vector_rewire.rst b/docs/nodes/vector/vector_rewire.rst index 5349e2ef6c..33f5049284 100644 --- a/docs/nodes/vector/vector_rewire.rst +++ b/docs/nodes/vector/vector_rewire.rst @@ -14,7 +14,7 @@ Use this node to swap Vector components, for instance pass X to Y (and Y to X ). :alt: with vector rewire * Vector-> :doc:`Vector Noise ` -* Scene-> :doc:`Objects In ` +* Scene-> :doc:`Objects In Lite ` * Viz-> :doc:`Viewer Draw ` Inputs diff --git a/nodes/logic/input_switch_mod.py b/nodes/logic/input_switch_mod.py index 085f6c71f3..49409bc43d 100644 --- a/nodes/logic/input_switch_mod.py +++ b/nodes/logic/input_switch_mod.py @@ -46,7 +46,7 @@ def get_indices_for_groupnum(node, group_lookup): class SvInputSwitchNodeMOD(bpy.types.Node, SverchCustomTreeNode): """ Triggers: Sets, Switch, Select - Tooltip: Switch among multiple input sets + Tooltip: Switch among multiple input sets.\n\tInSelected (int), Alpha_N, Beta_N,... Omega_N\n\tParams: Num Socket Per Set [2]\n\tOut: Data 0, Data 1,... Data N auto expanding feature: determined by "any_sockets_of_last_input_set_connected" till last visible is max groups diff --git a/nodes/logic/logic_node.py b/nodes/logic/logic_node.py index 1c68c1e850..418b687924 100644 --- a/nodes/logic/logic_node.py +++ b/nodes/logic/logic_node.py @@ -26,25 +26,25 @@ from sverchok.utils.sv_itertools import recurse_f_level_control -Item = namedtuple('Item', ['name', 'arg_number', 'func']) +Item = namedtuple('Item', ['name', 'arg_number', 'func', 'description']) functions = { - "AND": Item("And", 2, lambda x: np.logical_and(x[0], x[1]), ), - "OR": Item("Or", 2, lambda x: np.logical_or(x[0], x[1]), ), - "IF": Item("If", 1, lambda x: x[0].astype(bool), ), - "NOT": Item("Not", 1, lambda x: np.logical_not(x[0]), ), - "NAND": Item("Nand", 2, lambda x: np.logical_not(np.logical_and(x[0], x[1])),), - "NOR": Item("Nor", 2, lambda x: np.logical_not(np.logical_or(x[0], x[1])), ), - "XOR": Item("Xor", 2, lambda x: np.logical_xor(x[0], x[1]), ), - "XNOR": Item("Xnor", 2, lambda x: np.logical_not(np.logical_xor(x[0], x[1])),), - "LESS": Item("<", 2, lambda x: x[0] < x[1], ), - "BIG": Item(">", 2, lambda x: x[0] > x[1], ), - "EQUAL": Item("==", 2, lambda x: x[0] == x[1], ), - "NOT_EQ": Item("!=", 2, lambda x: x[0] != x[1], ), - "LESS_EQ": Item("<=", 2, lambda x: x[0] <= x[1], ), - "BIG_EQ": Item(">=", 2, lambda x: x[0] >= x[1], ), - "TRUE": Item("True", 0, lambda x: np.array([True]), ), - "FALSE": Item("False", 0, lambda x: np.array([False]), ), + "AND": Item("And", 2, lambda x: np.logical_and(x[0], x[1]), "True if X and Y are True"), + "OR": Item("Or", 2, lambda x: np.logical_or(x[0], x[1]), "True if X or Y are True"), + "IF": Item("If", 1, lambda x: x[0].astype(bool), "True if X is True"), + "NOT": Item("Not", 1, lambda x: np.logical_not(x[0]), "True if X is False"), + "NAND": Item("Nand", 2, lambda x: np.logical_not(np.logical_and(x[0], x[1])), "True if X or Y are False"), + "NOR": Item("Nor", 2, lambda x: np.logical_not(np.logical_or(x[0], x[1])), "True if X and Y are False"), + "XOR": Item("Xor", 2, lambda x: np.logical_xor(x[0], x[1]), "True if X and Y are opposite"), + "XNOR": Item("Xnor", 2, lambda x: np.logical_not(np.logical_xor(x[0], x[1])), "True if X and Y are equals"), + "LESS": Item("<", 2, lambda x: x[0] < x[1], "True if X < Y"), + "BIG": Item(">", 2, lambda x: x[0] > x[1], "True if X > Y"), + "EQUAL": Item("==", 2, lambda x: x[0] == x[1], "True if X = Y"), + "NOT_EQ": Item("!=", 2, lambda x: x[0] != x[1], "True if X not = Y"), + "LESS_EQ": Item("<=", 2, lambda x: x[0] <= x[1], "True if X <= Y"), + "BIG_EQ": Item(">=", 2, lambda x: x[0] >= x[1], "True if X >= Y"), + "TRUE": Item("True", 0, lambda x: np.array([True]), "Result is Always True"), + "FALSE": Item("False", 0, lambda x: np.array([False]), "Result is Always False"), } @@ -69,13 +69,17 @@ def logic_numpy(params, constant, matching_f): class SvLogicNodeMK2(SverchCustomTreeNode, bpy.types.Node): - '''And, Or, If, <, >..''' + '''And, Or, If, <, >.. + Logic functions: And/Or/If/Not/Nand/Nor/Xor//==/!=/<=/>=/True/False + In: A, B + Out: Result (boolean) + ''' bl_idname = 'SvLogicNodeMK2' bl_label = 'Logic Functions' bl_icon = 'NONE' #'LOGIC' sv_icon = 'SV_LOGIC' - func_names = [(n, i.name, '')for n, i in functions.items()] + func_names = [(n, i.name, i.name+": "+i.description)for n, i in functions.items()] def change_function(self, context): arg_number = functions[self.function_name].arg_number @@ -123,11 +127,11 @@ def migrate_from(self, old_node): self.inputs['B'].default_property_type = 'float' if old_node.prop_types[1] else 'int' def sv_init(self, context): - a = self.inputs.new('SvStringsSocket', "A") + a = self.inputs.new('SvStringsSocket', 'A') a.use_prop = True a.show_property_type = True a.default_property_type = 'int' - b = self.inputs.new('SvStringsSocket', "B") + b = self.inputs.new('SvStringsSocket', 'B') b.use_prop = True b.show_property_type = True b.default_property_type = 'int' diff --git a/nodes/logic/switch_MK2.py b/nodes/logic/switch_MK2.py index f8c3835134..ca34b29a58 100644 --- a/nodes/logic/switch_MK2.py +++ b/nodes/logic/switch_MK2.py @@ -83,9 +83,7 @@ def switch_data_np(states, a, b): class SvSwitchNodeMK2(bpy.types.Node, SverchCustomTreeNode): """ Triggers: Switch MK2 - Tooltip: This version is more clever of previous one - - You can deal with empty data connected to input sockets (True or False) + Tooltip: You can deal with empty data connected to input sockets (True or False).\n\tIn: state True/[False], A(_N), B(_N)\n\tExtra Params: in/out input number [1]\n\tOut(_N): A(_N)/B(_N) """ bl_idname = 'SvSwitchNodeMK2' bl_label = 'Switch'