eradiate.scenes.measure.TargetPoint

eradiate.scenes.measure.TargetPoint#

class eradiate.scenes.measure.TargetPoint(xyz)[source]#

Bases: Target

Point target or origin specification.

Parameters:

xyz (array-like) – Point coordinates.

Unit-enabled field (default: ucc[‘length’]).

Fields:

xyz (quantity) – Point coordinates.

static convert(value)#

Object converter method.

If value is a dictionary, this method uses new() to instantiate a Target child class based on the "type" entry it contains.

If value is a 3-vector, this method returns a TargetPoint instance.

Otherwise, it returns value.

kernel_item()[source]#

Return kernel item.

static new(target_type, *args, **kwargs)#

Instantiate one of the supported child classes. This factory requires manual class registration. All position and keyword arguments are forwarded to the constructed type.

Currently supported classes:

Parameters:

target_type ({"point", "rectangle"}) – Identifier of one of the supported child classes.

Returns:

Target