Compare commits

..

99 Commits

Author SHA1 Message Date
jan
e69ebc8070 [dxf] make sure layer tuple contents are ints 2025-12-10 21:22:56 -08:00
jan
13d013aaf3 [dxf] don't need to add polygon offset since it's zero 2025-12-10 21:22:38 -08:00
07fc8b2ad0 fixup! [PortPather] generalize to multi-port functions where possible 2025-12-01 11:58:55 -08:00
b12b406df4 fixup! [PortPather] generalize to multi-port functions where possible 2025-12-01 11:58:39 -08:00
6c6b1c16ff fixup! [PortPather] generalize to multi-port functions where possible 2025-11-21 20:35:17 -08:00
jan
24af43ff48 update TODO in readme 2025-11-21 01:09:38 -08:00
jan
1505844a0a [PortPather] generalize to multi-port functions where possible 2025-11-21 01:04:55 -08:00
jan
c064ee9d8f [Pattern] use 1-axis instead of axis-1 2025-11-20 13:05:30 -08:00
jan
22b53a930c [AutoTool] S-bend to L-bend fallback does not work yet, should throw an error 2025-11-20 13:01:51 -08:00
jan
355365c0dc [Pather / RenderPather] Fix handling of jog polarity 2025-11-20 13:00:57 -08:00
jan
2b835ec3a4 [Port] mirror() should not mirror port position, only orientation 2025-11-20 12:59:20 -08:00
jan
519e6ad618 minor readme cleanup 2025-11-19 23:19:29 -08:00
jan
e75a76e5a8 [RenderPather.plug] fix ok_connections param 2025-11-19 23:15:22 -08:00
jan
5e65dfafa1 cleanup 2025-11-19 23:14:54 -08:00
jan
04905153d3 [PortPather] add some more port-related convenience functions 2025-11-19 23:14:36 -08:00
jan
1eba387b6a [AutoTool / SimpleTool] allow choice between rotating or mirroring bends 2025-11-19 23:14:02 -08:00
jan
5fbbaa0648 [Library.flatten] add dangling_ok param 2025-11-19 23:08:17 -08:00
jan
4dc81bd9f7 fixup! [Tool / AutoTool / Pather / RenderPather / PatherMixin] add support for S-bends 2025-11-19 02:23:40 -08:00
jan
d3b83a7543 fixup! [PortPather] add rename_to and rename_from 2025-11-19 02:23:11 -08:00
jan
184168f623 [PatherMixin] add thru arg to path_into and rework portlist inheritance 2025-11-19 01:24:02 -08:00
jan
334bcade31 [PortPather] add rename_to and rename_from 2025-11-19 00:58:35 -08:00
jan
90b3157b00 [PatherMixin] add at() for generating PortPather 2025-11-19 00:32:14 -08:00
jan
7c5c1c26c8 add missing float_raster dep for manhattanize_slow 2025-11-19 00:17:38 -08:00
jan
fcd3d9663d fixup! [plug()] rename inherit_name arg to thru and allow passing a string 2025-11-19 00:17:10 -08:00
jan
2b7b1cd6e2 [PortPather] add PortPather 2025-11-19 00:16:34 -08:00
jan
dfd61b3a39 fixup! [plug()] rename inherit_name arg to thru and allow passing a string 2025-11-19 00:07:36 -08:00
jan
3a1a4b9126 [RenderPather] whitespace 2025-11-19 00:07:07 -08:00
jan
8a0c985e36 [plug()] rename inherit_name arg to thru and allow passing a string
Breaking change

