The head class of the drawing. More...
Each layout main windows has exactly one object of the class drawingField. This object can be accessed via the class layout. In the drawingField all drawing relevant information are accessible. The basic setup is stored in userunits and databaseunits. The different cells are accessabe via firstCell as a pointer list. currentCell holds a pointer to the currently displayed cell. All members of the drawingField class are usable in a simplified way without braces, commas and semicolons from the commandline-toolbar. These characters are essential, if used in a macro.
Example:
// set active layer
layout->drawing->activeLayer=9;
// create a box
layout->drawing->point(220000,-140000);
layout->drawing->point(380000,-260000);
layout->drawing->box();
//create a polygon
layout->drawing->point(380000,-260000);
layout->drawing->point(570000,-260000);
layout->drawing->point(570000,-180000);
layout->drawing->point(470000,-180000);
layout->drawing->point(470000,-210000);
layout->drawing->point(380000,-210000);
layout->drawing->polygon();
// change active layer
layout->drawing->activeLayer=6;
// create a path
layout->drawing->point(380000,-140000);
layout->drawing->point(470000,-140000);
layout->drawing->point(470000,-180000);
layout->drawing->path();
This is the default layer. Otherwise specified all new shapes will be added to this layer. Also it will be the default layer for all popup dialogs.
A bounding box of the prior entered points is add to the active layer.
Adds a cell to the drawing. A pointer to the new cellList is returned. The new cell is unnamed.
cell *c=layout->drawing->addCell()->thisCell;
c->cellName="my new cell";
A convex polygon around all prior entered point is added to the active layer.
Adds a additional hierarchy level in the current displayed cell by moving its elements into new created subcells. nx times ny subcells will be created and all elements over its checkerboard with maximal the checkerboard size will be moved into the subcell. The resulting design is not changes. (introduced with release 20220129)
The bottom edge of the selected elements is aligned to the before entered point.
Selected elements will be centered in X and Y direction to the center of a rectange created by two previous entered points.
Selected elements will be centered in X direction to the center of a rectange created by two previous entered points.
Selected elements will be centered in Y direction to the center of a rectange created by two previous entered points.
The left edge of the selected elements is aligned to the before entered point.
The right edge of the selected elements is aligned to the before entered point.
The top edge of the selected elements is aligned to the before entered point.
Selected elements are moved so that the distance of the before entered points is set to distance
Add a arc path to the current cell. Three coordinates had to be entered before with the point command.
If one coordinate was added before with the point() or p() command, selected elements are copyed in an array with steps of p1.x() and p1.y() releated to the selected shapes. If two coordinate were added before with the point() or p() command, selected elements are copyed and moved by (p2-p1).x() and (p2-p1).y() per step.
Performs an automatic measurement at pos and places a permanent ruler. (introduced with version 20180927)
Add a second order bezier path to the current cell. Three coordinates had to be entered before with the point command.
Add a third order bezier path to the current cell. Four coordinates had to be entered before with the point command.
Add a box to the current cell. Two coordinates had to be entered before with the point command.
All boxes in the current cell are deselected.
All visible boxes in the current cell are selected.
a B-Spline is createed from the prior entered points (introduced with release 20190202)
If one coordinate was added before with the point or p command, the nearest cellref is deselected. If two coordinate were added before with the point or p command, all cellrefs in the region p1,p2 are deselected.
If one coordinate was added before with the point or p command, the nearest cellref is selected. If two coordinate were added before with the point or p command, all cellrefs in the region p1,p2 are selected.
Add a cellref to the current cell. One coordinate had to be entered before with the point command. This point is the reference point of the insert cellref.
There is no check for circular references. e.g. if you add a reference from cellA to cellB, but cellB has a cell reference to cellA, you may get trouble and the display of the design may fail.
Add an array of cellref's to the current cell. Two coordinates have to be entered before calling this function using the point command. The first point is the reference point of the inserted array of cellref. The difference of the second point to the first point defines the spacing. Or in other words: the first point is the origin point the lower left reference of the array. The second point is the origin point of the second element from the bottom and the second element from the left. So the two points used in macro are identical with the two point you enter, when placing a array from the GUI.
The cellref is arrayed 'x' times in the x-dimension and 'y' time in the y-dimension.
There is no check for circular references. (see above drawingField::cellRef)
A cell which uses the current cell is set as the current cell.
Selected element are aligned to the entered point in the x axis.
Selected element are aligned to the entered point.
Selected element are aligned to the entered point in the y axis.
Add a circular polygon to the current cell. Two coordinates had to be entered before with the point command. The first entered point is the center, the second point mark the radius.
Add a circular polygon to the current cell. Two coordinates had to be entered before with the point command. The two points mark a bounding square in which the circle is added.
Add a circular polygon to the current cell. The circle is fitted to the before entered points.
In selected text elements and cell references the mirror flag is cleared.(introduced with release 20220808)
Delete all entered point.
All element properties in this design are removed. (introduced with release 20230828)
Closes selected path elements to a polygon.
Converts selected path elements to a polygon, if the last point is identical with the first point.
Add a coil to the current cell. Three coordinates had to be entered before with the point command. (introduced with release 20200125)
Compares the current cell with the cell s. Non identical elements will be selected in both cells. All other elements will be deselected.
Compares the current cell with cell. An XOR of each use layer will be made. The result will be added to a new cell.
If one coordinate was added before with the point() or p() command, selected elements are copyed and moved by p1. If two coordinate were added before with the point() or p() command, selected elements are copyed and moved by p2-p1.
All shapes on sourceLayer touching or overlapping the given rectangle are copied to layerDest. The cell hierarchie is ingored and any shape in refered cell is copied as well.
All shapes on sourceLayer having an shape area between minArea and maxArea are copied to layerDest. The cell hierarchie is ingored and any shape in refered cell is copied as well. (introduced with release 20181006)
The current cell is copied. The copied cell is name oldcellname_copy.
Any shape having a dimension in the short side between minWidth and maxWidth and in the long side between minLength and maxLength will be copied to layerDest. The copy operation ignores hierarchie, so shapes in refered cell are copied as well. By specifying layerSource the copy operation will be limited on shapes on that layer.
All shapes on the sourcelayer having datatype in the hole design will be copied to the destlayer. If datatype is -1 all shape on sourcelayer will be copied.
Creates a flat copy of sourceLayer to destinationLayer with a sizeing. The size type parameter is identical to void cell::sizeAdjustSelect. (introduced with release 20181119)
Creates a flat copy of sourceLayer to destinationLayer with a asymetric sizeing. (introduced with release 20181119)
All shapes in the currentCell on layer will be copied to a new cell with the name currentCellName-layerName. Cellreferences will be handeled in the same way. A pointer to the new cell is returned. If the current Cell does not contain shapes on layer NULL is returned.
Selected elements are copied. The copies shapes are mirrored between p1 and p2. Two coordinates had to be added before with the point() or p() command.
Any shape on layerA overlapping with a shapes on layerB will be copied. The target layers are layerOutA and layerOutB. The copy operation will not be performed, if one of the correspondend output layer is negative. The copy operation ignores hierarchie, so shapes in refered cell are copied as well.
Any shape on layerA touching with a shapes on layerB will be copied. The target layers are layerOutA and layerOutB. The copy operation will not be performed, if one of the correspondend output layer is negative. The copy operation ignores hierarchie, so shapes in refered cell are copied as well.
Any shape on layerA overlapping or touching with a shapes on layerB will be copied. The target layers are layerOutA and layerOutB. The copy operation will not be performed, if one of the correspondend output layer is negative. The copy operation ignores hierarchie, so shapes in refered cell are copied as well.
Create a cross section view in a new cell between two prior entered points.
Create a cross section view in a new cell between the point p1-p2.
This is a pointer on the cell displayed.
Selected elements between p1 and p2 are separated. Two coordinates had to be added before with the point() or p() command.
All coordinates are integer. This value is the factor of these integers to the real value.
Delete the last entered point.
All cells of the current design will be deleted.
cellPtr will be deleted. All cell references to this cell will be removed as well.
The current cell is deleted.
All element not on the layer "layer" will be delete in any cell of the current drawing. Text elements will even be deleted on this layers as it is ignored often in mask production. So the function is useful for preparing data for mask production. Use extractLayer instead to keep text elements.
All shapes on the layer layer will be removed on in all cells of the design.
All shapes on the layer layer having datatype will be removed on in all cells of the design.
Selected elements/points in the currentCell are deleted.
All text elements will be deleted in all cells of the design.
All path elements with a width of zero or less will be deleted in all cells of the design.
On resultLayer a new layer will be created derived from layerA and layerB. These derived operation are available:
Operation: | Result: |
---|---|
avoiding | The shapes on layerA that are completely outside and do not touch the shapes on layerB |
butting | The shapes on layerA that abut the shapes on layerB; the shapes on layerA must have at least one coincident edge with the shapes on layerB and must otherwise be completely or partially outside the shapes on layerB |
buttingOrCoincident | The shapes on layerA that have any coincident edges with the shapes on layerB; Shapes may abut, overlap, or be completely contained |
buttingOrOverlapping | The shapes on layerA that touch, overlap, or are contained within the shapes on layerB; like “touching” except this may have parameters |
buttOnly | The shapes on layerA that abut – but do not overlap – any shapes on layerB (i.e., have only a coincident edge in common) |
coincident | The shapes on layerA that have any coincident edges with the shapes on layerB; Some part or all of the shape on layerA must overlap the corresponding shape on layerB; Shapes that abut only are excluded |
coincidentOnly | The shapes on layerA that are completely contained within, and have at least one coincident edge with, the shapes on layerB |
enclosing | The shapes on layerA that completely contain one or more shapes on layerB |
inside | The shapes on layerA that are completely contained within the shapes on layerB (coincident edges are allowed) |
outside | The shapes on layerA that are completely outside of the shapes on layerB; Shape edges may abut but not overlap |
overlapping | The shapes on layerA that are completely or partially contained within the shapes on layerB; Shapes that abut but do not overlap are excluded |
straddling | The shapes on layerA that overlap at least one edge of the shapes on layerB. At least one point of the layerA shape must be outside the corresponding shape on layerB. Shapes that abut but do not overlap are excluded. |
touching | The shapes on layerA that abut, overlap or are contained within the shapes on layerB |
(introduced with release 20181004)
All elements on the active layer are deselected.
All elements in the current cell are deselected.
layer will be filled with shapes to an density (in procent). minWidth and minSpace are the minimum dimension of added shapes, which will have a minimum distance to existing shapes of shapeSpace.
Add a box to the current cell. Two coordinates had to be entered before with the point command.The first point is the center point, the second point is a corner point.
Add a ellipse to the current cell. Two coordinates had to be entered before with the point command. The two points mark a bounding square in which the ellipse is added.
Returns: true if a cell with the name s exist.
All elements not on the layer "layer" will be delete in any cell of the current drawing.
The current is flatten multilevel and all other cell are removed
If two coordinate were added before with the point or p command, all element in the region p1,p2 are deselected. All Points of the element must be inside the region.
If two coordinate were added before with the point or p command, all element in the region p1,p2 are selected. All Points of the element must be inside the region.
If one coordinate was added before with the point or p command, the nearest element is deselected. If two coordinate were added before with the point or p command, all element in the region p1,p2 are deselected.
If one coordinate was added before with the point or p command, the nearest element is selected. If two coordinate were added before with the point or p command, all element in the region p1,p2 are selected.
Gives information on the type of the file, if it was loaded.
Selected shapes are filled with references to the given cellref. The references are placed in a array and only placed, if the bounding box is complete inside one selected shape. (introduced with release 20190409)
The optional parameter align defines the aligment with: (introduced with release 20211122)
Algin: | Result: |
---|---|
0 | align the the origin of the coordinate system |
1 | align to the lower left corner of the bounding box of each shape |
2 | align to the lower right corner of the bounding box of each shape |
3 | align to the upper left corner of the bounding box of each shape |
4 | align to the upper right corner of the bounding box of each shape |
Identical as the method above, but the cellreference is given by name instead of a pointer. (introduced with release 20190409) The optional parameter align defines the aligment (introduced with release 20211122)
Returns: pointer to the cell with name s. Null if the name does not exist.
Returns: a list of existing cells with a cellname matching regExp. (introduced with version 20180215)
Returns: cell which is not referred by an other cell.
This is a list of all cells in the drawing.
Selected cellrefs and cellrefarrays are flatten.
Selected cellrefs and cellrefarrays are flatten. If the the cellrefs contain more cellrefs, they are flatten as well.
Returns: a pointArray of all previous entered points with the point, pointRel, p, pRel and mouse entered points.
The current view is returned: scale and the drawing position at the screen center p(x,y).
a small macro is generated that will restore the current view of the display.
#!/usr/bin/layout
#name=View Macros
#help=View Set Macro automatic generated
int main(){
layout->drawing->setCell("test");
layout->drawing->setView(0.096321526,1087,7893);
}
If an automatic grid is used, the grid will never less this value.
This member holds the actual grid-offset in X in drawingunits
This member holds the actual grid-offset in Y in drawingunits
This member holds the actual X-grid in drawingunits
This member holds the actual Y-grid in drawingunits
If this member is true, the grid is automaticly change after changing the scale.
All selected elements are moved to a new cell. A correlating cellref will be added. If a identical cell exists, a cellref to this cell is added and the selected elements are deleted.
All selected elements are moved to a new cell. A correlating cellref will be added. If a identical cell exists, a cellref to this cell is added and the selected elements are deleted. Identical structures in complete library are also replaced by a cellref. The number of replaced structures is returned.
All selected elements are moved to a new cell. A correlating cellref will be added.
All selected elements are moved to a new cell. A correlating cellref will be added. If a identical cell exists, a cellref to this cell is added and the selected elements are deleted. Identical structures in the current cell are also replaced by a cellref. The number of replaced structures is returned.
The filename is added to the current design. So the list of all cell in the design is extended by the cells in filename. Aleady existing cells with identical name and identical contants are not imported.
Similar to importFile but it imports the via data from tlef file only. (introduced with release 20201215)
adds the given OpenAccess view to the current design
The selection in the current cell is inverted.
Name of this libary as used in GDS-file or OASIS-file.
all elements are maped with layerTranslator t.
Selected elements in the currentCell are merged. The orginal shape is use to build the path to inner polygons. The function works for a small amount of elements. Use the booleanHandler to merge a large amount of element.
Selected elements are mirror between p1 and p2. Two coordinates had to be added before with the point() or p() command.
Returns: true ,if the design was modifies after the last save
If one coordinate was added before with the point() or p() command, selected elements are moved by p1. If two coordinate were added before with the point() or p() command, selected elements are moved by p2-p1.
All shapes on the sourceLayer having sourcedatatype in the hole design will be moved to the destLayer.
The orgin of the current cell is move to the prior entered point. All references to this cell are adjusted.
Selected elements are moved in x axis by p2-p1. Two coordinates had to be added before with the point() or p() command.
Selected elements are moved in y axis by p2-p1. Two coordinates had to be added before with the point() or p() command.
A new empty cell will be added, named with an unused cell name and it is set as current cell.
Returns: a pointer to the OpenAccess cell specified. If the cell is not yet loaded it will be loaded. With parameterName and parameterValue a parametric cell can be created. A Null pointer is returned in the case the cell does not exist or OpenAccess is not available. This method is not available in Python and Ruby.
Returns: the name of the OpenAccess cell specified. If the cell is not yet loaded it will be loaded. With parameterName and parameterValue a parametric cell can be created. An empty string is returned in the case the cell does not exist or OpenAccess is not available. This method is not available in Python and Ruby.
A file with the name filename is opened. The previous design will be closed.
opens the given OpenAccess view as layout
Set the Command Mode and add the point p(x,y) in user units.
If one coordinate was added before with the point or p command, the nearest point is deselected. If two coordinate were added before with the point or p command, all points in the region p1,p2 are deselected.
Set the Command Mode and add the point p(length,dir) in user units relative to the last point entered. Dir is the angle to the x-axis.
The last entered point is moved by point p(x,y) in user units.
Set the Command Mode and add the point p(x,y) in user units relative to the last point entered. The first entered point is set absolute.
If one coordinate was added before with the point or p command, the nearest point is selected. If two coordinate were added before with the point or p command, all points in the region p1,p2 are selected.
Add a path to the current cell. Two coordinates had to be entered before with the point command.
All path elements in the current cell are deselected.
All visible path elements in the current cell are selected.
Will create a grayscale pixel array from a given function. This function must return a double value between 0 and 1 for any x and y value of the pixelMap. pixelX and pixelY define the size of the array. All pixel import parameter are used. The method will only work woth C++ macros. Python and Rudi is not supported. (introduced with release 20210625)
Example:
#!/usr/bin/layout
#name=pixelMap example
#help=Example macro for the pixelMap function
double greyFunc(int x, int y)
{
return 0.5*(1+math::sin(x*y*1e-6));
}
int main()
{
setup::pixelResolution=250000; //Dots per meter
setup::pixelMethod=1;
setup::pixelDither=1; //Floyd-Steinberg=0, Jarvis=1, Sierra=2
setup::pixelInvert=false; //true = shapes for black, false = shapes for white
setup::pixelMinSize=0.375; //Minimum shape size relative to the pixel size
setup::pixelSteps=2;
int xPixels = 500;
int yPixels = 250;
layout->drawing->pixelMap(xPixels,yPixels,"greyFunc");
layout->drawing->scaleFull();
return 0;
}
Resulting Design:
The last entered point is moved by point p(x,y).
The last entered point is moved by point p(x,y).
Set the Command Mode and add the point p.
Set the Command Mode and add the point p(x,y) in drawing units.
Set the Command Mode and add the point p(x,y) in drawing units relative to the last point entered. The first entered point is set absolute.
Set the Command Mode and add the point p relative to the last point entered. The first entered point is set absolute.
Add a polygon to the current cell. Three coordinates had to be entered before with the point command.
Add a arc polygon to the current cell. Three coordinates had to be entered before with the point command.
All polygons in the current cell are deselected.
All visible polygons in the current cell are selected.
Save the cell for the next undo.
The name of the cell used before the current cell.
Revoke the last undo.
Selected cell references in the current cell are relinked to a cell with the name cellName. There are no checks for circular references. A circular reference may cause a programm crash.
Parameter: | |
---|---|
cellName | Selected cell references in the current cell are relinked to a cell with this name. |
All cell array references in the design are flatten to cell references.
remove not ortogonal cellrefs
removes overlap of shape on the active layer
removes overlap of shape on layer
Cell array with a rotation to the referred cell are removed by added a further hierarchy level with a rotated reference to a cell with an unrotated array.
remove scaled cellrefs
Reset the last undo.
Selected elements are rotate by angle at a point prior added with the point() or p() command.
Parameter: angle rotating angle in deg. Selected elements are rotate by angle at a point prior added with the point() or p() command.
The drawing is saved to fileName. All file types are supported. The file type is detected by the extension of the fileName.
The layer of the current design is save to fileName. Only file types supporting a single layer only are possible like Gerber. The file type is detected by the extension of the fileName.
The screen will be saved in the file with the name filename. The type is selected by the extension.
Scales the selected shapes in the current cell. Three coordinates had to be added before with the point() or p() command. The first point is the origin. The second point is the source point which will be scaled to the threeentered point the destination point.
Scales the selected shapes in the current cell. One coordinate has to be added before with the point() or p() command. The entered point is the origin point which will not be moved. scale is the scaling factor.
The current view is scaled to 1 drawingunit to 1 pixel
The display scale is adjusted to the size of the drawing.
The scale is decreased,
The scale is increased,
The current view is scaled so that the rectangular created by both point is visible with the maximal size.
created a scaled deep copy of cell c and scales is asymetrically. The cell will be named previous-cellname_scaled_sx_sy. If a cell with this name already exists, the existing cell is returned. (introduced with release 20210604)
The display scale is adjusted to the size of all selected elements.
The current view is scrolled down.
The current view is scrolled left.
The current view is scrolled right.
The current view is scrolled up.
Searches pattern identical to the marked pattern. The search pattern is marked by a selected box. Found pattern are marked in a identical way.
See also: SearchPattern
Add a sector polygon to the current cell. Three coordinates had to be entered before with the point command.
All elements on the active layer are selected.
All elements in the current cell are selected.
All cellref to cells named cellname are selected
All text elements having the text 'textname' are selected.
All visible elements in the current cell are deselected.
Elements on a certain layer will be moved to a different design.
Activate the autogrid.
In selected path elements the caps is set to w. (0 for no cap, 1 for round caps, 2 for square caps)
Set the Cell with the name cell to the currentCell. currentCell is set to the new set cell. If a cell with the name cell does not exists, the current cell is not changed.
Parameter:
cell cellname of the cell to be displayed. Set the Cell with the name cell to the currentCell. currentCell is set to the new set cell.
Returns: true if the cell name exists and setting was successfull.
Set the Cell to the currentCell. currentCell is set to the new set cell.
Parameter:
cell pointer to the cell to be displayed. Set the Cell to the currentCell. currentCell is set to the new set cell.
The grid in x and y axis (gridX, gridY) is set to raster. The gridoffset (gridOffsetX, gridOffsetY) is reseted.
Parameter:
raster grid in databaseunits The grid in x and y axis (gridX, gridY) is set to raster. The gridoffset (gridOffsetX, gridOffsetY) is reseted.
In selected text elements and cell references the mirror flag is set.(introduced with release 20220808)
Set the modification status of the current design as changed. The effect will happened with any modification operation automatically, but in this way it will be triggered manually.
Sets the modifiaction status to add. This is a status between saved and changed meaning, that no existing element was changed, but elements were added to the design.
Set the design status to unmodified/saved. The dialog on exiting the LayoutEditor with a warning of a unsved design is no longer displayed.
In selected text elements the presentation is set to p. Possible values are identical to element::setPresentation(). (introduced with release 20220808)
The current view is set to the scale. The screen center is set to the drawing position p(x,y).
The width of selected path and text elements is set to w.
Parameter:
w width in databaseunits. The width of selected path and text elements is set to w.
Show/hide the visibility of the grid.
All shapes on layer in the hole design will be scaled by size. type will set the type of sizing analog to the Sizeadjust feature.
Add a spiral path to the current cell. Three coordinates had to be entered before with the point command.
All cell empty cells which out any shape and without any cell reference are deleted.
If the current cell contains two identical elements at the same position, it is impossible to see it. This function will detect this and remove one of the element.
All cells not needed in the current cell are removed.
This function swap the layers i and k in all cells of the current drawing.
This function swap the layers i and k of the selected elements in the current cell.
This function swap the layers i and k in the current cell.
All text elements in the current cell are deselected.
All visible text elements in the current cell are selected.
Add a text to the current cell. One coordinate had to be entered before with the point command.
Selected polygons are converted to a box-element if possible.
Converts selected polygon and box elements to a circle. The circle is fitted in all existing points of the element.
In selected text elements and cell references the mirror flag is set.(introduced with release 20220808)
Converts selected path elements to a path for each segment of the path.
Converts selected element to pathes with it outline.
Converts selected element to polygon. The appearance will not change.
Undo the last modification.
Returns: the first unused layer in the current design. The search is started at startLayer. If no unused layer is found, -1 is returned.
Cells with the same cellname with cell in the file are replaced by the cell of this file.
Returns: true if layer is used in the current design, otherwise false.
All values in the main widget are displayed in a user unit. This variable userunit is store in the same way as it is stored in the GDSII file format: as the number of database units in a user unit. So to calculate the size of a user unit in meters, divide the database unit by the this variable userunit.
OBSOLETE: please use extractLayer and deleteText instead.
All element on another than the active layer will be deleted. Text elements will be delete even on this layer.
OBSOLETE: please use deleteCurrentCell instead.
The current cell is deleted.