Commit Graph

1056 Commits

Author SHA1 Message Date
Matthias Köfferlein 28f8a1ee7d Merge branch 'pymod' into pymod-msvc 2018-09-07 22:56:22 +02:00
Matthias Köfferlein a78f75054a Bugfix in the annotation area
The annotation ID was taken from an object already deleted - on MSVC 
this becomes an issue.
2018-09-06 23:49:17 +02:00
Matthias Koefferlein c4c1630a38 Tiny enhancement of LayoutView#insert_layer
* returns a non-const reference now which can be modified
* the node parameter is optional and initialized with a default node
2018-09-01 11:39:20 +02:00
Matthias Koefferlein c9771f54eb Merge branch 'master' into pymod 2018-09-01 09:37:08 +02:00
Matthias Koefferlein bcd6c466fb Fixed #152 (shape count wrong) 2018-08-13 09:30:46 +02:00
Matthias Koefferlein a3776f730b Updated slow EdgeProcessor unit test golden data. 2018-07-23 19:51:47 +02:00
Matthias Koefferlein f05b3249ca Fixed fast EdgeProcessor unit tests with recent update. 2018-07-23 19:36:00 +02:00
Matthias Koefferlein 5fe0aca9c7 Fixed a segfault on help(pya.Box)
Needed to refactor the class hierarchy of the Python classes.
Basically the module specific base class was removed as it does
not provide any benefit. The object layout of the PyObject
specialization was modified such that the payload is attached
to the end. This is compatible with the hidden extensions
which Python adds to normal objects.
2018-07-19 23:50:24 +02:00
Matthias Koefferlein fc9783432b Bugfix: db_plugin modules were not loaded for python modules
* Added unit test for this
* Provided an option for easier debugging such issues:
  Setting env var KLAYOUT_VERBOSITY will enable debug levels on Python
  modules (and all other binaries). Plugin loading issues can
  be debugged by setting KLAYOUT_VERBOSITY=21.
2018-07-15 14:14:14 +02:00
Matthias Koefferlein 20d1d0500f Fixed #142 (Issue with RBA::RecursiveShapeIterator#region=) 2018-07-12 21:16:14 +02:00
klayoutmatthias 616c2942e1 WIP: made pymod functional on Windows (without Qt). Tests pass. 2018-07-10 23:34:30 +02:00
Matthias Koefferlein d2c890ab6d WIP: fixed unit tests for Qt-less build. 2018-07-10 01:17:35 +02:00
Matthias Koefferlein 94387529d6 Fixed #134
The issue was caused by an internal error in the edge processor.
Effectively the weak attractor scheme was causing this problem.
As the weak attractors are making things worse rather than
better I dropped them.

In theory, the weak attractors render an edge undisturbed by
neighboring intersection points, but in cases or parallel edges
this lead to problems: omitting cut points violates the output
edge configuration warranties the the polygon stitcher fails.

