diff --git a/masque/label.py b/masque/label.py index 738ab20..2a2b56d 100644 --- a/masque/label.py +++ b/masque/label.py @@ -24,6 +24,9 @@ class Label: # Label string _string = None # type: str + # Arbitrary identifier tuple + identifier: Tuple + # ---- Properties # offset property @property @@ -76,6 +79,7 @@ class Label: string: str, offset: vector2=(0.0, 0.0), layer: int=0): + self.identifier = () self.string = string self.offset = numpy.array(offset, dtype=float) self.layer = layer diff --git a/masque/repetition.py b/masque/repetition.py index efa91a7..8618ba6 100644 --- a/masque/repetition.py +++ b/masque/repetition.py @@ -3,7 +3,7 @@ instances of a Pattern in the same parent Pattern. """ -from typing import Union, List, Dict +from typing import Union, List, Dict, Tuple import copy import numpy @@ -37,6 +37,8 @@ class GridRepetition: a_count = None # type: int b_count = 1 # type: int + identifier: Tuple + def __init__(self, pattern: 'Pattern', a_vector: numpy.ndarray, @@ -77,6 +79,7 @@ class GridRepetition: self.a_count = a_count self.b_count = b_count + self.identifier = () self.pattern = pattern self.offset = offset self.rotation = rotation diff --git a/masque/subpattern.py b/masque/subpattern.py index 88fe2ee..c84305c 100644 --- a/masque/subpattern.py +++ b/masque/subpattern.py @@ -3,7 +3,7 @@ offset, rotation, scaling, and other such properties to the reference. """ -from typing import Union, List, Dict +from typing import Union, List, Dict, Tuple import copy import numpy @@ -28,6 +28,7 @@ class SubPattern: _dose = 1.0 # type: float _scale = 1.0 # type: float _mirrored = None # type: List[bool] + identifier: Tuple def __init__(self, pattern: 'Pattern', @@ -36,6 +37,7 @@ class SubPattern: mirrored: List[bool]=None, dose: float=1.0, scale: float=1.0): + self.identifier = () self.pattern = pattern self.offset = offset self.rotation = rotation