Affects Pattern, Builder, Pather, RenderPather
2025-11-19 00:06:57 -08:00
jan
8d91fb4915 fixup! [Tool / AutoTool / Pather / RenderPather / PatherMixin] add support for S-bends 2025-11-18 23:06:03 -08:00
jan
146e6808ee add some whitespace 2025-11-18 23:01:51 -08:00
f831ccd873 fixup! [Tool / AutoTool / Pather / RenderPather / PatherMixin] add support for S-bends 2025-11-18 22:12:13 -08:00
982304bd10 fixup! [Tool / AutoTool / Pather / RenderPather / PatherMixin] add support for S-bends 2025-11-18 22:11:59 -08:00
049098ade5 [Tool / AutoTool / Pather / RenderPather / PatherMixin] add support for S-bends 2025-11-17 22:12:24 -08:00
dbaa6fc1f3 [Port] add Port.measure_travel() 2025-11-17 22:11:55 -08:00
1fe1334f34 [Tool / Pather] fix some doc typos 2025-11-17 22:11:04 -08:00
7389be9129 [Tool / AutoTool] clarify some docstings 2025-11-16 22:58:02 -08:00
fe49e1e25b [Pather] clarify a variable name 2025-11-16 22:57:20 -08:00
1faf5ccad5 [AutoTool] enable S-bends 2025-11-14 21:30:49 -08:00
3ba2ffd33f [AutoTool / SimpleTool] remove append arg 2025-11-14 21:30:49 -08:00
40e55a9067 [SimpleTool/AutoTool] clarify some error messages 2025-11-14 21:30:49 -08:00
jan
1b79cd6f45 fixup! [AutoTool] Add first pass for AutoTool 2025-11-13 12:58:05 -08:00
639850ab29 [AutoTool/SimpleTool/BasicTool] Rename BasicTool->SimpleTool and remove transition handling. Export AutoTool and SimpleTool at top level. 2025-11-13 00:39:41 -08:00
2bf44f334a fixup! [AutoTool] pass in kwargs to straight fn call 2025-11-13 00:08:32 -08:00
d37e6b873c [AutoTool] pass in kwargs to straight fn call 2025-11-13 00:01:12 -08:00
2a8879e3d4 [AutoTool] consolidate duplicate code for path() and render() 2025-11-12 23:53:53 -08:00
de534a755f fixup! [AutoTool] Use more dataclasses to clarify internal code 2025-11-12 23:34:23 -08:00
41bbfee80b fixup! [AutoTool] Use more dataclasses to clarify internal code 2025-11-12 23:34:11 -08:00
c7a8fac890 [AutoTool] add add_complementary_transitions() 2025-11-12 23:31:58 -08:00
fe440b0c53 [AutoTool] Use more dataclasses to clarify internal code 2025-11-12 18:50:57 -08:00
a62deb211c [gdsii_arrow] fix or suppress a bunch of linter messages 2025-11-12 18:50:23 -08:00
01f624cb6a [PolyCollection] rename setter arg to placate linter 2025-11-12 17:49:12 -08:00
8996d53479 [format_stacktrace] suppress linter 2025-11-12 17:47:07 -08:00
899d05217e [AutoTool] support min/max length for straight segments 2025-11-12 17:42:52 -08:00
f374651bc4 fixup! fixup! [Pather / RenderPather] move common functionality into PatherMixin; redo hierarchy 2025-11-12 17:42:16 -08:00
fd03e09ea1 [BasicTool/AutoTool] fix port orientation for straight segments when using RenderPather 2025-11-12 17:40:34 -08:00
ba7fab6db2 fixup! fixup! [Pather / RenderPather] move common functionality into PatherMixin; redo hierarchy 2025-11-12 17:38:46 -08:00
ace34aa7a3 [AutoTool] Add first pass for AutoTool 2025-11-12 01:08:58 -08:00
69e6b1bff1 fixup! [Pather / RenderPather] move common functionality into PatherMixin; redo hierarchy 2025-11-11 20:52:33 -08:00
701c297152 fixup! [Pather / RenderPather] move common functionality into PatherMixin; redo hierarchy 2025-11-11 20:44:06 -08:00
74f341db77 fixup! [pather] code style changes 2025-11-11 20:42:15 -08:00
4ce7525263 [RenderPather] add wrapped label/ref/polygon/rect functions 2025-11-11 20:40:13 -08:00
e3c1c46b10 [Pather/RenderPather/PatherMixin] clean up imports 2025-11-11 20:35:55 -08:00
da35019dc8 [Pather / RenderPather] move common functionality into PatherMixin; redo hierarchy
- (BREAKING change) Pather.mpath no longer wraps the whole bus into a
container, since this has no equivalent in RenderPather. Possible this
functionality will return in the future
- Removed `tool_port_names` arg from Pather functions
- In general RenderPather should be much closer to Pather now
2025-11-11 20:30:45 -08:00
d71ede927c [pather] code style changes 2025-11-11 18:30:23 -08:00
83850c1cbc [error] also exclude concurrent.futures.process from traces 2025-10-30 01:25:16 -07:00
ebd1fbdfbf [error] also exclude frames starting with '<frozen' 2025-10-30 01:22:46 -07:00
3e88ed9438 [file.svg] use logger.warning over warnings.warn (for flexibility) 2025-10-30 01:15:44 -07:00
006e7c428c [ports] make port mismatch deltas more obvious 2025-10-30 01:15:20 -07:00
dadaf48d35 [error, ports] Make stack traces more directly reflect teh location of the issue 2025-10-30 01:14:37 -07:00
240007eb7a misc cleanup: variable naming, typing, comments 2025-10-30 01:13:23 -07:00
ee4147ef99 [Path / PolyCollection / Polygon] fix order of rotation/offset 2025-10-26 21:36:29 -07:00
fe231e558a [Polygon / Path / PolyCollection] Force polygon/path offset to (0, 0)
And disallow setting it.

This offset was basically just a footgun.
2025-10-26 19:13:10 -07:00
ffc8dccbef [Polygon.rect] use floats more explicitly 2025-10-26 18:45:58 -07:00
debb27cdc8 Various type-checking improvements 2025-10-26 18:45:09 -07:00
5a4be88672 [file.gdsii] enable wider annotation key range (to 126 inclusive) 2025-10-26 18:43:45 -07:00
a2fa7648df [BasicTool] enable straight to handle trees (not just flat patterns) 2025-10-26 18:43:14 -07:00
aa175fbb75 [builder.tools] Handle in_ptype=None 2025-10-26 18:28:21 -07:00
00021c00e6 [gdsii_arrow] fix rep_valid 2025-09-14 12:37:49 -07:00
4e69273b5e [gdsii_arrow] fill some more nulls 2025-09-14 12:37:49 -07:00
923c00d72f [gdsii_arrow] fixup 2025-09-14 12:37:49 -07:00
7bd15ede88 [traits.annotatable] Don't break when setting annotations to None 2025-09-14 12:37:49 -07:00
4960c95637 [PolyCollection] many fixes 2025-09-14 12:37:49 -07:00
adbc86100b [gdsii_arrow] fixup annotation types 2025-09-14 12:37:49 -07:00
cb178bb694 [gdsii_arrow] make polycollections if able 2025-09-14 12:37:49 -07:00
18e5a4ac5a [gdsii_arrow] clean unused var in loop 2025-09-14 12:37:49 -07:00
215926269e [gdsii_arrow] fix var name typo 2025-09-14 12:37:48 -07:00
4487c3825b [shapes] Don't create empty dicts for annotations 2025-09-14 12:37:48 -07:00
5608a6717e [PolyCollection] rework PolyCollection into ndarrays of vertices and offsets 2025-09-14 12:37:48 -07:00
b0ec2a51f5 fix some polycollection syntax 2025-09-14 12:37:48 -07:00
jan
ded473c290 [wip] add poly_collection shape 2025-09-14 12:37:48 -07:00
d2f85c70ee fixup indexing 2025-09-14 12:37:48 -07:00
050f1b597c [gdsii_arrow] add some TODO notes 2025-09-14 12:37:48 -07:00
b4116a738d [gdsii_arrow] use direct access for all element types 2025-09-14 12:37:48 -07:00
aae467021b [utils.curves] ignore re-import of trapeziod 2025-09-14 12:37:48 -07:00
5ae990a83b allow annotations to be None
breaking change, but properties are seldom used by anyone afaik
2025-09-14 12:37:48 -07:00
3046e33742 gdsii_arrow wip 2025-09-14 12:37:48 -07:00
6d8efe82f2 split out _read_to_arrow
for ease of debugging
2025-09-14 12:37:48 -07:00
534002d4b5 actually make use of raw mode 2025-09-14 12:37:48 -07:00
jan
4364c809f3 add gdsii_arrow 2025-09-14 12:37:47 -07:00
2 changed files with 2 additions and 7 deletions

View File

@ -256,11 +256,6 @@ class Polygon(Shape):
Returns:
A Polygon object containing the requested rectangle
"""
if sum(int(pp is None) for pp in (xmin, xmax, xctr, lx)) != 2:
raise PatternError('Exactly two of xmin, xctr, xmax, lx must be provided!')
if sum(int(pp is None) for pp in (ymin, ymax, yctr, ly)) != 2:
raise PatternError('Exactly two of ymin, yctr, ymax, ly must be provided!')
if lx is None:
if xctr is None:
assert xmin is not None

View File

@ -18,9 +18,9 @@ def remove_duplicate_vertices(vertices: ArrayLike, closed_path: bool = True) ->
`vertices` with no consecutive duplicates. This may be a view into the original array.
"""
vertices = numpy.asarray(vertices)
duplicates = (vertices == numpy.roll(vertices, -1, axis=0)).all(axis=1)
duplicates = (vertices == numpy.roll(vertices, 1, axis=0)).all(axis=1)
if not closed_path:
duplicates[-1] = False
duplicates[0] = False
return vertices[~duplicates]