Skip to content

Commit

Permalink
Merge pull request #4931 from nortikin/update_menu_nodes_comments_40
Browse files Browse the repository at this point in the history
Some Surfaces nodes:
- Adaptive Tessellate Surface
- Tessellate & Trim Surface
- Evaluate Surface
  • Loading branch information
satabol authored Jun 25, 2023
2 parents 8f646ea + a18fa88 commit 49f7c9c
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/nodes/surface/adaptive_tessellate.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Adaptive Tessellate Surface
===========================

.. image:: https://github.com/nortikin/sverchok/assets/14288520/caf1b655-26d2-44ec-8d58-600bc9be0832
:target: https://github.com/nortikin/sverchok/assets/14288520/caf1b655-26d2-44ec-8d58-600bc9be0832

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

Expand Down Expand Up @@ -162,14 +165,16 @@ right: the same surface with adaptive tessellation. Each of these meshes has
(nearly) the same count of triangles - 41K.

.. image:: https://user-images.githubusercontent.com/284644/80983371-eb500900-8e45-11ea-93ad-50ccee371bb3.png

:target: https://user-images.githubusercontent.com/284644/80983371-eb500900-8e45-11ea-93ad-50ccee371bb3.png

Notice how much smoother the bumps are on the right mesh. Also notice the sharp
edges around the bumps - they are made by explicitly defining the points where
they should be (by use of **AddUVPoints** input).

The same pictue with wireframe display enabled:

.. image:: https://user-images.githubusercontent.com/284644/80921813-14af5d00-8d92-11ea-9038-b504a176b7fe.png
:target: https://user-images.githubusercontent.com/284644/80921813-14af5d00-8d92-11ea-9038-b504a176b7fe.png

Notice that on the left, the mesh has a lot of subdivisions in the flat part,
where they are not at all necessary. The right mesh has much less subdivisions
Expand All @@ -178,24 +183,29 @@ in flat parts, and much more on the bumps.
A simpler example, with one bump and no additional points used:

.. image:: https://user-images.githubusercontent.com/284644/80983350-e68b5500-8e45-11ea-8c91-50f56adbc0fe.png
:target: https://user-images.githubusercontent.com/284644/80983350-e68b5500-8e45-11ea-8c91-50f56adbc0fe.png

Use of the node with formula-defined surface, with only **By Curvature**
parameter enabled. Notice that there are more subdivisions in the places where
the surface is bent:

.. image:: https://user-images.githubusercontent.com/284644/80983355-e7bc8200-8e45-11ea-8007-d3b6469d4f61.png
:target: https://user-images.githubusercontent.com/284644/80983355-e7bc8200-8e45-11ea-8007-d3b6469d4f61.png

The same surface with only **By Area** parameter enabled. Here there are more
subdivisions in places where the surface is stretched (but it is almost flat at
these places):

.. image:: https://user-images.githubusercontent.com/284644/80983357-e8551880-8e45-11ea-8f2c-881beebe8d39.png
:target: https://user-images.githubusercontent.com/284644/80983357-e8551880-8e45-11ea-8f2c-881beebe8d39.png

And with both parameters enabled at the same time:

.. image:: https://user-images.githubusercontent.com/284644/80983360-e8edaf00-8e45-11ea-8af5-8f86334ef066.png
:target: https://user-images.githubusercontent.com/284644/80983360-e8edaf00-8e45-11ea-8af5-8f86334ef066.png

An example of the **TrimCurve** input usage:

.. image:: https://user-images.githubusercontent.com/284644/80983363-e9864580-8e45-11ea-8dc9-f656108177a4.png
:target: https://user-images.githubusercontent.com/284644/80983363-e9864580-8e45-11ea-8dc9-f656108177a4.png

48 changes: 48 additions & 0 deletions docs/nodes/surface/evaluate_surface.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
Evaluate Surface
================

.. image:: https://github.com/nortikin/sverchok/assets/14288520/27b50740-2618-43a9-895f-5959999b3112
:target: https://github.com/nortikin/sverchok/assets/14288520/27b50740-2618-43a9-895f-5959999b3112

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

This node calculates points on the Surface corresponding to provided values of
U and V surface parameters. The values of U and V can be either provided
explicitly, or generated by the node to generate cartesian (rectangular) grid.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/d46ddda8-0071-4e4e-84e4-147a44d29f59
:target: https://github.com/nortikin/sverchok/assets/14288520/d46ddda8-0071-4e4e-84e4-147a44d29f59

Inputs
------

