The Evaluate Layer Expression panel allows layer expressions to be applied to the current cell hierarchy, much the same as the text-mode !layer command. The panel allows easy setting of variables which control the expression evaluation, whether initiated from the panel or the !layer command.
Full layer expression evaluation is available in physical mode only, though joining, splitting and copying are available in either mode.
The controls found in the Evaluate Layer Expression panel are described below.
If no expression is given, the To layer is created, if it does not exist. If the layer exists, and one of Joined, Horiz Split, or Vert Split is set, that operation will be performed on the To layer. The result is similar to the corresponding operations as initiated form the Join or Split Objects panel from the Join/Split button in the Edit Menu, or the !join and !split commands. If the To layer did not previously exist, or the Default new object format is selected, layer creation is the only operation performed.
The gridding is used only if an actual expression is given, and not simply a layer name (or no expression at all). If the expression consists only of a layer name, processing requires only a simple copy and there would be no reason to use partitioning.
If the None button is pressed, no partitioning will be used.
The default partition size is 100 microns, which can be adjusted for best performance. The size should be large enough to minimize the number of grid cells to evaluate, but small enough to limit the amount of geometry to process on average in each grid, to avoid huge memory consumption and other ill effects of taking too big of a ``bite''.
For simple cells, the grid size can be large, or partitioning can be skipped entirely. Partitioning can be skipped by pressing the None button, or by setting the size to a value larger than the cell bounding box width and height.
This entry tracks the state of the Partition Size variable, which is also used by the !layer command and elsewhere.
Multiple threads can be used when evaluating a layer expression over a grid. Evaluation in each of the grid cells can be done in parallel, so these jobs are submitted to the thread pool. This allows processor cores to work simultaneously on different parts of the grid.
Multi-threading will be used if this entry is set nonzero. The value is the number of helper threads that can be called upon to parallelize the operation. The speediest value is probably one less than twice the number of available processor cores, as each Intel core provides two hardware threads. Your results may differ, so one should experiment. One can also experiment with the partition size to get fastest results, larger partitions are more likely to overcome the multi-threading overhead.
This should not be set to a value larger than the number of available hardware threads minus one, but one might wish to try smaller values. If set to a larger value, software threads will be used, which will increase computation time. If set to 0, the operation is single-threaded.
This entry tracks the value of the Threads variable.
The Default choice has the same effect as Joined in cases where the layer expression contains more than a layer name, i.e., it contains at least one operator, function, or numeric entry. If the expression consists of a layer name only, the Default choice will read the objects from that layer and add them to the To layer, without modification. The other new object format choices will cause the objects read from the layer to be joined or split before being added to the To layer.
When joining objects, there are several variables which fine-tune the operation. These are most conveniently set from the Join or Split Objects panel brought up by the Join/Split button in the Edit Menu.
Thus, this provides a means of creating a new layer from geometry on existing layers. Labels are ignored during processing, but all other objects contribute. The same layer name can appear in the To layer entry and in the expression, in which case the contents of that layer is updated with the result of the expression.
There are eight registers which can be used to save and recall layer expression strings, for convenience. The Save and Recall buttons provide access to these registers. Selecting an item in the Save menu will save the current contents of the Expression entry in that register. Selecting an item in the Recall menu will load that text into the Expression entry area.
If there is no Expression given, or the expression consists only of the same layer name given in To layer, then merging is not performed.
In every other case, the merging enabled from the Edit Menu will be performed as new objects are added to the To Layer. This merging will defeat the purpose of the join and split format choices, so one must consider when merging makes sense. Merging applies to objects initially on the To layer, if not clearing, plus the accumulated objects added as the operation progresses.
Full polygon merging can greatly increase the time and memory required to process a large job. Box clipping has much less overhead.