»»»Home «««
»»»TELL «««
»»»Toped «««
»»»Ifaces «««
|
The functions described in this chapter are used to create new objects (shapes) in the database. For some shape types TELL defines more that one function and the reason is simply convenience and flexibility. This is probably the proper place to clarify the difference between Toped object and TELL variable. In the example below box tell_box_variable = {{10,10},{20,20}}; layout rectangle1 = addbox(tell_box_variable,7); first line is a TELL construct defining and initializing a TELL variable of a
type box. Next line creates a rectangular layout object in the current cell and
adds it to layer 7. The function on the second line returns a reference to the new
Toped object that is assigned to TELL variable rectangle1. It must be clear that
variables tell_box_variable and rectangle1 has nothing in common. A lot of
addbox functions can be executed with tell_box_variable as input
parameter and all of them will produce unique layout object. Any subsequent
operations over rectangle1 will not modify by any means tell_box_variable.
The opposite is also truth - i.e. any subsequent changes over tell_box_variable
will not modify already created layout objects. As an additional example, the
code fragment below will create a vertical line of box shapes each with a size
point contBL = {10,10}; box contactL = {{0,0},{0.25,0.25}}; usinglayer(7); real numconts = 5; while (numconts > 0) { addbox(contactL+contBL); contBL = contBL + {0, + 0.55}; numconts = numconts - 1; }; Add a box in the active cell. Box shape can be added to the database using any of the overloaded functions listed below. There are three main forms of this function and their difference is just the TELL types used to define the desired box. The user can quote the target layer, but if it is omitted the current layer is used. The function returns a reference to the resulting shape. From the input parameters Toped internally creates two points to define the bottom left and top right corners of the shape. Rotated rectangles can not be created using this command. This can be done using addpoly function only.
The last two overloaded functions are interactive and targeted 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, the temporary rectangle disappears and the resulting box is added to the database. Virtually the same result can be achieved using the construct addbox(getpoint(),getpoint()); but there will not be a temporary box shown. Example 1. addbox // all examples are using the default layer addbox({{10,11},{20,21}}); // box input addbox({10,11},{20,21}); // point input addbox({10,11},10,10); // size input Add a polygon in the active cell. Poly shape can be added to the database using one of the overloaded functions listed below. TELL apply validation checks over the input points. Last point does not need to coincide with the first one, Toped will close the polygon automatically. The user can quote the target layer, but if it is omitted the current layer is used. The function returns a reference to the resulting polygon.
The last two overloaded functions are interactive and targeted for editor purposes. When executed, Toped expects list of points to be selected using the mouse or typed on the keyboard. After first point is selected Toped draws a temporary rubber band closed polygon using already selected points. When the last point is selected, the temporary draw disappears and the resulting polygon is added to the database. Virtually the same result can be achieved using the construct addpoly(getpointlist()); but there will not be a temporary polygon shown. Add a wire in the active cell. A wire shape can be added to the database using one of the overloaded functions listed below. The points in the input list are taken as a center points of the wire vertex. TELL apply validation checks over the input points. The user can quote the target layer, but if it is omitted the current layer is used. The function returns a reference to the resulting wire.
The last two overloaded functions are interactive and targeted for editor purposes. When executed, Toped expects list of points to be selected using the mouse or typed from the keyboard. After first point is selected Toped draws a temporary rubber band wire using already selected points. When the last point is selected, temporary draw disappears and the resulting wire is added to the database. Virtually the same result can be achieved using the construct addwire(getpointlist()); but there will not be a temporary polygon shown. Add a text object in the active cell. A text object can be added to the database using one of the functions below. Texts are not true layout objects, they are used to improve the readability of the layout. The attributes of the text objects are very similar to the attributes of the cell references. Toped uses an Glf library to visualize the layout text objects. The fonts are included in the installation package and text appearance should not be dependent on the platform. Only standard characters (ASCII from 32-127) are rendered. If other characters appear in the input string, they are replaced permanently with ? char. The function returns a reference to the resulting object
The second overloaded function is interactive and targeted for editor purposes. When executed, Toped expects a bind record, which can be entered using the mouse or the keyboard. Toped draws a temporary image of the text which follows the marker position taking into account current rotation flip and scale of the text. Right mouse click allows to change the flip and rotation. When a point is selected, temporary image disappears and the resulting text object is added to the database. Example 4. addtext addtext("This is a comment line",6,{10,20},90,false,2.000); addtext("another comment",2.5); Add a reference to Toped cell in the active cell. Cell references are a powerful way for layout generation. Toped maintains "traditional" (Calma style) cell references and this command is a part of their implementation. Referenced cell must exist already. Recursive or circular references are not allowed. The function returns a reference to the resulting object.
The second overloaded function is interactive and targeted for editor purposes. When executed, Toped expects a bind record, which can be entered using the mouse or the keyboard. Toped draws a temporary image of the cell which follows the marker position taking into account current rotation flip and scale of the reference. Right mouse click allows to change the flip and rotation. When a point is selected, temporary image disappears and the resulting reference object is added to the database. Add an array of cell references in the active cell. Further to the "traditional" cell reference functionality this function creates an array of cell references. Referenced cell must exist already. Recursive or circular references are not allowed. The function returns a reference to the resulting object.
Third form of the function is interactive form of the first one - see the description in cellref Non-orthogonal i.e. uniform and (potentially) diagonal cell grids are allowed and can be introduced using the second form of the function. |