Expand All @@ -17,15 +23,42 @@ This node has the following inputs:
* **U**, **V**. Values of U and V surface parameter. These inputs are available
only when the **Evaluate** parameter is set to **Explicit**, and **Input
mode** parameter is set to **Separate**. The default value is 0.5.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/b1d38112-9166-4889-bad7-0db5a6f76f2b
:target: https://github.com/nortikin/sverchok/assets/14288520/b1d38112-9166-4889-bad7-0db5a6f76f2b

* Surfaces-> :doc:`Minimal Surface from Curve </nodes/surface/min_surface_from_curve>`
* Surfaces-> :doc:`Surface Domain </nodes/surface/surface_domain>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`

* **Vertices**. Points at which the surface should be evaluated. Only two of
three coordinates will be used; the coordinates used are defined by
**Orientation** parameter. This input is available and mandatory if the
**Evaluation mode** parameter is set to **Explicit**, and **Input mode** is
set to **Vertices**.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/e8e53044-ae00-48d5-9f61-654f2fccddfb
:target: https://github.com/nortikin/sverchok/assets/14288520/e8e53044-ae00-48d5-9f61-654f2fccddfb

* Generator-> :doc:`Plane </nodes/generator/plane_mk3>`
* Surfaces-> :doc:`Minimal Surface from Curve </nodes/surface/min_surface_from_curve>`
* Surfaces-> :doc:`Surface Domain </nodes/surface/surface_domain>`
* Number-> :doc:`A Number </nodes/number/numbers>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Scene-> :doc:`Bezier Input </nodes/exchange/bezier_in>`


* **SamplesU**, **SamplesV**. Number of samples along U and V direction, used
to generate cartesian grid. These inputs are available only when the
**Evaluate** parameter is set to **Grid**. The default value is 25.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/4a870f67-b725-4c50-8be6-592dc693a64e
:target: https://github.com/nortikin/sverchok/assets/14288520/4a870f67-b725-4c50-8be6-592dc693a64e

* Surfaces-> :doc:`Minimal Surface from Curve </nodes/surface/min_surface_from_curve>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Scene-> :doc:`Bezier Input </nodes/exchange/bezier_in>`

Parameters
----------

Expand All @@ -43,6 +76,9 @@ This node has the following parameters:

The default mode is **Grid**.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/9a23d19f-99ee-45e8-b163-aed2f6fdcfe2
:target: https://github.com/nortikin/sverchok/assets/14288520/9a23d19f-99ee-45e8-b163-aed2f6fdcfe2

* **Input mode**. This parameter is available only when **Evaluate** parameter
is set to **Explicit**. The available options are:

Expand All @@ -61,6 +97,10 @@ This node has the following parameters:
example, if this is set to XY, then the X coordinate of vertices will be used
as surface U parameter, and Y coordinate will be used as V parameter. The
default value is XY.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/b60690bc-7b96-4ff3-89c8-8439c7b79487
:target: https://github.com/nortikin/sverchok/assets/14288520/b60690bc-7b96-4ff3-89c8-8439c7b79487

* **Clamp**. This parameter is available only when **Evaluate** parameter is
set to **Explicit**. This defines how the node will process the values of
surface U and V parameters which are out of the surface's domain. The
Expand Down Expand Up @@ -101,8 +141,16 @@ Examples of usage
The node used in **Grid** node to generate rectangular grid on the plane:

.. image:: https://user-images.githubusercontent.com/284644/78699409-4b25c380-791d-11ea-8671-2b304e108ed1.png
:target: https://user-images.githubusercontent.com/284644/78699409-4b25c380-791d-11ea-8671-2b304e108ed1.png

* Surfaces-> :doc:`Plane (Surface) </nodes/surface/plane>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`

An example of **Explicit** mode usage:

.. image:: https://user-images.githubusercontent.com/284644/79249080-2dfd7180-7e96-11ea-810a-4a188536adc0.png
:target: https://user-images.githubusercontent.com/284644/79249080-2dfd7180-7e96-11ea-810a-4a188536adc0.png

