This feature is mainly useful for command line arguments.
If you run KLayout with
klayout -b -r myscript
it will not be able to determine the type of macro without
a suffix. You can explicitly specify a certain type by
giving the suffix implicitly:
klayout -b -r myscript[rb]
This will read "myscript" but pretend it was "myscript.rb"
and execute it as Ruby script.
This feature is handy if you need to run a file with a
specific interpreter but cannot modify the file name.
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.
- The deferred method scheduler is now automatically created
when required and when there is a QApplication
- QApplication and related have argv constructors
Reason: klayout_QtCore needs to be linked with QtGui so it's
GSI declarations become available. The reason is only
QSignalMapper which is in QtCore and has a QWidget argument.
- Progress on download
- Some icons did not get marked (8 bit indexed image format)
- Colors in installation status dialog
One internal enhancement: progress adaptors can be
instantiated temporarily now to catch progress events.
Issue was: the asynch interface for HTTP access
wasn't entirely compatible between Curl and Qt
implementations.
Plus, the progress integration was messed up
because of the deleteLater scheme (progress was
visible even after the connection ended).
The deleteLater scheme was replaced by an
explicit close which does not require the
connection to be deleted immediately in the
receivers.
Reason: the timer involved measured CPU time. So if the
process wasn't CPU intensive (i.e. waiting for network
response), cancelling the operation wasn't possible.
Reasoning: on Qt <4.7, custom request are not available.
They are required however to implement WebDAV. libcurl
provides a substitute for QNetwork. This is important
for deployment on CentOS6 for example.
* "keep layer name" will not try to modify layer names into
GDS layer/datatypes. The feature is available in the DXF
reader options and for the buddy scripts as "--keep-layer-names"
It applies to CIF too.
* "contour accuracy": when merging lines into contours, this
accuracy is applied to find neighbors. By default this value
is 0. If set to a value >0, points with distances (square
metrics) less than this value will be connected.
The buddy script option is --dxf-contour-accuracy=value.
The reason was that for 0.25.1 "macro-editor-font-size" was allowed
to be an empty string (the default). Which meant: take default application
font size. In 0.25.2 this now was required to be a number and 0 was
the default for "auto" font size.
Two changes:
- The default is back to empty string ("0" is still allowed as default)
- The application was made safe against broken configuration files: an
error is printed to the log, but apart from that the application
will work (the configuration value is ignored however).
This is what's been done:
- remove the old double and single buffering /w mask approach
- modify the bitmap rendering so it's done in a offscreen
image before subsampling
(effect: rulers display smoothly in subsampling mode)
- refactoring the "device pixel ratio" topic:
Made the DPR a variable, viewport width is scaled up
to reflect the true image size, inserted #ifdef's for Qt4.
DISCLAIMER: I don't know whether this still works - I don't
have a Retina display :-(
This commit tries to address #85 and provide these features:
- dynamic configuration of the macro IDE behaviour
- side effect: a new entry in the setup dialog for the
IDE settings
- "stop on exceptions" can be taught to ignore certain files
The aim of this rework was to enable PCell implementations
that use the basic methods rather than the "_impl" variants.
For the latter, potential variable name clashes happen when
parameters are called "cell", "layout", "layer" or similar.
New methods enable implementation on the level of the
non-"impl" methods. For example:
def produce(self, layout, layers, parameters, cell):
self.init_values(parameters, layers)
...
self.finish()
This commit
- Ignores exceptions when checking for PCells that accept shapes.
Hence a single rogue one does not break the feature.
- Prevents errors when parameters named "layer" are present
by making the implementation safe against this case.
- In addition, guiding shape parameters of type "Path", "Box" etc.
(i.e. integer types) are supported too although they are
not recommended for portability.
Without this commit, bookmark menus got grayed out
on MacOS with Qt5 sometimes. Now, the implementation
of recent file menu, bookmark menu, macro menu and
the static main menu use the same framewkork which
includes a workaround for the disabled menu issue.
- ID's are used instead of pointers to identify menu items
vs. QAction's. This is a weak measure to enhance predictability.
- The file menu is built from abstract menu items instead with
native Qt objects. This way the bug fix applies both to
file menu items and the other menu entries
The main fix is:
- A menu sync is forced by emitting a focusWindowChanged event
from the application object. This forces the QCocoaMenuBar
implementation to update the system menu.
The issue is with "dllexport": previously, dllexport was present on
exposed templates tool (= visibility(default) for gcc/clang). This
ensured MacOS compatibility since then the typeinfo is corretly
shared and dynamic_cast/typeid works.
For Windows, the "dllexport" equivalent requires the template
instantiations to be declared "external" which is a coding nightmare.
The solution is to provide separate macros for real (non-specialized,
not explicitly instantiated) templates (.._PUBLIC_TEMPLATE) which
is defined as empty for Windows and "visiblity(default)" for gcc/clang.
1.) Startup issue:
This is solved by making sure templates with virtual functions
are made visible in the DSO. This way, dynamic_cast is possible
across DSO's.
Scary: clang/MacOS wants the forward declarations be declared visible as well.
2.) Menu issue:
The best solution is to have only one QMenuBar. The navigator
now gets a synthetic menu bar composed of QToolButtons.
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
The patch is based on splitting the application class into
two incarnations - one for GUI capability and one without.
GSI binding happens dynamically based on the mode chosen.
We can do so because the application class is the first one
to become active and can decide the mode by itself.
In general, the application class carries too much functionality
and splitting is a task for the future. Right now, the functionality
is inside the base class and the derived classes basically only
configure the base class.
A better design would be to drop the QApplication inheritance in
the RBA::Application class hierarchy and provide access to the
QApplication object through qapp_gui getter.
The Qt4/5 bindings are generated automatically. Hence any manual
patches are bound to become lost on the next generation run.
This commit removes symbols which are not available on MacOS
by a code-generation solution.
These symbols are only required for WindowsCE so their
unavailability on other systems is not a big loss.
The LLVM STL implementation does not recognize "typedef void iterator_traits"
as dummy declaration. It will fall back to an empty traits struct.
Using the default "forward_iterator_tag" for the iterator_traits solves
this compile issue.
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.
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
- Issue: on an entirely fresh installation the "Ruler"
entry was not visible. Now, a new standard template
called "Ruler" is present.
- Ruler templates with categories cannot be deleted
any more and are shown with italic font. If they
were deleted, they would show up again after restart.
strmrun allows running a Python or Ruby script
in the context of KLayout's API. A subset of the
API will be available - all classes connected with
the user interface are not available. Neither is
the DRC engine.
Reason: PCellDeclaration::parameter_declaration is volatile when
the PCell does not want parameter declaration caching. In this
case, begin .. end iterators must not be taken from different
calls to parameter_declaration for example.
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 :-)
Issue: macro definitions had to be synchronized for
custom key bindings. That's not possible for readonly
macros and breaks the architecture.
Now, there is a default binding and a custom binding:
the macros provide a default binding only and the custom
key binding can override this. This scheme is implemented
consistently, so now the "reset" function of the key
binding editor simply clears the custom binding.
Side effect: reset of individual key bindings is possible.
Another side effect: removing a key binding from an
item with a default one is not possible. Instead, redefine
it.
The bug was this:
- A macro is opened and modified in the macro IDE
- The directory which the macro is kept in is touched
Effect: the macro was reloaded and the edits were discarded.
* marked icon
* multiple selection
* hidden flag for repository
* background color of package list black always
* consolidation of package list - identical packages are
reduced to the latest one
This way you can include other repositories into
the Salt.Mine XML:
<salt-mine>
<salt-grain>
...
</salt-grain>
<include>http://from.other.source/repository.xml</include>
</salt-mine>
Now, if a path is stored with a category (i.e. mypath:macros),
the path is not modified. Instead, the path is taken as is
for the specific category.
Only unspecific paths are taken for by mypath/macros,
mypath/pymacros etc.
* Moved tlSystemPaths into lay namespace where it belongs
* Doc updates
* New command line switch -y and -yd for unattended installation
* Download URL's can be relative to salt.mine URL
* KLAYOUT_HOME environment variable to make ~/.klayout configurable
* Better error messages on XML parser on file/stream read errors
(specifically from http/https)
This fix consists of multiple parts:
* Actual closing of the window is deferred until excecution is over
* weak pointers in XOR for view so the view can be destroyed with
out not knowing
* The "keep data" message is not shown when the application window
was closed.
This is how to reproduce the bug: have a layout with two
layers. Select two shapes of different layers and delete them.
One layer is not updated and only after zooming/panning the
shape will disappear on this layer.
- This feature is found in Edit/Selection/Separate
The first selection is separated into parts inside and
outside the secondary selection
In addition, shapes are not deleted on the boolean
(selection-based) functions if they come from a different
layer than the primary selection.
* Override Ruby's crash handler to stop blaming Ruby for
KLayout segfaults ...
* Using addr2line on Linux to obtain DWARF debug info
if available
* A more elaborate crash handler dialog
* Some bug fixes (for example, drag moves were resolved
into many tiny state changes)
* New buttons for navigation in toolbar (like web browser)
* Hierarchy level changes are included in navigation states
too
* 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
* Indicates whether layout has been manipulated (leading [+])
* Indicates current cell
* Tooltip in tab shows file path
* Tab title switches to active cellview
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
* CaptureChannel becomes a main feature and is easier to
use now.
* EXPECT_EQ/NE no longer does a double evaluation of the
arguments on fail (to print the result that wasn't
matching)
* 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
The goal of the refactoring is to support unit tests
for the db library.
For this, a distributed unit test concept has been
introduced (later to be extended to other libs).
Unit tests are shared objects called ".ut" and are
automatically loaded by the ut runner. The bd library
now has two folders - one for sources and one for the
unit tests. The sources are separated into lib and apps.
First unit tests for the writer options have been
provided.
* To reduce the redundancy
* To enable testing of the bd library including the apps
The apps are entirely configured through their names.
Their .pro files are identical and the app implementation
is inside the bd lib (partially generic too). Hence the
apps can be tested by bd library unit tests.
* Generic writer options
* Generic reader options
* All converter tools are equipped with writer options
* strm2gds is equipped with reader options already
* Create the "salt" package directory as well - not just the
package folder
* Include the package folder in the error message
* A better indication of what to do in the Apply button message
* Generalized Polygon to edge interaction into db::Polygon tools
* Added tests for this
* Equipped region to edges interaction with this feature to
reduce random test fails
* Multiple (reproducible) seeds for Region tests
* More tolerances for TilingProcessor tests
* ICplxTrans is_unity? implementation is using proper
double tolerances now
* File watcher tests wait longer to allow for slow
response on loaded Windows build server
This commit deals with the deployment issue on Windows
where there is no global Ruby/Python installation and
the installer needs to package all required files.
The solution is to read the Ruby/Python path from a
file that is evaluated upon startup. The installer will
install these files together with the executable for
Windows. This feature is only enabled on Windows.
A specific issue occured: since the location of the
file needs to be determined, the path of the executable
needs to be known. The Ruby initialization requires the
path to be set very early, before QCoreApplication is
instantiated. But Qt complains in QCoreApplication::applicationDirPath
so that this approach cannot be used for this purpose.
The effect was: while a message box was open
to indicate a change of a file, new file changes
accumulated new message boxes. Now, the message
boxes won't accumulate and new file changes
are recognized after the message box is closed
and files were reloaded. Changes not acknowledged
by reloaded are presented again if changes were
seen while the message box was open.
The effect was: when not having save options in the technology
setup (for example, when migrating from 0.24 to 0.25), it was
not possible to edit the save options page in the technology
manager because the data slot of the save options wasn't
initialized.
Reason: when a page was opened in the macro IDE,
the file to ID cache inside the Ruby interpreter
did not get updated. Hence there was no link
between breakpoint and page and the breakpoint
was ignored.
- 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.
The problem is caused by an implementation detail:
To monitor the lifetime of Qt objects, a monitoring
object is attached to them. This used to happen through
child objects but attaching such issues QChildEvents
which - if routed over script objects - will itself
required objects to be attached a monitoring object.
The solution is to attach monitoring objects through
QObject dynamic properties.
1.) Wrong scaling of output when using output to layout A or B and
different DBU's were present
2.) A threading issue when delivering outputs to layout A or B resulting
in random crashes and weired behavior. This happened when threading
was enabled.
Bug: sometimes, if the files had different database units, the XOR
tool was showing differences while there are none.
This was due to a sloppy computation of the tile boxes. The solution
is to properly round the tile size to a common database unit and
to use a common effective size for both inputs.
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
- modified definition of texts with the ability to produce
point-like edge objects
- middle and extent_refs methods for center point and other
references.
With this fix, regions can be interaction-tested with edge collections.
Only "normal" interaction is available - select_overlapping is not. This
is still confined to region to region interactions.
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.
- 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
The double types (DCoord, DPoint, DVector ...) support a
more consistent equivalence criterion now. This supports
micron-unit objects without loss of precision.
Before this fix, the precision used for 0.01 which was
basically implying a resolution of 10nm for micrometer-unit
double objects.
* There is a ruler mode now
* Ruler templates can have categories
* Ruler templates can be defined from RBA/pya
* Single-click annotations are implemented already
On Ruby, a syntax highlighter element could contain
duplicate brackets, so that such an expression
((a+1)+1)
was not handled correctly. The solution is to treat
each individual character inside the elements but
skip comment and string elements.
- Massive performance improvement with debugger - trace was
eventually clearing the file to id map.
- UI updates on debugger did not happen because delayed
execution of functions got disabled.
This commit is a preparation for native plugins. It adds
the ability to register for autorun and autorun-early
for native, binary extensions.
Plus, the search path for binary extensions was modified
so it does not need to be ABI specific (i.e. without -gcc).
This prepares for a plugin scheme which uses a C-only API
and does not impose ABI compatibility requirements.
When instanced overlay, it wasn't possible to select
the "other" instances. This is fixed. (reference: Trac 1015).
In addition:
- The instance selection now shows the label
- Bugfix: the transient selection now really is disabled
(it was popping up once after selection happened)
- RBA::Marker#line_style has been added
Now the confirmation dialog stays open and will show a log with the
installation progress and results.
The "marked" icon has been changed to look a bit less painted.
* Salt packages can host native Ruby and Python
libraries now. The "ruby_lib" and "python_lib"
templates provide such native libraries.
This way we can basically wrap every native
extension in such a package.
* Ability to supply binary plugins through
Salt packages as well.
Libraries now carry a technology association and
only libraries associated with the current technology
can be selected.
To enforce proper update, cancel() will be used upon
change of technology. This avoids side effects when
changing the technology without notifying the library
selection widgets.
The MainWindow::cancel method has been generalized to
cover the functionality of cm_cancel without the
exception handling.
This fix ensures that packages satisfying dependencies
for other packages come before these in the flat package order.
This is in particular important for macro packages where those
supplying libraries need to be executed before the ones
that use these.
If the documentation URL is relative it's either
taken relative to the package installation path or
to the download URL. This means that documentation
can be inside the package now.
Technologies and macros that come from packages
are indicated as such in their description texts
in the tech and macro editor.
Technologies and macros that come from packages
which are downloaded are readonly now. This will
prevent editing of downloaded packages.
This enables font packages: packages can now provide fonts by
featuring a "fonts" directory with the font layouts.
This commit also adds the capability to dynamically add fonts.
The Glyphs system is decoupled from the application's system
path and the BASIC.TEXT PCell parameters are non-cached to
enable dynamic updates.
The bug was that a crash happened when a package was deleted.
Essentially that was an effect of too many message boxes asking
to run autorun macros (also a bug - solved by deferred execution
of the macro update). This is solved by putting the salt model
into a "under construction" state while the model is not updated
yet.
- The technology list now is synched with the salt package
manager so it's basically possible to include technologies
into packages.
This checkin also contains:
- A "NoDeferredMethods" class that blocks execution of deferred
methods in a region of code (preferably around message boxes).
This prevents side effects when message boxes are shown and
deferred methods are processed because of this.
That prevention method is used in the macro controller when
asking whether to execute autorun macros (that happens in
slots and must not interfere with deferred methods).
It's also used to protect the exception handlers.
- The tech manager dialog's refresh function used to crash
because of an invalid tech pointer.
- Adding/removing folders to packages now will
make them appear/disappear automatically in the macro
editor.
- Adding and removing files from folders will make
them appear/disappear in the macro tree.
- LayoutView should accept technology names that are valid only
- CellView now also sends an "active cellview changed" event when
loading a layout in "replace layout" mode.
Some bug fixes (description was not updated in tree,
base path of new tech was not set, dirs were not reused
for new tech).
Some enhancements (tech setup dialog's window state
is persisted etc.)
The tech controller now is indenpendent from the
macro controller. The macro controller is responsible for
pulling it's data from the tech controller. It's initialized
after the tech controller so it can do so.
The macro controller is also responsible to building the
menus.
The tech controller issues events that the macro controller
can listen to.
Resolved the dependencies between MainWindow, TechController
and MacroController somewhat more.
* The macro controller now listens to the tech controller
for the active technology
* The tech controller has more responsibility now
* Some functionality has been taken out of the MainWindow
and put into the controller's implementation
* Introduced "refresh" method of tech setup dialog
* Some refactoring -> tech management is part of
tech controller
* Macro category management moved to macro controller
The technology controller is a further abstraction and
is derived from the TechnologySelector. It will act
together with the MacroController and supply technology
specific information. Macros are part of that.
The MacroController is the central facility for managing
macros and their views. The plugin framework has been
extended to support such a design.
In addition, some small bugs have been fixed related to
macro interpreters (specifically the DRC).
- Shortcuts are honored and have priority over
search initiation. This is in particular important
for "*".
- "/" initiates search without yielding a "/" in the
text edit box.
- Now the help index can be installed with the app
Fallback is auto-generated index in app folder.
- The index can be generated by script with
RBA::HelpSource#create_index_file
- The index is read only when the help dialog
is opened (reduces start time)
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.
Previously, the "technology-data" complex configuration
value was stored in the configuration file, but not
accessible from scripts through Application#set_config
and Applicatiob#get_config. It was as pseudo parameter
that wasn't dynamically connected to the application
state.
Now it's handled separately as if it was a normal
parameter. This is just an intermediate solution
required because this interface is the only one
through which tech data is accessible from scripts.
First steps towards installer support. Specifically:
- basic installation methods, basic framework
- file utilities for directory copy
Side effect: temp directories of unit tests are
now cleared prior to test run.
Side effect: the log dialog now has an icon
indicating whether there are errors or warnings.
A new utility widget has been introduced to
attach log messages (warnings/errors) to
dialogs. This widget is a QToolButton that
is invisible initially. It provides warning
and errors channels and can be fed messages.
If errors or warnings are fed, the tool button
becomes visible. If (directly) embedded inside
a QFrame, the frame's background will turn
red to indicate the region of interest.
The button can be pushed to read the log.
The button is called lay::AlertLogButton
and is found in layLogViewerDialog.h.
TODO: move to layBasic.
This solution will not only fix this issue but also turn
pairs of edges into "edge pair" objects. These objects
provide a somewhat better visualization for DRC violations
by connecting the edges with a filled region.
Single edges and clusters of more than two edges are
represented as individual edges.
This crash started to happen with the bugfix
for the black-on-black tree expander icon.
It was caused by the styling that was attached
to the widgets in order to fix this. Apparently
Qt does not like to attach proxy styles dyna-
mically.
Now, the styling is applied globally and this
issue is fixed.
- Qt5 binding was not properly including bindings for special types
- Macro editor: forward button wasn't autoRaise like the others
- DRC engine: gave deprecation warnings for Ruby 2.4 because Fixnum
became deprecated. Now the implementation is more generic.
- Fixed some #includes for Qt5
To enable the search feature just type into the layer list.
This change set also contains some more fixes:
* Tab/Backtab now is functional also before the
Display menu has been used the first time
* Arrow keys work from the cell list again
This feature includes:
* Enhancements to tl::GlobPattern
(exact mode, case insensitive)
TODO: UTF8 support
* Enhancements to DecoratedLineEdit
(ESC key handling, Tab key handling)
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.
The effect was: when drawing a shape on a single layer, all
layers have been redrawn. This was changed such that only
the affected layer is actually redrawn.
* 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.
* Refactoring: no more "box+exclude" regions - they
can be emulated using a NOT with the same result
* "confinement" of regions inside recursive shape
iterators
* setters and getters for complex regions in GSI,
confinement
* more unit tests, some bug fixes
- Added some tests
- Performance improvements for insert of
regions into shapes
- Added LayoutLocker for that purpose
(locks a layout against updates temporarily)
- Improved implementation on RecursiveShapeIterator
with complex regions: will now check if a shape
is really inside the region.