PointInPolygon2D Example

Script to check whether a node is inside/outside of a polygon

Simple script to check whether a node is inside or outside of a pre-defined polygon.

Functions:
PointInPolygon2D – checks whether a point in space is inside or outside of a 2 dimensional (X/Y plane) polygon and returns true (inside) or false (outside).

In this example, the user loads a simple 2-dimensional shell model with a polygon highlighted at the center. The user picks a node on the mesh and a message is printed to the dialogue/message panel displaying whether the selected node is inside or outside of the polygon.