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 aRegistrationPoint
that contains information about its “valency.”Each
LineCarrier
passing through the registration point creates a pair of “spokes” through the point (seeRPSpoke
). 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 anyPointCarrier
andArcCarrier
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
The set of all
ElementAttributes
represented inspokes
.The list of spokes at the registration point.
Whether this point can lock rotations or not.
The set of
ElementAttributes
of points and arcs centered at the registration point.Methods
Returns
True
if this signature matches a sub-signature ofother
.- __add__(other: RegistrationPointSignature) RegistrationPointSignature
Add two signatures together.
spokes
anddirect_attributes
are merged, andradii
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 ofother
.- 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 ofother.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 inspokes
.
- spokes
The list of spokes at the registration point.