In addition, to maintain the solution for bug #74, the cut point
capture condition was relaxed, so that edge crossing the exact
corner of the snapping rectangle of a point are not considered
captured.
2018-06-26 01:04:20 +02:00
Matthias Koefferlein 507189b1d4 Reduced test fails for some platforms. 2018-06-24 21:26:59 +02:00
Matthias Koefferlein 361bc64870 WIP: fixed some build issues, removed some link dependencies which causes issues on Windows. 2018-06-19 20:31:55 +02:00
Matthias Koefferlein 8845d18c74 Renamed pykl to klayout - because of name clash with the klayout binary, the python module now sits inside 'pymod' 2018-06-19 00:50:27 +02:00
Matthias Koefferlein 757c6af80f WIP: rdb module for Python, fixed unit tests for non-Qt bindings case 2018-06-15 22:49:01 +02:00
Matthias Koefferlein e1858973e2 Added unit test for briding sample lib. 2018-06-09 02:11:32 +02:00
Matthias Koefferlein 21bf382549 WIP: Fixed documentation, added QtCore.Qt.QT_VERSION(_STR) 2018-06-05 21:03:21 +02:00
Matthias Koefferlein 98256ebc66 WIP: pymod tests work for Qt4 now too. 2018-06-04 00:32:02 +02:00
Matthias Koefferlein f3f6e2e7ba WIP: unit tests for pykl, some build errors fixed. 2018-06-03 23:36:06 +02:00
Matthias Koefferlein 07b655d3bc WIP: removed debug output, resolved a consistency issue between QtGui and QtCore - QtGui was injecting an enum into QtGui. 2018-05-30 23:17:35 +02:00
Matthias Koefferlein 0b0393ce56 First version of Python module. 2018-05-26 21:31:39 +02:00
Matthias Koefferlein f74f2d3416 Fixed bug #121 (reopening of PCell's in GDS and - partially - in OASIS) 2018-05-17 22:24:32 +02:00
Matthias Koefferlein 5dafd38092 Fixed polygon tests for Ruby 1.8 (inspect instead of to_s to maintain the square brackets) 2018-05-02 23:35:51 +02:00
Matthias Koefferlein 74cc8eea07 Compatibility with Ruby 1.8.7 (main app test), tests fixed for CentOS6 2018-05-02 07:32:20 +02:00
Matthias Koefferlein 99acbd03d6 RBD ruby test compatible with Ruby 1.8.7 now (CentOS6) 2018-05-02 00:59:54 +02:00
Matthias Koefferlein 52933058c4 DRC test suite Ruby 1.8 compatibility. 2018-05-02 00:51:47 +02:00
Matthias Koefferlein e599440cfe Tests fixed for CentOS6 compatibility. 2018-05-01 17:41:32 +02:00
Matthias Koefferlein ccfe6fa918 FEATURE: 'labels' method in DRC scripts allows copying labels to output layers. 2018-04-28 10:36:13 +02:00
Matthias Koefferlein f538885fb3 Added some convenience methods for building RDB entries from shapes. 2018-04-28 09:46:42 +02:00
Matthias Koefferlein c94723bbce New RBA/pya methods
More Shapes#insert flavours with Shapes and RecursiveShapeIterator,
RecursiveShapeIterator#dtrans.
2018-04-28 00:21:36 +02:00
Matthias Koefferlein 08bcd1e418 Fixed #117 (DTrans#itype broken) 2018-04-24 21:26:21 +02:00
Matthias Koefferlein 565010f055 Updated DRC test data. 2018-04-23 23:31:15 +02:00
Matthias Koefferlein 7c8c4ccf43 Fixed main app unit test for non-qtbinding build. 2018-04-23 23:26:40 +02:00
Matthias Koefferlein ca9a6db8a5 Scanline polygon generator: avoid spikes
The implementation of the scanline polygon generator
will avoid spikes as hole cutlines. Helps
fixing #116.
2018-04-23 22:22:32 +02:00
Matthias Koefferlein e710b28a6d FEATURE: added RBA::Polygon#split, RBA::Polygon#split, RBA::DSimplePolygon#split, RBA::DSimplePolygon#split 2018-04-20 22:26:57 +02:00
Matthias Koefferlein 65cfb2d4e4 WIP: consistent naming of some predicates in Ruby with ?, unit tests for reader option bindings. 2018-04-17 01:56:59 +02:00
Matthias Koefferlein 86a90571e6 WIP: DXF keep layer names option, refactoring, added tests, UI, XML serialization. 2018-04-16 19:47:12 +02:00
Matthias Koefferlein 3d5780db2b Bugfix #109 (part 3): OASIS/GDS writer fixed + unit test added. 2018-04-06 23:27:29 +02:00
Matthias Koefferlein 5f4e715dcf Fixed #77 (copy_tree should work in non-editable mode too) 2018-02-21 07:47:41 +01:00
Matthias Koefferlein 6052a04429 A few enhancements and unit tests for PCells
This commit adds unit tests for implementation helper-based
PCells in Python and Ruby.
2018-02-17 01:26:25 +01:00
Matthias Koefferlein 0950d4d27d Updated test cases 2018-02-08 23:51:49 +01:00
Matthias Koefferlein 53328d1767 Merge branch 'macos-build' from kazzz 2018-01-14 17:29:59 +01:00
Matthias Koefferlein 390a5c11a8 Using OASIS files for smaller size as DRC golden data 2018-01-12 00:06:24 +01:00
Matthias Koefferlein a0ff71467f Using OASIS for smaller test data files. 2018-01-10 23:26:12 +01:00
Matthias Koefferlein ed945a28d4 Fixed #63 (wrong output on DRC non_interacting with empty second input) 2018-01-10 23:20:34 +01:00
Matthias Koefferlein 8003d1bb47 Merge branch 'master' into macos-build-on-master 2018-01-02 23:37:45 +01:00
Matthias Koefferlein ffb56335fb Updated copyright note to 2018. 2018-01-01 21:08:06 +01:00
Matthias Koefferlein d5d95c536c Generalized Python unit tests to enhance compatibility across Python versions. 2018-01-01 08:39:41 -08:00
Matthias Koefferlein 7ffc6b9c52 Less strict conditions for certain unit tests to account for MacOS specifics und numerics 2018-01-01 04:38:15 -08:00
Matthias Koefferlein 7715d924ee Fixed #42 (headless mode support with Qt5/-zz) 2017-12-27 21:44:14 +01:00
Matthias Koefferlein d12f5774ae Fixed CIF reader unit test (wrong file name) 2017-12-27 21:40:15 +01:00
Matthias Koefferlein 39d635c7d7 Fixed rba basic testsuite when both modes are used. 2017-12-27 19:40:44 +01:00
Matthias Koefferlein c63a47dd89 Added tests for klayout app
This commit also contains some important fixes:
 * Option -wd wasn't working
 * Relative layout file paths in session files are resolved as relative
   to the session file. On writing, absolute paths are used, so this
   change only affects session files build intentionally.

