unreal.GeometryScript_Primitives

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

Bases: BlueprintFunctionLibrary

Geometry Script Library Mesh Primitive Functions

C++ Source:

  • Plugin: GeometryScripting

  • Module: GeometryScriptingCore

  • File: MeshPrimitiveFunctions.h

classmethod append_bounding_box(target_mesh, primitive_options, transform, box, steps_x=0, steps_y=0, steps_z=0, debug=None) DynamicMesh

Appends a 3D box to the Target Mesh with dimensions and origin taken from the input Box

Parameters:
Return type:

DynamicMesh

classmethod append_box(target_mesh, primitive_options, transform, dimension_x=100.000000, dimension_y=100.000000, dimension_z=100.000000, steps_x=0, steps_y=0, steps_z=0, origin=GeometryScriptPrimitiveOriginMode.BASE, debug=None) DynamicMesh

Appends a 3D box to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_capsule(target_mesh, primitive_options, transform, radius=30.000000, line_length=75.000000, hemisphere_steps=5, circle_steps=8, origin=GeometryScriptPrimitiveOriginMode.BASE, debug=None) DynamicMesh

Appends a 3D Capsule to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_cone(target_mesh, primitive_options, transform, base_radius=50.000000, top_radius=5.000000, height=100.000000, radial_steps=12, height_steps=4, capped=True, origin=GeometryScriptPrimitiveOriginMode.BASE, debug=None) DynamicMesh

Appends a 3D cone to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_curved_stairs(target_mesh, primitive_options, transform, step_width=100.000000, step_height=20.000000, inner_radius=150.000000, curve_angle=90.000000, num_steps=8, floating=False, debug=None) DynamicMesh

Appends a rising circular staircase to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_cylinder(target_mesh, primitive_options, transform, radius=50.000000, height=100.000000, radial_steps=12, height_steps=0, capped=True, origin=GeometryScriptPrimitiveOriginMode.BASE, debug=None) DynamicMesh

Appends a 3D Cylinder (with optional end caps) to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_delaunay_triangulation2d(target_mesh, primitive_options, transform, vertex_positions, constrained_edges, triangulation_options, debug=None) -> (DynamicMesh, positions_to_vertex_i_ds=Array[int32], has_duplicate_vertices=bool)

Generates a Delaunay Triangulation of the provided vertices, and appends it to the Target Mesh. If optional Constrained Edges are provided, will generate a Constrained Delaunay Triangulation which connects the specified vertices with edges. On success, all vertices are always appended to the output mesh, though duplicate vertices will not be used in any triangles and may optionally be removed. Use PositionsToVertexIDs to map indices in the input VertexPositions array to vertex IDs in the Dynamic Mesh.

Parameters:
Returns:

positions_to_vertex_i_ds (Array[int32]):

has_duplicate_vertices (bool):

Return type:

tuple

classmethod append_disc(target_mesh, primitive_options, transform, radius=50.000000, angle_steps=16, spoke_steps=0, start_angle=0.000000, end_angle=360.000000, hole_radius=0.000000, debug=None) DynamicMesh

Appends a planar disc to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_linear_stairs(target_mesh, primitive_options, transform, step_width=100.000000, step_height=20.000000, step_depth=30.000000, num_steps=8, floating=False, debug=None) DynamicMesh

Appends a linear staircase to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_polygon_list_triangulation(target_mesh, primitive_options, transform, polygon_list, triangulation_options, debug=None) -> (DynamicMesh, triangulation_error=bool)

Generates a Delaunay Triangulation of the provided Polygon List, and appends it to the Target Mesh.

Parameters:
Returns:

triangulation_error (bool): Reports whether the triangulation contains errors, typically due to intersecting edges in the input. Consider pre-processing the PolygonsList with PolygonsUnion to resolve intersections and prevent this error.

Return type:

bool

classmethod append_rectangle(target_mesh: DynamicMesh, primitive_options: GeometryScriptPrimitiveOptions, transform: Transform, dimension_x: float = 100.0, dimension_y: float = 100.0, steps_width: int = 0, steps_height: int = 0, debug: GeometryScriptDebug = Ellipsis) DynamicMesh

deprecated: ‘append_rectangle’ was renamed to ‘append_rectangle_compatibility_5_0’.

classmethod append_rectangle_compatibility_5_0(target_mesh, primitive_options, transform, dimension_x=100.000000, dimension_y=100.000000, steps_width=0, steps_height=0, debug=None) DynamicMesh

5.0 Preview 1 Compatibility version of AppendRectangleXY. Incorrectly interprets the input dimensions. Incorrectly divides the input DimensionX and DimensionY by 2. warning: It is strongly recommended that callers of this function update to the current AppendRectangleXY function!

Parameters:
Return type:

