Compare commits

..

No commits in common. "55e3066485e422b704abe0b7be5ea3196f45f677" and "aefd79fb5d8cc6e23d549fb19eaad0ff2c228320" have entirely different histories.

2 changed files with 2 additions and 25 deletions

View File

@ -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,

View File

@ -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