Plus:
 * Program version is available in unit tests too
 * Fixed a typo in the RBA::Expression documentation
2017-12-27 17:52:35 +01:00
Matthias Koefferlein 395643b427 Fixed #44 (Transformation constructor with x,y not working) 2017-12-23 19:42:39 +01:00
Matthias Koefferlein 4855231342 Fixed #40 (Crash in Python binding)
Plus the same effect was observed for Ruby and fixed there as well.
2017-12-21 00:55:40 +01:00
Matthias Koefferlein 6f66e04c8e Fixed #41 (Polygon#touches? method) 2017-12-20 22:55:15 +01:00
Matthias Koefferlein 21e42788e6 Fixed #39 (Action cannot be reassigned) 2017-12-17 22:38:48 +01:00
Matthias Koefferlein 6e14460334 Ported enhancements for #33 fix (factory callbacks) to Ruby too. 2017-12-13 00:21:56 +01:00
Matthias Koefferlein 1cea7dfd23 Fixed #33 (Plugin factory not working when using with Python)
The fix consisted of introducing "factory" type virtual
methods which ensure that a reference is held to the
returned object. This is important for implementing
factory methods in Python. Without this, the object
get destroyed before we have a chance to increment the
reference count.
2017-12-11 23:51:00 +01:00
Matthias Koefferlein fdb012aa2d Fixed #26 (Exceptions are reported every time they propagate up in the call chain in the ruby debugger) 2017-12-02 23:02:45 +01:00
Matthias Koefferlein be80682853 Fixed #29 (permissive mode for OASIS writer on odd-width paths)
This commit adds "permissive" mode to OASIS writer to allow
odd-width paths (which are rounded).

This commit contains in addition:
 * The check for odd-width paths is done post-scaling, so
   reducing the DBU is a workaround
 * Unit tests for the RBA binding of SaveLayoutOptions
 * Documentation updates on some SaveLayoutOptions attributes
 * Using Ruby predicate notation for cif_blank_separator?
   (note question mark) for consistency. The old notation is
   still there but deprecated
 * --permissive option on buddies command lines where applicable
2017-11-29 22:34:41 +01:00
Matthias Koefferlein c1e501197c #28 fixed (CIF file format detection fails) 2017-11-28 23:24:38 +01:00
Matthias Koefferlein 5d9513b6a5 Added some more GSI methods:
* LayoutView#zoom_fit_sel
* ObjectInstPath#layout, ObjectInstPath#dtrans and ObjectInstPath#source_dtrans
2017-10-31 23:54:07 +01:00
Matthias Koefferlein 52e893ae17 Two method aliases in RBA::Vector/DVector to provide Point compatibility 2017-10-29 19:11:50 +01:00
Matthias Koefferlein b1e83e0bdb New feature: customizable menu items (hide/show)
In the setup dialog (Customize Menu page), there are check boxes
now by which menu entries and menus can be enabled or disabled.