DynamicMesh

classmethod append_rectangle_xy(target_mesh, primitive_options, transform, dimension_x=100.000000, dimension_y=100.000000, steps_width=0, steps_height=0, debug=None) DynamicMesh

Appends a planar Rectangle to a Dynamic Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_revolve_path(target_mesh, primitive_options, transform, path_vertices, revolve_options, steps=8, capped=True, debug=None) DynamicMesh

Revolves an open 2D path, with optional top and bottom end caps, appending the result to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_revolve_polygon(target_mesh, primitive_options, transform, polygon_vertices, revolve_options, radius=100.000000, steps=8, debug=None) DynamicMesh

In the coordinate system of the revolve polygon, +X is towards the “outside” of the revolve donut, and +Y is “up” (ie +Z in local space) Polygon should be oriented counter-clockwise to produce a correctly-oriented shape, otherwise it will be inside-out Polygon endpoint is not repeated.

Parameters:
Return type:

DynamicMesh

classmethod append_round_rectangle(target_mesh: DynamicMesh, primitive_options: GeometryScriptPrimitiveOptions, transform: Transform, dimension_x: float = 100.0, dimension_y: float = 100.0, corner_radius: float = 5.0, steps_width: int = 0, steps_height: int = 0, steps_round: int = 4, debug: GeometryScriptDebug = Ellipsis) DynamicMesh

deprecated: ‘append_round_rectangle’ was renamed to ‘append_round_rectangle_compatibility_5_0’.

classmethod append_round_rectangle_compatibility_5_0(target_mesh, primitive_options, transform, dimension_x=100.000000, dimension_y=100.000000, corner_radius=5.000000, steps_width=0, steps_height=0, steps_round=4, debug=None) DynamicMesh

5.0 Preview 1 Compatibility version of AppendRoundRectangleXY. Incorrectly divides the input DimensionX and DimensionY by 2. warning: It is strongly recommended that callers of this function update to the current AppendRoundRectangleXY function!

Parameters:
Return type:

DynamicMesh

classmethod append_round_rectangle_xy(target_mesh, primitive_options, transform, dimension_x=100.000000, dimension_y=100.000000, corner_radius=5.000000, steps_width=0, steps_height=0, steps_round=4, debug=None) DynamicMesh

Appends a planar Rectangle with Rounded Corners (RoundRect) to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_simple_collision_shapes(target_mesh, primitive_options, transform, simple_collision, triangulation_options, debug=None) DynamicMesh

Appends Simple Collision shapes to the Target Mesh, triangulated as specified by Triangulation Options

Parameters:
Return type:

DynamicMesh

classmethod append_simple_extrude_polygon(target_mesh, primitive_options, transform, polygon_vertices, height=100.000000, height_steps=0, capped=True, origin=GeometryScriptPrimitiveOriginMode.BASE, debug=None) DynamicMesh

Polygon should be oriented counter-clockwise to produce a correctly-oriented shape, otherwise it will be inside-out Polygon endpoint is not repeated.

Parameters:
Return type:

DynamicMesh

classmethod append_simple_swept_polygon(target_mesh, primitive_options, transform, polygon_vertices, sweep_path, loop=False, capped=True, start_scale=1.000000, end_scale=1.000000, debug=None) DynamicMesh

Sweeps a 2D polygon along an arbitrary 3D path, appending the result to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_sphere_box(target_mesh, primitive_options, transform, radius=50.000000, steps_x=6, steps_y=6, steps_z=6, origin=GeometryScriptPrimitiveOriginMode.CENTER, debug=None) DynamicMesh

Appends a 3D sphere triangulated using box topology to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_sphere_covering(target_mesh, primitive_options, transform, sphere_covering, steps_x=6, steps_y=6, steps_z=6, debug=None) DynamicMesh

Appends the spheres in the Sphere Covering to the Target Mesh

Parameters:
Return type:

DynamicMesh

classmethod append_sphere_lat_long(target_mesh, primitive_options, transform, radius=50.000000, steps_phi=10, steps_theta=16, origin=GeometryScriptPrimitiveOriginMode.CENTER, debug=None) DynamicMesh

Appends a 3D Sphere triangulated using latitude/longitude topology to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_spiral_revolve_polygon(target_mesh, primitive_options, transform, polygon_vertices, revolve_options, radius=100.000000, steps=18, rise_per_revolution=50.000000, debug=None) DynamicMesh

Revolves a 2D polygon on a helical path, like one used to create a vertical spiral, appending the result to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_sweep_polygon(target_mesh, primitive_options, transform, polygon_vertices, sweep_path, loop=False, capped=True, start_scale=1.000000, end_scale=1.000000, rotation_angle_deg=0.000000, debug=None) DynamicMesh

