Commit Graph

1733 Commits

Author SHA1 Message Date
Matthias Koefferlein 604db5a1aa Updating test data 2026-07-19 20:56:05 +02:00
Matthias Koefferlein 484ab91850 WIP: deep mode implementation of enhanced 2-layer check, tests 2026-07-19 20:53:27 +02:00
Matthias Koefferlein b51187bf7c Merge branch 'master' into wip 2026-07-19 15:13:40 +02:00
Matthias Koefferlein edad8f5221 Bugfix: update layer names in layer list (when used in secondary fashion) on reload
1. The readers will overwrite the layer names if given in secondary fashion
   (additionally to layer/datatype)
2. The layer properties nodes will update the "real source" according to
   the actual name if the name is used in addition to layer/datatypes
2026-07-17 23:46:14 +02:00
Matthias Köfferlein 3c6b342448
Merge pull request #2387 from querielo/kirill/pixelbuffer-to-bytes
Add PixelBuffer#to_bytes for zero-overhead pixel access
2026-07-16 22:58:35 +02:00
Kirill Osipov 9a606ec4e9 Cap PixelBuffer.from_bytes dimensions at 64k x 64k
Following review feedback, the reader now rejects a header claiming a
width or height beyond 65536, guarding against malformed byte streams
that would otherwise trigger an unreasonable allocation. The writer
stays full 32-bit ('unlimited'), and native little-endian order and the
transparency mask are kept as-is. Adds Ruby and Python tests for the
oversized-header rejection.

Ref: https://github.com/KLayout/klayout/pull/2387#issuecomment-4984941409
2026-07-16 19:03:34 +02:00
Kirill Osipov 2fa7b24345 Add PixelBuffer#from_bytes and width/height header to to_bytes 2026-07-16 19:03:34 +02:00
Matthias Köfferlein 4ac26d686d
Merge pull request #2388 from KLayout/bugfix/issue-2384
Fixed issue #2384
2026-07-12 00:23:03 +02:00
Matthias Koefferlein abe9479ced Bugfix: removing a pin from a Circuit does not crash if the pin was not disconnected before. Now it's disconnected automatically. 2026-07-12 00:14:30 +02:00
Matthias Koefferlein 1cd9cbc8ba Enhancement: using PCell parameter 'name' won't break PCell's cell_name_impl default implementation 2026-07-11 22:32:42 +02:00
Matthias Koefferlein b2afb55fe3 Convenience constructor for Layout from a cell (hierarchical copy) 2026-07-11 21:56:02 +02:00
Matthias Koefferlein 43a5d8c548 Fixed issue #2384
Problem was that the magnification was applied twice
when running the checks inside compound DRC checks.
2026-07-09 23:43:25 +02:00
Matthias Koefferlein d352db146f Trying to fix unit tests with Python 3.14 - it delivers a different reference count under unit test conditions 2026-06-20 00:06:42 +02:00
Matthias Koefferlein 7d5f61db59 Issue #2360: Implemented name sorting by default (can be turned off) for 'make_top_level_pins' 2026-05-26 23:26:16 +02:00
Matthias Koefferlein be8b165b6a Merge remote-tracking branch 'origin/bugfix/issue-2350' into wip 2026-05-25 20:51:42 +02:00
Matthias Koefferlein a10cfce1e7 Testdata variants needed (one for clang?) 2026-05-25 19:23:56 +02:00
Matthias Koefferlein 37977d21e9 Fixing issue #2350 (strm2oas writes empty OAS)
Problem was that the OASIS writer was simply ignoring
all top level proxy cells (PCells, Library references).

The original bug #1835 fixed that by changing the
reader behavior, so it would keep top level proxies.
However, doing the spin through the writer got them
removed and in addition, the cleanup happing during
editing would also remove them.

Solution is to centralize the strategy of cleaning
cells. The cleanup now is changed to not remove
proxy top cells if they are the only ones. This is
consistent with the previous reader-only behavior.

The writer implements the same behavior by means
dropping cells marked for cleanup, instead of simply
skipping all proxy cells.
2026-05-25 00:09:38 +02:00
Matthias Koefferlein 9415e40916 Updating test data 2026-05-24 19:21:44 +02:00
Matthias Koefferlein 0648ee1bd0 Merge branch 'wip' 2026-05-24 15:26:19 +02:00
Matthias Koefferlein 4afe2e5e8a Merge remote-tracking branch 'origin/master' into feature/issue-2337 2026-05-20 19:07:39 +02:00
Matthias Koefferlein 8f1e432146 Updating test data 2026-05-09 19:04:19 +02:00
Matthias Koefferlein 964083ba12 Updating test data 2026-05-07 00:21:39 +02:00
Matthias Koefferlein 9630bff240 A contribution to issue #2345 mitigation
With this patch, empty layers can be used to place device
terminals on and these shapes are visible on those layers.
This allows splitting the terminal shapes and used those
shapes to connect down to different substrates.

The patch turns EmptyLayer into a DeepLayer when used
as terminal layer for device extraction.
2026-05-05 23:08:09 +02:00
Matthias Koefferlein c85be6bce5 Adding string serialization "from_s" for objects with properties (CAUTION: side effect!)
Problem was that "to_s" did not deliver a parsable string for the
properties. This is fixed, but the format of the properties part
of the string changes.
2026-05-03 20:27:15 +02:00
Matthias Koefferlein 77fb74e072 Supporting to_bytes and from_bytes also for the ..WithProperties types 2026-05-03 18:10:00 +02:00
Matthias Koefferlein fdaa93d234 First implementation of to_bytes/from_bytes for Vector,Point,Box,Polygon,SimplePolygon,Trans,CplxTrans,Text,Path,Edge,EdgePair and variants 2026-05-02 23:21:35 +02:00
Matthias Koefferlein 1740523092 Introducing a number of convenience methods for Layout
* Layout#delete_cells with a list of cell object
* Layout#delete_cell_rec with a cell object
* Layout#prune_cell with a cell object
* Layout#prune_cells for pruning multiple cells in one call
* Layout#prune_subcells with a cell object
* Layout#prune_subcells with multiple root cells
* Layout#flatten with a cell object
* Layout#flatten_into with cell objects
* Layout#delete_cell with a cell object
* Default value "all" for "levels" argument in "prune_subcells" and "prune_cell"
* Default value "all" for "levels" and "true" for "prune" argument in "flatten"
* Default value "all" for "levels" and "unity" for "trans" argument in "flatten_into"
2026-05-02 15:46:29 +02:00
Matthias Koefferlein 0728feba33 Bugfix: rbaTests:dbPCellTests were disabled, added tests for new features for cold proxies 2026-05-02 00:20:57 +02:00
Matthias Koefferlein f70c3abff5 Fixed unit tests 2026-04-14 20:29:04 +02:00
Matthias Köfferlein 0fdce69579
Merge pull request #2304 from KLayout/bugfix/issue-2299
Bugfix/issue 2299
2026-04-14 08:59:07 +02:00
Matthias Köfferlein 72c4af9f94
Merge pull request #2308 from KLayout/bugfix/issue-2305
Bugfix/issue 2305
2026-04-14 08:57:19 +02:00
Matthias Koefferlein adb81262a4 Experimental feature: Region#peel to reduce hierarchical load 2026-04-12 01:03:37 +02:00
Matthias Köfferlein dd1a3ee7d1
Merge pull request #2309 from KLayout/feature/issue-2306
Implemented solution for #2306
2026-04-06 14:37:19 +02:00
Matthias Koefferlein 13a1bf713d Added DRC integration and tests 2026-04-04 20:05:37 +02:00
Matthias Koefferlein 9b2d1fe0be Adding the description option to library declaration files 2026-04-03 23:05:07 +02:00
Matthias Koefferlein ad850f3d83 Merge branch 'lib-file' into bugfix/issue-2305 2026-04-03 15:42:00 +02:00
Matthias Koefferlein 1abfd5363e Fixed an infinite loop 2026-04-03 00:30:01 +02:00
Matthias Koefferlein a6dce8c2ad Improving Layout::cleanup to consolidate library and cold proxies and to establish proper cell names if possible 2026-04-02 22:14:11 +02:00
Matthias Koefferlein dcc7f28c77 Updating test data 2026-03-31 22:09:27 +02:00
Matthias Koefferlein 7cec679d39 Taking care of complex library reference scenarios where libraries self-reference and under the presence of stale references. Main issue is order of resolution and indirect references due to replication. Solution is to repeat resolution until saturated. A test is supplied. 2026-03-31 21:35:33 +02:00
Matthias Koefferlein c03a617fe2 Added some tests for the netlist browser API 2026-03-23 21:42:49 +01:00
Matthias Koefferlein 108baa4d79 New test data 2026-03-22 21:53:25 +01:00
Matthias Koefferlein 56e84e7056 Added test for lib file reading 2026-03-22 16:01:39 +01:00
Matthias Koefferlein 355a75dafe Added a missing file (not related to the issue, but to the branch we started from) 2026-03-21 17:15:46 +01:00
Matthias Koefferlein 83b9fafa9d Added missing files 2026-03-21 17:12:10 +01:00
Matthias Koefferlein f501f039c0 Added tests and two convenience methods
The two convenience methods are

Library#library_from_file
Library#library_from_files

Both create and register a Library object tied to a file.
This object supports proper reloading and re-mapping on
"refresh".
2026-03-21 14:59:08 +01:00
Matthias Koefferlein 2dfcc9293e Allowing to explicity specify a format
Most tools and functions now allow to explicitly
specify a format for input and output. On input,
the format is usually detected, but for some
cases, this is not possible (e.g. DEF). So you can
specify the format attached to the file name in
square brackets:

e.g. file.defok[def]

"def" is the intended suffix, "defok" is the given one.

On output, the same is possible, specifically in strmxor
and strmclip:

strmxor a.gds b.gds out.xor[oas]
2026-03-20 16:30:28 +01:00
Matthias Koefferlein 4cde2fe042 New test data 2026-03-19 14:33:59 +01:00
Matthias Koefferlein 42a008efd1 Potential performance improvement for deep-mode DRC
The idea is to use broken regions for certain operations
such as booleans in deep mode (local operations). These polygons are
more efficient. To support this, a "broken polygon" view
is supplied similar for "merged" view. The translation is
handled automatically.

As a side effect, regions may appear to be composed in broken
polygons now when they have been merged before.
2026-03-19 12:53:49 +01:00
Matthias Koefferlein db9aee844d New testdata 2026-03-18 22:49:24 +01:00