* Generator->Generator Extended-> :doc:`Ring </nodes/generators_extended/ring_mk2>`
* Surfaces-> :doc:`Surface Formula </nodes/surface/surface_formula>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
52 changes: 52 additions & 0 deletions docs/nodes/surface/tessellate_trim.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Tessellate & Trim Surface
=========================

.. image:: https://github.com/nortikin/sverchok/assets/14288520/db74eb59-dd2d-4473-a93d-f80523e604de
:target: https://github.com/nortikin/sverchok/assets/14288520/db74eb59-dd2d-4473-a93d-f80523e604de

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

Expand All @@ -10,17 +13,31 @@ The provided trimming curve is supposed to be planar (flat), and be defined in t

Note that this node is supported since Blender 2.81 only. It will not work in Blender 2.80.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/aa35b243-a3e2-48be-a3bc-a44c7b53ff85
:target: https://github.com/nortikin/sverchok/assets/14288520/aa35b243-a3e2-48be-a3bc-a44c7b53ff85

Inputs
------

This node has the following inputs:

* **Surface**. The surface to tessellate. This input is mandatory.
* **TrimCurve**. The curve used to trim the surface. This input is mandatory.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/804204ed-6de0-4008-81d7-5b542fdbde9b
:target: https://github.com/nortikin/sverchok/assets/14288520/804204ed-6de0-4008-81d7-5b542fdbde9b

* **SamplesU**. The number of tessellation samples along the surface's U direction. The default value is 25.
* **SamplesV**. The number of tessellation samples along the surface's V direction. The default value is 25.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/42f920e9-8e07-44ed-989b-d38cf4af0bb6
:target: https://github.com/nortikin/sverchok/assets/14288520/42f920e9-8e07-44ed-989b-d38cf4af0bb6

* **SamplesT**. The number of points to evaluate the trimming curve at. The default value is 100.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/fcde6bdf-96c9-4cba-ba7d-ec25f066a688
:target: https://github.com/nortikin/sverchok/assets/14288520/fcde6bdf-96c9-4cba-ba7d-ec25f066a688

Parameters
----------

Expand All @@ -40,8 +57,14 @@ This node has the following parameters:

The default option is Inner.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/80801816-0f57-482c-a44e-dc3a1e8b1508
:target: https://github.com/nortikin/sverchok/assets/14288520/80801816-0f57-482c-a44e-dc3a1e8b1508

* **Accuracy**. This parameter is available in the node's N panel only. This defines the precision of the calculation. The default value is 5. Usually you do not have to change this value.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/13c3f826-b51a-4b85-a5a4-a01614a3815a
:target: https://github.com/nortikin/sverchok/assets/14288520/13c3f826-b51a-4b85-a5a4-a01614a3815a

Outputs
-------

Expand All @@ -53,11 +76,40 @@ This node has the following outputs:
Examples of usage
-----------------

.. image:: https://github.com/nortikin/sverchok/assets/14288520/4a8750b8-5e79-4058-ab1d-05c017d04dd0
:target: https://github.com/nortikin/sverchok/assets/14288520/4a8750b8-5e79-4058-ab1d-05c017d04dd0

* Generator-> :doc:`Plane </nodes/generator/plane_mk3>`
* Surfaces-> :doc:`Minimal Surface </nodes/surface/minimal_surface>`
* Surfaces-> :doc:`Evaluate Surface </nodes/surface/evaluate_surface>`
* Transform-> :doc:`Noise Displace </nodes/transforms/noise_displace>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
* Scene-> :doc:`Bezier Input </nodes/exchange/bezier_in>`

.. image:: https://github.com/nortikin/sverchok/assets/14288520/4b9025e8-3ded-44f0-806f-6a62c360fb8f
:target: https://github.com/nortikin/sverchok/assets/14288520/4b9025e8-3ded-44f0-806f-6a62c360fb8f

---------

Trim some (formula-generated) surface with a circle:

.. image:: https://user-images.githubusercontent.com/284644/79388812-72b50580-7f87-11ea-9eab-2fd205b632d8.png
:target: https://user-images.githubusercontent.com/284644/79388812-72b50580-7f87-11ea-9eab-2fd205b632d8.png

* Curves-> :doc:`Circle (Curve) </nodes/curve/curve_circle>`
* Surfaces-> :doc:`Surface Formula </nodes/surface/surface_formula>`
* Number-> :doc:`A Number </nodes/number/numbers>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`

---------

Cut a circular hole in the surface:

.. image:: https://user-images.githubusercontent.com/284644/79388815-73e63280-7f87-11ea-9bc9-de200fce3c59.png
:target: https://user-images.githubusercontent.com/284644/79388815-73e63280-7f87-11ea-9bc9-de200fce3c59.png

* Curves-> :doc:`Circle (Curve) </nodes/curve/curve_circle>`
* Surfaces-> :doc:`Surface Formula </nodes/surface/surface_formula>`
* Number-> :doc:`A Number </nodes/number/numbers>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`

0 comments on commit 49f7c9c

Please sign in to comment.