add raw
arg, which skips setter funcs
This commit is contained in:
parent
7ce601dc1d
commit
f57ccc073d
@ -160,20 +160,32 @@ class Arc(Shape, metaclass=AutoSlots):
|
|||||||
layer: layer_t = 0,
|
layer: layer_t = 0,
|
||||||
dose: float = 1.0,
|
dose: float = 1.0,
|
||||||
repetition: Optional[Repetition] = None,
|
repetition: Optional[Repetition] = None,
|
||||||
locked: bool = False):
|
locked: bool = False,
|
||||||
|
raw: bool = False,
|
||||||
|
):
|
||||||
object.__setattr__(self, 'locked', False)
|
object.__setattr__(self, 'locked', False)
|
||||||
self.identifier = ()
|
self.identifier = ()
|
||||||
|
if raw:
|
||||||
|
self._radii = radii
|
||||||
|
self._angles = angles
|
||||||
|
self._width = width
|
||||||
|
self._offset = offset
|
||||||
|
self._rotation = rotation
|
||||||
|
self._repetition = repetition
|
||||||
|
self._layer = layer
|
||||||
|
self._dose = dose
|
||||||
|
else:
|
||||||
self.radii = radii
|
self.radii = radii
|
||||||
self.angles = angles
|
self.angles = angles
|
||||||
self.width = width
|
self.width = width
|
||||||
self.offset = offset
|
self.offset = offset
|
||||||
self.rotation = rotation
|
self.rotation = rotation
|
||||||
[self.mirror(a) for a, do in enumerate(mirrored) if do]
|
self.repetition = repetition
|
||||||
self.layer = layer
|
self.layer = layer
|
||||||
self.dose = dose
|
self.dose = dose
|
||||||
self.poly_num_points = poly_num_points
|
self.poly_num_points = poly_num_points
|
||||||
self.poly_max_arclen = poly_max_arclen
|
self.poly_max_arclen = poly_max_arclen
|
||||||
self.repetition = repetition
|
[self.mirror(a) for a, do in enumerate(mirrored) if do]
|
||||||
self.locked = locked
|
self.locked = locked
|
||||||
|
|
||||||
def __deepcopy__(self, memo: Dict = None) -> 'Arc':
|
def __deepcopy__(self, memo: Dict = None) -> 'Arc':
|
||||||
|
@ -95,18 +95,28 @@ class Ellipse(Shape, metaclass=AutoSlots):
|
|||||||
layer: layer_t = 0,
|
layer: layer_t = 0,
|
||||||
dose: float = 1.0,
|
dose: float = 1.0,
|
||||||
repetition: Optional[Repetition] = None,
|
repetition: Optional[Repetition] = None,
|
||||||
locked: bool = False):
|
locked: bool = False,
|
||||||
|
raw: bool = False,
|
||||||
|
):
|
||||||
object.__setattr__(self, 'locked', False)
|
object.__setattr__(self, 'locked', False)
|
||||||
self.identifier = ()
|
self.identifier = ()
|
||||||
|
if raw:
|
||||||
|
self._radii = radii
|
||||||
|
self._offset = offset
|
||||||
|
self._rotation = rotation
|
||||||
|
self._repetition = repetition
|
||||||
|
self._layer = layer
|
||||||
|
self._dose = dose
|
||||||
|
else:
|
||||||
self.radii = radii
|
self.radii = radii
|
||||||
self.offset = offset
|
self.offset = offset
|
||||||
self.rotation = rotation
|
self.rotation = rotation
|
||||||
[self.mirror(a) for a, do in enumerate(mirrored) if do]
|
self.repetition = repetition
|
||||||
self.layer = layer
|
self.layer = layer
|
||||||
self.dose = dose
|
self.dose = dose
|
||||||
|
[self.mirror(a) for a, do in enumerate(mirrored) if do]
|
||||||
self.poly_num_points = poly_num_points
|
self.poly_num_points = poly_num_points
|
||||||
self.poly_max_arclen = poly_max_arclen
|
self.poly_max_arclen = poly_max_arclen
|
||||||
self.repetition = repetition
|
|
||||||
self.locked = locked
|
self.locked = locked
|
||||||
|
|
||||||
def __deepcopy__(self, memo: Dict = None) -> 'Ellipse':
|
def __deepcopy__(self, memo: Dict = None) -> 'Ellipse':
|
||||||
|
@ -150,22 +150,32 @@ class Path(Shape, metaclass=AutoSlots):
|
|||||||
dose: float = 1.0,
|
dose: float = 1.0,
|
||||||
repetition: Optional[Repetition] = None,
|
repetition: Optional[Repetition] = None,
|
||||||
locked: bool = False,
|
locked: bool = False,
|
||||||
|
raw: bool = False,
|
||||||
):
|
):
|
||||||
object.__setattr__(self, 'locked', False)
|
object.__setattr__(self, 'locked', False)
|
||||||
self._cap_extensions = None # Since .cap setter might access it
|
self._cap_extensions = None # Since .cap setter might access it
|
||||||
|
|
||||||
self.identifier = ()
|
self.identifier = ()
|
||||||
|
if raw:
|
||||||
|
self._vertices = vertices
|
||||||
|
self._offset = offset
|
||||||
|
self._repetition = repetition
|
||||||
|
self._layer = layer
|
||||||
|
self._dose = dose
|
||||||
|
self._width = width
|
||||||
|
self._cap = cap
|
||||||
|
self._cap_extensions = cap_extensions
|
||||||
|
else:
|
||||||
|
self.vertices = vertices
|
||||||
self.offset = offset
|
self.offset = offset
|
||||||
|
self.repetition = repetition
|
||||||
self.layer = layer
|
self.layer = layer
|
||||||
self.dose = dose
|
self.dose = dose
|
||||||
self.vertices = vertices
|
|
||||||
self.width = width
|
self.width = width
|
||||||
self.cap = cap
|
self.cap = cap
|
||||||
if cap_extensions is not None:
|
|
||||||
self.cap_extensions = cap_extensions
|
self.cap_extensions = cap_extensions
|
||||||
self.rotate(rotation)
|
self.rotate(rotation)
|
||||||
[self.mirror(a) for a, do in enumerate(mirrored) if do]
|
[self.mirror(a) for a, do in enumerate(mirrored) if do]
|
||||||
self.repetition = repetition
|
|
||||||
self.locked = locked
|
self.locked = locked
|
||||||
|
|
||||||
def __deepcopy__(self, memo: Dict = None) -> 'Path':
|
def __deepcopy__(self, memo: Dict = None) -> 'Path':
|
||||||
|
@ -78,16 +78,24 @@ class Polygon(Shape, metaclass=AutoSlots):
|
|||||||
dose: float = 1.0,
|
dose: float = 1.0,
|
||||||
repetition: Optional[Repetition] = None,
|
repetition: Optional[Repetition] = None,
|
||||||
locked: bool = False,
|
locked: bool = False,
|
||||||
|
raw: bool = False,
|
||||||
):
|
):
|
||||||
object.__setattr__(self, 'locked', False)
|
object.__setattr__(self, 'locked', False)
|
||||||
self.identifier = ()
|
self.identifier = ()
|
||||||
self.layer = layer
|
if raw:
|
||||||
self.dose = dose
|
self._vertices = vertices
|
||||||
|
self._offset = offset
|
||||||
|
self._repetition = repetition
|
||||||
|
self._layer = layer
|
||||||
|
self._dose = dose
|
||||||
|
else:
|
||||||
self.vertices = vertices
|
self.vertices = vertices
|
||||||
self.offset = offset
|
self.offset = offset
|
||||||
|
self.repetition = repetition
|
||||||
|
self.layer = layer
|
||||||
|
self.dose = dose
|
||||||
self.rotate(rotation)
|
self.rotate(rotation)
|
||||||
[self.mirror(a) for a, do in enumerate(mirrored) if do]
|
[self.mirror(a) for a, do in enumerate(mirrored) if do]
|
||||||
self.repetition = repetition
|
|
||||||
self.locked = locked
|
self.locked = locked
|
||||||
|
|
||||||
def __deepcopy__(self, memo: Optional[Dict] = None) -> 'Polygon':
|
def __deepcopy__(self, memo: Optional[Dict] = None) -> 'Polygon':
|
||||||
|
@ -68,18 +68,29 @@ class Text(RotatableImpl, Shape, metaclass=AutoSlots):
|
|||||||
dose: float = 1.0,
|
dose: float = 1.0,
|
||||||
repetition: Optional[Repetition] = None,
|
repetition: Optional[Repetition] = None,
|
||||||
locked: bool = False,
|
locked: bool = False,
|
||||||
|
raw: bool = False,
|
||||||
):
|
):
|
||||||
object.__setattr__(self, 'locked', False)
|
object.__setattr__(self, 'locked', False)
|
||||||
self.identifier = ()
|
self.identifier = ()
|
||||||
|
if raw:
|
||||||
|
self._offset = offset
|
||||||
|
self._layer = layer
|
||||||
|
self._dose = dose
|
||||||
|
self._string = string
|
||||||
|
self._height = height
|
||||||
|
self._rotation = rotation
|
||||||
|
self._mirrored = mirrored
|
||||||
|
self._repetition = repetition
|
||||||
|
else:
|
||||||
self.offset = offset
|
self.offset = offset
|
||||||
self.layer = layer
|
self.layer = layer
|
||||||
self.dose = dose
|
self.dose = dose
|
||||||
self.string = string
|
self.string = string
|
||||||
self.height = height
|
self.height = height
|
||||||
self.rotation = rotation
|
self.rotation = rotation
|
||||||
self.font_path = font_path
|
|
||||||
self.mirrored = mirrored
|
self.mirrored = mirrored
|
||||||
self.repetition = repetition
|
self.repetition = repetition
|
||||||
|
self.font_path = font_path
|
||||||
self.locked = locked
|
self.locked = locked
|
||||||
|
|
||||||
def __deepcopy__(self, memo: Dict = None) -> 'Text':
|
def __deepcopy__(self, memo: Dict = None) -> 'Text':
|
||||||
|
Loading…
Reference in New Issue
Block a user