»»»Home «««
»»»TELL «««
»»»Toped «««
»»»Ifaces «««
|
Table of Contents In order to edit already existing shapes in the database, the user will have to select them first. The functions described in this chapter do not alter directly the database. Instead Toped marks internally the selected objects. All select functions work in the active cell only. Objects belonging to currently hidden and locked layers are not selected. The subsequent edit operations will modify marked objects only, thus altering the database. There are several interactive functions targeted especially to the editor. As all other TELL interactive functions they will stop the script execution and will expect user input form the mouse or keyboard. It has to be noted, that interactive functions still can be included in the TELL scripts, however without active editor they hardly make sense (most likely will be indicated as a run-time error). The other purpose of the functions in this category is to ensure the
feedback connection between the language and the editor (respectively
database), while the adding and editing operations ensure the forward
connection. As a rule, select functions return a list of references to all
currently selected Toped objects. This list can be saved in a TELL variable
for future use. It is important to understand the difference between
currently selected objects, and the TELL variable containing the list of
layout references. The latter might be used as an input parameter for future
select or modify operations. In the example below after unselect_all
operation there is no selected objects in the Toped database. The variable
unselect_all(); layout list shapes1 = select( {{ -43 , 162 } , { -26 , 150 }} ); select_all(); move( { -9 , 177 } , { -39 , 177 } ); unselect_all(); select(shapes1); copy( { -66 , 148 } , { -87 , 148 } ); The choice of the select operations for the moment is poor and they are able to ensure just the needs of the editor. This group of functions however should grow including basic DRC and LVS type operations. Point select functions are waiting for TELL type able to accommodate partially selected shapes. Pick up a point - Purely interactive function. It stops the script execution and waits for a point to be selected using the mouse or keyboard. No changes in the database, no side effects during execution. Returns the selected point.
Example 1. getpoint //Wait for the user to select the origin of the referenced cell cellref("cell_1",getpoint(),0,false,1); Pick up a list of points - Purely interactive function. It stops the script execution and waits for a list of points to be selected using the mouse or keyboard. No changes in the database, no side effects during execution. Returns the list of points.
Select Toped objects - There are three overloaded functions defined of this type. All of them as a result of the execution return the list of references to all currently selected TOPED layout objects. The first overloaded member selects layout objects entirely covered by the selection area. The second one will select single shape that overlaps the input point. The third function selects the shapes referred by the input layout list.
The last function is interactive and is used for editor purposes. When executed, Toped expects two points to be selected using the mouse (or keyboard). After first point is selected Toped draws a temporary rubber band rectangle between that point and the cursor position. When second point is selected, rectangle disappears and the resulting box is used as a selection area. Virtually the same result can be achieved using the construct below, select(getpoint(),getpoint()); but there will not be a temporary box shown. Select shape edges overlapped by input box - The functions of this type select the shape edges overlapped by the select box. In result there might be objects fully selected as well as objects partially selected (means not all edges are selected). Toped does not distinguish between the shapes selected using select and fully selected shapes using pselect.
The second function is interactive and acts quite similarly to the way described above in select function
Select all shapes - This function selects all shapes in the current cell. Shapes on the hidden and locked layers are not selected. Returns a list of references to the selected shapes.
Unselect Toped objects - There are three overloaded function defined of this type. All of them as a result of the execution return the list of references to all currently selected TOPED layout objects. The first overloaded member unselects layout objects entirely covered by the box. The second one will unselect single shape that overlaps the input point. The third function unselects the shapes refereed by the input layout list.
The last function is interactive and is used for editor purposes. When executed, Toped expects two points to be selected using the mouse (or keyboard). After first point is selected Toped draws a temporary rubber band rectangle between that point and the cursor position. When second point is selected, rectangle disappears and the resulting box is used as deselection area. Virtually the same result can be achieved using the construct below, unselect(getpoint(),getpoint()); but there will not be a temporary box shown. Unselect shape edges overlapped by input box - The functions of this type unselect the shape edges overlapped by the input box. In result there might be objects fully unselected as well as objects partially unselected (means not all edges are selected)
The second function is interactive and acts quite similarly to the way described above in unselect function
Unselect all objects - This function unselects all shapes in the current cell. Returns obviously nothing.
Change current selection filter mask - All subsequent select operations will use the selection filter set by this function. Toped defines a list of constant masks (see constants) for use with this function which can be logically combined. The function returns the old select mask.
Prints the list of currently selected objects.
Returns the points of a layout object - the point list can be used for generation of further layout objects.
The code above will report all points of the created polygon. |