Skip to content

Commit

Permalink
Random Points on Mesh Numpy Implementation (#3999)
Browse files Browse the repository at this point in the history
* Random Points on Mesh Numpy Implementation

* Rondom points on Edges + viewer map attribute

* performace fix

* Edges mode docs
  • Loading branch information
vicdoval committed Mar 30, 2021
1 parent 22b100e commit 50a35d6
Show file tree
Hide file tree
Showing 3 changed files with 347 additions and 52 deletions.
21 changes: 19 additions & 2 deletions docs/nodes/spatial/random_points_on_mesh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ This node has the following parameters:
* **Surface**. Generate points on the surface of the mesh.
* **Volume**. Generate points inside the volume of the mesh. The mesh is
expected to represent a closed volume in this case.
* **Edges**. Generate points on the edges of the mesh.

The default option is **Surface**.

Expand All @@ -40,12 +41,28 @@ This node has the following parameters:
**Face weight** input). If not checked, then the number of points on each
face will be only defined by **Face weight** input. Checked by default.

- **All Triangles**. Enable if the input mesh is made only of triangles
(makes node faster). Available in Surfaces and Volume modes (in N-Panel)

- **Safe Check**. Disabling it will make node faster but polygon indices
referring to unexisting points will crash Blender. Only available in Volume Mode.
(in N-Panel)

- **Implementation**. Offers two implementations:
* **Numpy**. Faster
* **Mathutils**. Old implementation. Slower.
Only available in Surface Mode (in N-Panel)

- **Ouput Numpy**. Output NumPy arrays in stead of regular list (makes node faster)
Only available in Surface and Edges modes (in N-Panel)


Outputs
-------

- **Verts** - random vertices on mesh
- **Face index** - indexes of faces to which random vertices lays. This input
is available only when **Mode** parameter is set to **Surface**.
- **Face / Edges index** - indexes of faces/edges to which random vertices lays. This input
is available only when **Mode** parameter is set to **Surface** or **Edges**.

Examples
--------
Expand Down
Loading

0 comments on commit 50a35d6

Please sign in to comment.