Remove support for dose
Since there isn't GDS/OASIS level support for dose, this can be mostly handled by using arbitrary layers/dtypes directly. Dose scaling isn't handled as nicely that way, but it corresponds more directly to what gets written to file.
This commit is contained in:
parent
f7a2edfe23
commit
c7f3e7ee52
18 changed files with 57 additions and 340 deletions
|
|
@ -97,7 +97,6 @@ class Ellipse(Shape, metaclass=AutoSlots):
|
|||
rotation: float = 0,
|
||||
mirrored: Sequence[bool] = (False, False),
|
||||
layer: layer_t = 0,
|
||||
dose: float = 1.0,
|
||||
repetition: Optional[Repetition] = None,
|
||||
annotations: Optional[annotations_t] = None,
|
||||
raw: bool = False,
|
||||
|
|
@ -111,7 +110,6 @@ class Ellipse(Shape, metaclass=AutoSlots):
|
|||
self._repetition = repetition
|
||||
self._annotations = annotations if annotations is not None else {}
|
||||
self._layer = layer
|
||||
self._dose = dose
|
||||
else:
|
||||
self.radii = radii
|
||||
self.offset = offset
|
||||
|
|
@ -119,7 +117,6 @@ class Ellipse(Shape, metaclass=AutoSlots):
|
|||
self.repetition = repetition
|
||||
self.annotations = annotations if annotations is not None else {}
|
||||
self.layer = layer
|
||||
self.dose = dose
|
||||
[self.mirror(a) for a, do in enumerate(mirrored) if do]
|
||||
self.poly_num_points = poly_num_points
|
||||
self.poly_max_arclen = poly_max_arclen
|
||||
|
|
@ -167,7 +164,7 @@ class Ellipse(Shape, metaclass=AutoSlots):
|
|||
ys = r1 * sin_th
|
||||
xys = numpy.vstack((xs, ys)).T
|
||||
|
||||
poly = Polygon(xys, dose=self.dose, layer=self.layer, offset=self.offset, rotation=self.rotation)
|
||||
poly = Polygon(xys, layer=self.layer, offset=self.offset, rotation=self.rotation)
|
||||
return [poly]
|
||||
|
||||
def get_bounds(self) -> NDArray[numpy.float64]:
|
||||
|
|
@ -199,10 +196,9 @@ class Ellipse(Shape, metaclass=AutoSlots):
|
|||
scale = self.radius_y
|
||||
angle = (self.rotation + pi / 2) % pi
|
||||
return ((type(self), radii, self.layer),
|
||||
(self.offset, scale / norm_value, angle, False, self.dose),
|
||||
(self.offset, scale / norm_value, angle, False),
|
||||
lambda: Ellipse(radii=radii * norm_value, layer=self.layer))
|
||||
|
||||
def __repr__(self) -> str:
|
||||
rotation = f' r{self.rotation*180/pi:g}' if self.rotation != 0 else ''
|
||||
dose = f' d{self.dose:g}' if self.dose != 1 else ''
|
||||
return f'<Ellipse l{self.layer} o{self.offset} r{self.radii}{rotation}{dose}>'
|
||||
return f'<Ellipse l{self.layer} o{self.offset} r{self.radii}{rotation}>'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue