weldx.DynamicShapeSegment#

class weldx.DynamicShapeSegment(series, max_coord=1, **kwargs)#

Shape segment class to define arbitrary 2d shapes.

Initialize a DynamicBaseSegment.

Parameters:
  • series (SpatialSeries | Quantity | DataArray | str | MathematicalExpression) – A SpatialSeries that describes the trajectory of the shape segment. Alternatively, one can pass every other object that is valid as first argument to of the __init__ method of the SpatialSeries.

  • max_coord (float) – [only expression based SpatialSeries] The maximum coordinate value of the passed series dimension that specifies the position on the 2d line. The value defines the segments length by evaluating the expression on the interval [0, max_coord]

  • kwargs – A set of keyword arguments that will be forwarded to the __init__ method of the SpatialSeries in case the series parameter isn’t already a SpatialSeries.

Methods

apply_transformation

Apply an in-place transformation to the segment using a matrix.

apply_translation

Apply a translation in place.

get_points

Get an array of the points at the specified relative positions.

get_section_length

Get the length from the start of the segment to the passed relative position.

rasterize

Get an array of discrete raster points of the segment.

transform

Create a new segment transformed by the passed matrix.

translate

Create a new segment translated by the passed vector.

Attributes

length

Get the length of the segment.

point_end

Get the end point of the segment.

point_start

Get the starting point of the segment.