RegistrationPointSignature
- class RegistrationPointSignature(spokes: List[Tuple[ndarray[3], Dict[ElementAttributes, RPSpokeType]]], radii: List[float] | None = None, direct_attributes: Set[ElementAttributes] | None = None)
A
RegistrationPointSignatureis a property of aRegistrationPointthat contains information about its “valency.”Each
LineCarrierpassing 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 anyPointCarrierandArcCarriercentered 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
ElementAttributesof points and arcs centered at the registration point.
Attributes
The set of all
ElementAttributesrepresented inspokes.The list of spokes at the registration point.
Whether this point can lock rotations or not.
The set of
ElementAttributesof points and arcs centered at the registration point.Methods
Returns
Trueif this signature matches a sub-signature ofother.- __add__(other: RegistrationPointSignature) RegistrationPointSignature
Add two signatures together.
spokesanddirect_attributesare merged, andradiiare 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
Trueif 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.radiimust be a fuzzy subset ofother.radii.
- direct_attributes
The set of
ElementAttributesof 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
ElementAttributesrepresented inspokes.
- spokes
The list of spokes at the registration point.