unreal.GeometryScript_PolygonList

class unreal.GeometryScript_PolygonList(outer: Object | None = None, name: Name | str = 'None')

Bases: BlueprintFunctionLibrary

Geometry Script Library Polygon List Functions

C++ Source:

  • Plugin: GeometryScripting

  • Module: GeometryScriptingCore

  • File: PolygonFunctions.h

classmethod add_polygon_to_list(polygon_list, outer_polygon, hole_polygons, fix_hole_orientations=True) -> (int32, polygon_list=GeometryScriptGeneralPolygonList)

Add Polygon to a Polygon List, with optional holes. Returns index of the added polygon.

Parameters:
Returns:

polygon_list (GeometryScriptGeneralPolygonList):

Return type:

GeometryScriptGeneralPolygonList

classmethod append_polygon_list(polygon_list, polygons_to_append) GeometryScriptGeneralPolygonList

Append the polygons in ‘Polygons to Append’ to Polygon List

Parameters:
Returns:

polygon_list (GeometryScriptGeneralPolygonList):

Return type:

GeometryScriptGeneralPolygonList

classmethod create_polygon_list_from_simple_polygons(outer_polygons) GeometryScriptGeneralPolygonList

Create a Polygon List from an array of Simple Polygons

Parameters:

outer_polygons (Array[GeometryScriptSimplePolygon]) –

Return type:

GeometryScriptGeneralPolygonList

classmethod create_polygon_list_from_single_polygon(outer_polygon, hole_polygons, fix_hole_orientations=True) GeometryScriptGeneralPolygonList

Create a Polygon List of a single Polygon, with optional holes

Parameters:
Return type:

GeometryScriptGeneralPolygonList

classmethod create_polygons_from_open_poly_paths_offset(poly_paths, offset_options, offset, copy_input_on_failure=True) -> (GeometryScriptGeneralPolygonList, operation_success=bool)

Apply an offset to a set of open 2D PolyPaths, generating closed polygons as a result

Parameters:
Returns:

operation_success (bool):

Return type:

bool

classmethod create_polygons_from_path_offset(path, offset_options, offset, copy_input_on_failure=True) -> (GeometryScriptGeneralPolygonList, operation_success=bool)

Apply an offset to a single open 2D path, generating closed polygons as a result

Parameters:
Returns:

operation_success (bool):

Return type:

bool

classmethod get_polygon_area(polygon_list, polygon_index) -> (double, valid_index=bool)

Returns the area enclosed by a Polygon. Returns zero for an invalid PolygonIndex.

Parameters:
Returns:

valid_index (bool):

Return type:

bool

classmethod get_polygon_bounds(polygon_list, polygon_index) -> (Box2D, valid_index=bool)

Returns the bounding box of a Polygon. Returns an empty, invalid box for an invalid PolygonIndex.

Parameters:
Returns:

valid_index (bool):

Return type:

bool

classmethod get_polygon_count(polygon_list) int32

Returns the number of polygons in the Polygon List

Parameters:

polygon_list (GeometryScriptGeneralPolygonList) –

Return type:

int32

classmethod get_polygon_hole_count(polygon_list, polygon_index) -> (int32, valid_index=bool)

Returns the number of holes in a Polygon. Returns zero for an invalid PolygonIndex.

Parameters:
Returns:

valid_index (bool):

Return type:

bool

classmethod get_polygon_list_area(polygon_list) double

Returns the area enclosed by a Polygon

Parameters:

polygon_list (GeometryScriptGeneralPolygonList) –

Return type:

double

classmethod get_polygon_list_bounds(polygon_list) Box2D

Returns the bounding box of a Polygon

Parameters:

polygon_list (GeometryScriptGeneralPolygonList) –

Return type:

Box2D

classmethod get_polygon_vertex(polygon_list, vertex_index, polygon_index, hole_index=-1) -> (Vector2D, is_valid_vertex=bool)