CAUTION: don't disable the setup function :-)
2017-10-29 17:39:49 +01:00
Matthias Koefferlein 99552a5484 GSI binding for new Action features. 2017-10-29 13:59:44 +01:00
Matthias Koefferlein d90593df89 Added a convenience binding for vector+point
This way, the vector/point sum is commutable.
vector+point == point+vector.
2017-10-27 22:02:26 +02:00
Matthias Koefferlein 501dfc25d0 Direct table access for RBA::CellMapping and RBA::LayerMapping. 2017-09-10 01:21:10 +02:00
Matthias Koefferlein fd36ee37d9 Some convenience methods for RBA/RDB methods. 2017-09-07 21:40:51 +02:00
Matthias Koefferlein 47b2e29137 Fixed unit test - update to reference data. 2017-09-02 22:06:20 +02:00
Matthias Koefferlein b28317fb69 Some enhancements to layer and cell mapping
* Modification of the mapping is possible now
  (#map used to ignore mappings if there was one
  already)
* Added DropCell mapping (also for RBA)
* Added unit tests for cell mapping, layer mapping
  db::merge_layouts, db::copy_shapes and db::move_shapes
2017-08-30 01:11:38 +02:00
Matthias Koefferlein be1b007f2f DRC tests integrated now + refactoring
Refactoring:
* more consistent behavior of output redirection
* ut library was refactored and split into several
  .h/.cc
* concept of long runners introduced
* long runners can be skipped with "test_is_long_runner()"
* same for editable/non-editable mode tests
2017-08-23 23:19:36 +02:00
Matthias Koefferlein e5c6bd9e29 Added DRC unit tests. 2017-08-23 11:53:44 +02:00
Matthias Koefferlein 1baddd3632 strmxor: fixes and basic functionality tests. 2017-08-21 00:00:27 +02:00
Matthias Koefferlein 6e3bf68da9 Added more tests for strmcmp, first version of better strmxor 2017-08-20 01:14:49 +02:00
Matthias Koefferlein 2a6c2ee735 Tests and bug fixes for strmcmp and strmclip
* ut framework now has a text file compare
* Added tests for strm2txt, strmclip and strmcmp
* Fixed the output of the PrintingDiffReceiver in some cases
* Cell renaming does not give a difference in smart cell mapping mode
2017-08-19 23:28:03 +02:00
Matthias Koefferlein 32ba5ee635 Some fixes for OASIS reader
- Allow full 32bit for box width and height
  and some other properties (for border case
  testing - not recommended)
- Reduce arrays with step distance 0 to
  dimension 1 - avoids overlapping instances
  or shapes.
2017-07-28 00:19:39 +02:00
klayoutmatthias c442202ca4 Enabled Windows build on Qt5. 2017-07-23 23:36:29 +02:00
Matthias Koefferlein 585d0941bb RBA Unit test enhancements
- Include a copy of the unit test framework so we're no longer
  depending on incompatible versions for Ruby 1 and 2.
- Avoid duplication of path entries in unit tests
2017-07-23 23:03:21 +02:00
Matthias Koefferlein 7d31825b11 DRC: added collect*, select and each methods. 2017-07-17 21:36:29 +02:00
Matthias Koefferlein 703a0ee85d Added "transformed" method to several shape primitives
The new version will transform double-coordinate types to
integer-coordinate types through a "VCplxTrans".
2017-07-17 21:05:38 +02:00
Matthias Koefferlein db5ac31ada New import methods for Region, EdgePairs and Edges
Region: insert of other regions, shape collections (with transformation)
Edges: insert of other edge collections, regions, shape collections (with transformation)
EdgePairs: insert of other edge pair collections
2017-07-16 22:25:08 +02:00
Matthias Koefferlein 43359195ea DRC: corners function
Plus: a new RBA binding for decompose_convex/trapezoids that delivers a region.
2017-07-16 00:03:45 +02:00
Matthias Koefferlein cf6aef46e5 Some enhancements for DRC
- modified definition of texts with the ability to produce
  point-like edge objects
- middle and extent_refs methods for center point and other
  references.
