This will include the normal Python tests also
in pymod, hence aligning the test base for pymod
and pya.
This feature requires the pya compatibility module.
With these fixes, unit tests pass with MacOS
(set DYLD_LIBRARY_PATH!)
1.) MacOS takes popen vs. pclose seriously
By using fopen we basically spoil the system and other popen
won't work.
2.) For system integrity, MacOS does not propagate DYLD_LIBRARY_PATH
to child processes such as sh. This has to be done explictly.
3.) Search the klayout binary in the right path (klayout.app/...)
4.) Reset KLAYOUT_HOME for less intervention by installed macros
The comments for LoadLayoutOptions#layer_map, #cif_layer_map
and #dxf_layer_map have been updated to reflect the new status
of these properties (which have been methods). The tests
are updated accordingly (layer_map() -> layer_map).
Rationale:
pya.CplxTrans.angle is computed by doing atan2(m_sin, m_cos), but the algorithm used both in C and python for sin, cos and atan2 are not as precise as IEEE's float.
In python, for example, this happens:
``` python
>>> from math import pi, cos, sin, atan2
>>> atan2(sin(45*pi/180), cos(45*pi/180)) * 180 / pi == 45
False
>>> atan2(sin(45*pi/180), cos(45*pi/180)) * 180 / pi, 45
(44.99999999999999, 45)
```
The text writer was made "normalizing": it will introduce
a certain element order (string sorting). This way, OASIS
files can be compared against golden data without
changes in the order due to different implementation of
hash containers.
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.
* 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.
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.