diff --git a/masque/builder/builder.py b/masque/builder/builder.py index 1fbbe88..a401abc 100644 --- a/masque/builder/builder.py +++ b/masque/builder/builder.py @@ -4,7 +4,6 @@ Simplified Pattern assembly (`Builder`) from typing import Self, Sequence, Mapping import copy import logging -from functools import wraps from numpy.typing import ArrayLike @@ -189,26 +188,6 @@ class Builder(PortList): new = Builder(library=library, pattern=pat, name=name) return new - @wraps(Pattern.label) - def label(self, *args, **kwargs) -> Self: - self.pattern.label(*args, **kwargs) - - @wraps(Pattern.ref) - def ref(self, *args, **kwargs) -> Self: - self.pattern.ref(*args, **kwargs) - - @wraps(Pattern.polygon) - def polygon(self, *args, **kwargs) -> Self: - self.pattern.polygon(*args, **kwargs) - - @wraps(Pattern.rect) - def rect(self, *args, **kwargs) -> Self: - self.pattern.rect(*args, **kwargs) - - @wraps(Pattern.path) - def path(self, *args, **kwargs) -> Self: - self.pattern.path(*args, **kwargs) - def plug( self, other: Abstract | str | Pattern | TreeView, diff --git a/masque/shapes/arc.py b/masque/shapes/arc.py index a2631c4..1841aed 100644 --- a/masque/shapes/arc.py +++ b/masque/shapes/arc.py @@ -235,16 +235,14 @@ class Arc(Shape): n_pts = numpy.ceil(2 * pi * max(self.radii) / max_arclen).astype(int) arc_lengths, thetas = get_arclens(n_pts, *a_ranges[0 if inner else 1]) - keep = [0] + keep = [] removable = (numpy.cumsum(arc_lengths) <= max_arclen) - start = 1 + start = 0 while start < arc_lengths.size: next_to_keep = start + numpy.where(removable)[0][-1] # TODO: any chance we haven't sampled finely enough? keep.append(next_to_keep) removable = (numpy.cumsum(arc_lengths[next_to_keep + 1:]) <= max_arclen) start = next_to_keep + 1 - if keep[-1] != thetas.size - 1: - keep.append(thetas.size -1) return thetas[keep] wh = self.width / 2.0