2017-07-13 23:38:36 +02:00
Matthias Koefferlein e2bcac657a Implemented LayerInfo for DRC input/output
- Added a "layers" function too
- Updated tests
- Updated documentation
2017-07-11 00:36:51 +02:00
Matthias Koefferlein 02819c5f1e Hash functions and fuzzy compare for RBA
RBA now provides a hash method for Box, Edge, EdgePair, Trans,
Polygon, SimplePolygon, CellInstArray, LayerInfo, Path, Text,
Point and Vector.

eql? is mapped to ==.

==, != and < act "fuzzy" for the double-typed variants.

Hence, these objects can be used as hash keys now.
2017-07-09 22:40:56 +02:00
Matthias Koefferlein 8396463daf Added text support in DRC
- A new constructor for RBA::Region has been provided to
  create text markers from a shape iterator
- The DRC framework has been enhanced with a "text" function
2017-07-07 00:02:52 +02:00
Matthias Koefferlein 801f83f09c Added DRC test suite and "smoothed" function for DRC 2017-07-06 23:02:11 +02:00
Matthias Koefferlein e30f1b6a34 Added unit tests for RBA::Annotation. Plus fixed a bug in the compare function. 2017-06-28 21:39:06 +02:00
Matthias Koefferlein 9ff1a76f94 Added some convenience methods for transformations
* Reactivated (deprecated) from_xtrans methods for backward
  compatibility
* Added more flavours of "trans" and "*" (like transformation of
  boxes)
2017-06-17 16:45:01 +02:00
Matthias Koefferlein f038efa8be Fixed Python performance test. 2017-06-16 22:50:14 +02:00
Matthias Koefferlein cc88277af9 Added a small performance test for Python too. 2017-06-16 22:49:09 +02:00
Matthias Koefferlein afcacf5b1f WIP: brought down the time for call variant determination by caching. 2017-06-12 23:23:13 +02:00
Matthias Koefferlein c891d06ac3 Some performance enhancement (~30%) of RBA/PYA
This was achieved by separating the methods into
constructors and callbacks, hence there are less iterations
required when lookup up the latter.
2017-06-12 00:31:00 +02:00
Matthias Koefferlein a5d9bbb3d1 WIP: fast replacement for rb_gc_register_address/rb_gc_unregister_address. 2017-06-05 23:26:10 +02:00
Matthias Koefferlein 50df9e5b21 Provide Ruby/Python binding for technology definitions
The respective new classes are RBA::Technology and
RBA::TechnologyComponent. This interface will replace
the current way of doing tech management from scripts
by using the "technology-data" configuration parameter.
2017-04-01 00:45:55 +02:00
Matthias Koefferlein ae986d3234 Implemented #2 ([Simple]Polygon#extract_rad feature for Ruby/Python) 2017-02-25 01:35:14 +01:00
Matthias Koefferlein 1f60e7729e Qt signals can be bound to functions with less args in Python
With this change it is possible to bind signals to functions
accepting less arguments. For example:

    def triggered():
      ...

    b = pya.QPushButton()
    b.clicked(triggered)
    b.emit_clicked(True)

wasn't working before since triggered() gets one parameter
(checked) and the call fails. Now, additional parameters are
ignored.
2017-02-24 23:48:47 +01:00
Matthias Koefferlein ede58ae728 Added a convenience method to RBA::Layout for creating a temp layer 2017-02-24 22:43:31 +01:00
Matthias Koefferlein 0c89999705 Updated Python tests for qtbindings. 2017-02-22 00:24:43 +01:00
Matthias Koefferlein 92fd33744d WIP: first solution for lost references issue
* The solution consists of attaching a bridge object
  to QObjects. If the host object is destroyed, the
  bridge object will notify the script client
* The bridge object attachment is optimized so it
  only happens if required (but still too often ...)
* The child object of QChildEvent gets a special
  handling since this object is almost dead in case
  of remove. This special handling consists of
  a special, stripped class which is used to
  only represent QObject in that particular case.
2017-02-21 23:47:48 +01:00
Matthias Koefferlein eea5da4ba6 Attempt to fix "GSI does not monitor lifetime of Qt objects" 2017-02-20 22:21:29 +01:00
Matthias Koefferlein 8c2acce2e1 Added missing test files for net tracer. 2017-02-12 16:12:24 +01:00
Matthias Koefferlein 1b98f9b0f9 Initialized repository with current sources. 2017-02-12 13:21:08 +01:00