next up previous contents index
Next: The !split Command: Atomize Up: Layout Editing Previous: The !bloat Command: Expand   Contents   Index


The !join Command: Join Adjacent Objects

Syntax: !join
This command will merge boxes, polygons, and optionally wires into complex polygons. Use of merged geometry can reduce memory use and the size of the layout data file.

The Join and Join All buttons in the Join Boxes, Polygons panel from the Join button in the Edit Menu provide an equivalent to the !join command.

The !join command without arguments will join only selected objects. With the ``all'' argument, selections are ignored, and all objects in the current cell can be considered for merging. In either case, if in layer-specific mode, only objects on the current layer are joined. Otherwise, merging will apply for all layers. However, if the NoMerge keyword is applied to a layer, objects can not be merged on that layer. The Edit Tech Params button in the Attributes Menu brings up an editor that allows changing of this status.

The ``all'' argument can actually be given as any word starting with `a', case insensitive, with an optional preceding hyphen, e.g., ``-A'' is equivalent.

The !join command, the Join and Join All buttons, the Join, JoinObjects and GroupObjects script functions, and other commands such as !layer which perform a join operation, are sensitive to four variables which fine-tune the behavior and performance. The default values emphasize speed but limit the complexity of resulting polygons. The user may need to set one or more of these variables in order for the operation to meet requirements. These variables can be set from the Join Boxes, Polygons panel, using the analogous controls.

In addition, the JoinSplitWires variable, which also has a corresponding check box in the Join Boxes, Polygons panel, determines whether wires are included in join operations. By default, wires do not participate in the join, however if the variable (or equivalently, the check box) is set, wires will behave the same as polygons.

To join a set of objects, the first step is to decompose each object onto a collection of trapezoids. As the objects are decomposed, the trapezoids are added to a list, which will be sent on to the function which performs the join. The variable JoinMaxPolyQueue sets the limit on the number of trapezoids that can accumulate before the list is processed. All or none of the trapezoids from a given object are added to the list, i.e., objects are not broken up at this point. If the addition of the trapezoids would cause the list to exceed the limit, then the list is sent on for processing, and a new list started. If JoinMaxPolyQueue is set to 0, there is no limit, and only a single list will be processed. When this variable is not set, the effective default value is 0 (no limit).

When a list is sent on for processing, the first operation is to break up the list into groups. Each group contains one or more trapezoids, such that the trapezoids in each group are ``connected'', i.e., the aggregate forms a single figure. The variable JoinMaxPolyGroup specifies a limit on the number of trapezoids in any single group. If this limit is reached, no additional trapezoids are added, instead they are placed in a new group or possibly some other existing group. If this variable is set to 0, then no limit is applied, and in this case all groups are guaranteed to be disjoint. When this variable is not set, the effective default value is 0 (no limit).

For each group, one or more polygons are created, which exactly cover the area of the trapezoids. The variable JoinMaxPolyVerts specifies a limit on the number of vertices which can appear in any single polygon. Thus, if the limit is reached, more than one polygon will be generated. If this variable is set to 0, then no limit is applied, and a single polygon will be created for each group. When this variable is not set, the effective default value is 600.

When the effective value of JoinMaxPolyVerts is nonzero, the JoinBreakClean variable determines now the partitioning is done. If this variable is not set, then the polygons are built up by adding trapezoids until the vertex limit is reached, at which point a new polygon is started, and constructed using the remaining trapezoids. The process continues until all trapezoids have been included in a polygon. The resulting collection of polygons may have complicated boundaries that interleave in a rather random way.

If JoinBreakClean is set, the vertex limit is initially ignored, and a single polygon is created from all of the trapezoids. If the vertex limit is exceeded, the polygon is split in two pieces, either horizontally or vertically. If either piece still exceeds the limit, it is subdivided in the same way, and so on until all polygons are within the limit. In this case, the boundaries are Manhattan. This processing is more compute-intensive than the other approach, but provides a better looking layout.


next up previous contents index
Next: The !split Command: Atomize Up: Layout Editing Previous: The !bloat Command: Expand   Contents   Index
Stephen R. Whiteley 2012-04-01