Returns the specified vertex of a Polygon – either of the outer polygon, if HoleIndex is -1, or specified inner hole. Vertex will be the zero vector for invalid Polygon or Hole indices, or if the polygon is empty. VertexIndex will loop.

Parameters:
Returns:

is_valid_vertex (bool):

Return type:

bool

classmethod get_polygon_vertex_count(polygon_list, polygon_index, hole_index=-1) -> (int32, valid_indices=bool)

Returns the number of vertices in a Polygon’s outer shape, if HoleIndex is -1, or in the specified inner hole. Returns 0 for invalid Polygon or Hole indices.

Parameters:
Returns:

valid_indices (bool):

Return type:

bool

classmethod get_polygon_vertices(polygon_list, polygon_index, hole_index=-1) -> (out_vertices=Array[Vector2D], valid_indices=bool)

Returns the vertices of a Polygon – either of the outer polygon, if HoleIndex is -1, or specified inner hole. OutVertices will be empty for invalid Polygon or Hole indices.

Parameters:
Returns:

out_vertices (Array[Vector2D]):

valid_indices (bool):

Return type:

tuple

classmethod get_simple_polygon(polygon_list, polygon_index, hole_index=-1) -> (GeometryScriptSimplePolygon, valid_indices=bool)

Returns a specified Simple Polygon from a Polygon List – either the outer polygon, if HoleIndex is -1, or specified inner hole. Polygon will be empty for invalid Polygon or Hole indices.

Parameters:
Returns:

valid_indices (bool):

Return type:

bool

classmethod polygons_difference(polygon_list, polygons_to_subtract) GeometryScriptGeneralPolygonList

Compute difference of Polygon List and Polygons to Subtract

Parameters:
Return type:

GeometryScriptGeneralPolygonList

classmethod polygons_exclusive_or(polygon_list, polygons_to_exclusive_or) GeometryScriptGeneralPolygonList

Compute exclusive or of Polygon List and Polygons to Exclusive Or

Parameters:
Return type:

GeometryScriptGeneralPolygonList

classmethod polygons_intersection(polygon_list, polygons_to_intersect) GeometryScriptGeneralPolygonList

Compute intersection of Polygon List and Polygons to Intersect

Parameters:
Return type:

GeometryScriptGeneralPolygonList

classmethod polygons_morphology_close(polygon_list, offset_options, offset, copy_input_on_failure=True) -> (GeometryScriptGeneralPolygonList, operation_success=bool)

Apply a morphological “close” operator to a list of closed polygons – first offsetting by +Offset, then by -Offset. If Offset is negative, this will instead function as an ‘Open’ operation

Parameters:
Returns:

operation_success (bool):

Return type:

bool

classmethod polygons_morphology_open(polygon_list, offset_options, offset, copy_input_on_failure=True) -> (GeometryScriptGeneralPolygonList, operation_success=bool)

Apply a morphological “open” operator to a list of closed polygons – first offsetting by -Offset, then by +Offset. If Offset is negative, this will instead function as a ‘Close’ operation

Parameters:
Returns:

operation_success (bool):

Return type:

bool

classmethod polygons_offset(polygon_list, offset_options, offset, copy_input_on_failure=True) -> (GeometryScriptGeneralPolygonList, operation_success=bool)

Apply a single offset to a list of closed polygons

Parameters:
Returns:

operation_success (bool):

Return type:

bool

classmethod polygons_offsets(polygon_list, offset_options, first_offset, second_offset, copy_input_on_failure=True) -> (GeometryScriptGeneralPolygonList, operation_success=bool)

Apply two offsets in sequence to a list of closed polygons

Parameters:
Returns:

operation_success (bool):

Return type:

bool

classmethod polygons_union(polygon_list, copy_input_on_failure=True) GeometryScriptGeneralPolygonList

Compute union of all polygons in Polygon List. Also resolves self-intersections within each polygon.

Parameters:
Return type:

GeometryScriptGeneralPolygonList