RegistrationPointSignature

class RegistrationPointSignature(spokes: List[Tuple[ndarray[3], Dict[ElementAttributes, RPSpokeType]]], radii: List[float] | None = None, direct_attributes: Set[ElementAttributes] | None = None)

A RegistrationPointSignature is a property of a RegistrationPoint that contains information about its “valency.”

Each LineCarrier passing through the registration point creates a pair of “spokes” through the point (see RPSpoke). Each spoke represents the half of the carrier on one side of the point, specified by its direction vector. Each spoke also contains information about any PointCarrier and ArcCarrier centered at the registration point.

Parameters:
  • spokes – The list of spokes at the registration point.

  • radii – If this registration point is the center of an arc, this list will contain that arc’s radius.

  • direct_attributes – The set of ElementAttributes of points and arcs centered at the registration point.

Attributes

direction_kdtree

spoke_attributes

The set of all ElementAttributes represented in spokes.

spokes

The list of spokes at the registration point.

radii

Whether this point can lock rotations or not.

direct_attributes

The set of ElementAttributes of points and arcs centered at the registration point.

Methods

can_embed_in

Returns True if this signature matches a sub-signature of other.

__add__(other: RegistrationPointSignature) RegistrationPointSignature

Add two signatures together.

spokes and direct_attributes are merged, and radii are merged by fuzzy list union.

__getitem__(item: int | Tuple[ndarray[3], ElementAttributes]) Tuple[ndarray[3], Dict[ElementAttributes, RPSpokeType]] | RPSpokeType
Parameters:

item – If an int, returns the (direction, spoke type) pair. If a (direction, element attributes) pair, returns the spoke type at that direction, with the given attributes (raises an IndexError if not found).

can_embed_in(other: RegistrationPointSignature, match_directions: bool = True, match_radii: bool = True) bool

Returns True if this signature matches a sub-signature of other.

Parameters:
  • other – The other signature to match against.

  • match_directions – If True, spoke directions must match in any found sub-signature for it to be a valid match.

  • match_radii – If True, self.radii must be a fuzzy subset of other.radii.

direct_attributes

The set of ElementAttributes of points and arcs centered at the registration point.

property direction_kdtree: KDTree
radii

Whether this point can lock rotations or not.

property spoke_attributes

The set of all ElementAttributes represented in spokes.

spokes

The list of spokes at the registration point.