Skip to content

Commit

Permalink
Added Point List Normal node
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarEmaraDev committed Mar 28, 2017
1 parent 4afcb10 commit 68a99ea
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/user_guide/nodes/geometry/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ Geometry
:titlesonly:

Convert Plane Type <convert_plane_type>
Point List Normal <point_list_normal>

.. image:: images/geometry_overview.png
37 changes: 37 additions & 0 deletions docs/user_guide/nodes/geometry/point_list_normal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Point List Normal
=================

Description
-----------
This node takes multiple vectors which represent points of a polygon and return the normal of that polygon.

At least 3 points are needed to compute the normal. If more than 3 points were input, the resulted normal will be the average of the normals of each 3 points.

.. image:: images/point_list_normal_node.png
:width: 160pt

Inputs
------

- **Point List** - A vector list that contain the locations of the polygon points.

Outputs
-------

- **Normal** - A unit vector that represent the normal of the polygon. A zero vector if points weren't valid.
- **Is Valid** - A boolean which is True if blender was able to calculate the normal.

Advanced Node Settings
----------------------

- N/A

Notes
-----

The order of points matter as cross product is used to compute the normals, So points in reversed order will return a normal that is in the reverse direction of the normal computed by the original list.

Examples of Usage
-----------------

.. image:: gifs/point_list_normal_node_example.gif

0 comments on commit 68a99ea

Please sign in to comment.