Sweep the given 2D PolygonVertices along the SweepPath specified as a set of FTransforms If the 2D vertices are (U,V), then in the coordinate space of the FTransform, X points “along” the path, Y points “right” (U) and Z points “up” (V).

Parameters:
  • target_mesh (DynamicMesh) –

  • primitive_options (GeometryScriptPrimitiveOptions) –

  • transform (Transform) –

  • polygon_vertices (Array[Vector2D]) – vertices of the closed 2D polyon that will be swept along the SweepPath

  • sweep_path (Array[Transform]) – defines the 3D sweep path curve as a 3D poly-path, with rotation and scaling at each polypath vertex taken from the Transform

  • loop (bool) – if true, SweepPath is considered to be a Loop and a section connecting the end and start of the path is added (bCapped is ignored)

  • capped (bool) – if true the open ends of the swept generalized cylinder are triangulated

  • start_scale (float) – uniform scaling applied to the 2D polygon at the start of the path. Interpolated via arc length to EndScale at the end of the path.

  • end_scale (float) – uniform scaling applied to the 2D polygon at the end of the path

  • rotation_angle_deg (float) – Rotation applied to the 2D Polygon. Positive rotation rotates clockwise, ie Up/+Z/+V towards Right/+Y/+U

  • debug (GeometryScriptDebug) –

Return type:

DynamicMesh

classmethod append_sweep_polyline(target_mesh, primitive_options, transform, polyline_vertices, sweep_path, polyline_tex_param_u, sweep_path_tex_param_v, loop=False, start_scale=1.000000, end_scale=1.000000, rotation_angle_deg=0.000000, debug=None) DynamicMesh

Sweep the given 2D PolylineVertices along the SweepPath specified as a set of FTransforms If the 2D vertices are (U,V), then in the coordinate space of the FTransform, X points “along” the path, Y points “right” (U) and Z points “up” (V).

Parameters:
  • target_mesh (DynamicMesh) –

  • primitive_options (GeometryScriptPrimitiveOptions) –

  • transform (Transform) –

  • polyline_vertices (Array[Vector2D]) – vertices of the open 2D path that will be swept along the SweepPath

  • sweep_path (Array[Transform]) – defines the 3D sweep path curve as a 3D poly-path, with rotation and scaling at each polypath vertex taken from the Transform

  • polyline_tex_param_u (Array[float]) – defines U coordinate value for each element in PolylineVertices. Must be same length as PolylineVertices (ignored if length=0).

  • sweep_path_tex_param_v (Array[float]) – defines V coordinate value for each element in SweepPath. Must be same length as SweepPath if bLoop=false, length+1 if bLoop=true, and ignored if length=0.

  • loop (bool) – if true, SweepPath is considered to be a Loop and a section connecting the end and start of the path is added (bCapped is ignored)

  • start_scale (float) – uniform scaling applied to the 2D polygon at the start of the path. Interpolated via arc length to EndScale at the end of the path.

  • end_scale (float) – uniform scaling applied to the 2D polygon at the end of the path

  • rotation_angle_deg (float) – Rotation applied to the 2D Polygon. Positive rotation rotates clockwise, ie Up/+Z/+V towards Right/+Y/+U. This Rotation is applied before any rotation in the SweepPath Transforms.

  • debug (GeometryScriptDebug) –

Return type:

DynamicMesh

classmethod append_torus(target_mesh, primitive_options, transform, revolve_options, major_radius=50.000000, minor_radius=25.000000, major_steps=16, minor_steps=8, origin=GeometryScriptPrimitiveOriginMode.BASE, debug=None) DynamicMesh

Appends a 3D torus (donut) or partial torus to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_triangulated_polygon(target_mesh, primitive_options, transform, polygon_vertices, allow_self_intersections=True, debug=None) DynamicMesh

Appends a Triangulated Polygon to the Target Mesh. Polygon should be oriented counter-clockwise to produce a correctly-oriented shape, otherwise it will be inside-out Polygon endpoint is not repeated.

Parameters:
Return type:

DynamicMesh

classmethod append_triangulated_polygon3d(target_mesh, primitive_options, transform, polygon_vertices3d, debug=None) DynamicMesh

Appends a Triangulated Polygon (with vertices specified in 3D) to the Target Mesh. Uses Ear Clipping-based triangulation. Output vertices will always be 1:1 with input vertices. Polygon endpoint is not repeated.

Parameters:
Return type:

DynamicMesh

classmethod append_voronoi_diagram2d(target_mesh, primitive_options, transform, voronoi_sites, voronoi_options, debug=None) DynamicMesh

Generates triangulated Voronoi Cells from the provided Voronoi Sites, identifying each with PolyGroups, and appends to the Target Mesh.

Parameters:
Return type:

DynamicMesh