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:
polygon_list (GeometryScriptGeneralPolygonList) –
outer_polygon (GeometryScriptSimplePolygon) –
hole_polygons (Array[GeometryScriptSimplePolygon]) –
fix_hole_orientations (bool) –
- Returns:
polygon_list (GeometryScriptGeneralPolygonList):
- Return type:
- classmethod append_polygon_list(polygon_list, polygons_to_append) GeometryScriptGeneralPolygonList ¶
Append the polygons in ‘Polygons to Append’ to Polygon List
- Parameters:
polygon_list (GeometryScriptGeneralPolygonList) –
polygons_to_append (GeometryScriptGeneralPolygonList) –
- Returns:
polygon_list (GeometryScriptGeneralPolygonList):
- Return type:
- 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:
- 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:
outer_polygon (GeometryScriptSimplePolygon) –
hole_polygons (Array[GeometryScriptSimplePolygon]) –
fix_hole_orientations (bool) –
- Return type:
- 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:
poly_paths (Array[GeometryScriptPolyPath]) –
offset_options (GeometryScriptOpenPathOffsetOptions) –
offset (double) –
copy_input_on_failure (bool) –
- Returns:
operation_success (bool):
- Return type:
- 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:
offset_options (GeometryScriptOpenPathOffsetOptions) –
offset (double) –
copy_input_on_failure (bool) –
- Returns:
operation_success (bool):
- Return type:
- 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:
polygon_list (GeometryScriptGeneralPolygonList) –
polygon_index (int32) –
- Returns:
valid_index (bool):
- Return type:
- 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:
polygon_list (GeometryScriptGeneralPolygonList) –
polygon_index (int32) –
- Returns:
valid_index (bool):
- Return type:
- 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:
polygon_list (GeometryScriptGeneralPolygonList) –
polygon_index (int32) –
- Returns:
valid_index (bool):
- Return type:
- 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:
- 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:
polygon_list (GeometryScriptGeneralPolygonList) –
vertex_index (int32) –
polygon_index (int32) –
hole_index (int32) –
- Returns:
is_valid_vertex (bool):
- Return type:
- 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:
polygon_list (GeometryScriptGeneralPolygonList) –
polygon_index (int32) –
hole_index (int32) –
- Returns:
valid_indices (bool):
- Return type:
- 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:
polygon_list (GeometryScriptGeneralPolygonList) –
polygon_index (int32) –
hole_index (int32) –
- 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:
polygon_list (GeometryScriptGeneralPolygonList) –
polygon_index (int32) –
hole_index (int32) –
- Returns:
valid_indices (bool):
- Return type:
- classmethod polygons_difference(polygon_list, polygons_to_subtract) GeometryScriptGeneralPolygonList ¶
Compute difference of Polygon List and Polygons to Subtract
- Parameters:
polygon_list (GeometryScriptGeneralPolygonList) –
polygons_to_subtract (GeometryScriptGeneralPolygonList) –
- Return type:
- classmethod polygons_exclusive_or(polygon_list, polygons_to_exclusive_or) GeometryScriptGeneralPolygonList ¶
Compute exclusive or of Polygon List and Polygons to Exclusive Or
- Parameters:
polygon_list (GeometryScriptGeneralPolygonList) –
polygons_to_exclusive_or (GeometryScriptGeneralPolygonList) –
- Return type:
- classmethod polygons_intersection(polygon_list, polygons_to_intersect) GeometryScriptGeneralPolygonList ¶
Compute intersection of Polygon List and Polygons to Intersect
- Parameters:
polygon_list (GeometryScriptGeneralPolygonList) –
polygons_to_intersect (GeometryScriptGeneralPolygonList) –
- Return type:
- 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:
polygon_list (GeometryScriptGeneralPolygonList) –
offset_options (GeometryScriptPolygonOffsetOptions) –
offset (double) –
copy_input_on_failure (bool) –
- Returns:
operation_success (bool):
- Return type:
- 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:
polygon_list (GeometryScriptGeneralPolygonList) –
offset_options (GeometryScriptPolygonOffsetOptions) –
offset (double) –
copy_input_on_failure (bool) –
- Returns:
operation_success (bool):
- Return type:
- 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:
polygon_list (GeometryScriptGeneralPolygonList) –
offset_options (GeometryScriptPolygonOffsetOptions) –
offset (double) –
copy_input_on_failure (bool) –
- Returns:
operation_success (bool):
- Return type:
- 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:
polygon_list (GeometryScriptGeneralPolygonList) –
offset_options (GeometryScriptPolygonOffsetOptions) –
first_offset (double) –
second_offset (double) –
copy_input_on_failure (bool) –
- Returns:
operation_success (bool):
- Return type:
- 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:
polygon_list (GeometryScriptGeneralPolygonList) –
copy_input_on_failure (bool) –
- Return type: