Class Reference drawingField

The head class of the drawing. More...

Member

int activeLayer
void addBoundingBox()
cellList* addCell()
void addConvexPolygon()
void addHierarchy(int nx,int ny)
void alignBottom()
void alignCenterXY()
void alignCenterX()
void alignCenterY()
void alignLeft()
void alignRight()
void alignTop()
void alignValue(int distance)
void arc()
void arrayCopy(int nx, int ny)
void autoRuler(point pos)
void bezier2()
void bezier3()
void box()
void boxDeselect()
void boxSelect()
void BSpline()
void cDeselect()
void cSelect()
void cellRef(string s)
void cellrefarray(string s,int x, int y)
void cellUp()
void centerX()
void centerXY()
void centerY()
void circle()
void circleBox()
void circleFit()
void clearMirrorx()
void clearPoints()
void clearProperties()
void closeToPolygon()
void closedPathToPolygon()
void coil(int turns)
void compareCell(string s)
void compareCellXor(string cell)
void copy()
void copyArea(rect r, int layerSource, int layerDest)
void copyArea(double minArea, double maxArea, int layerDest, int layerSource)
void copyCurrentCell()
void copyDimension(int minWidth, int maxWidth, int minLength, int maxLangth, int layerDest, int layerSource=-1)
void copyLayer(int sourcelayer, int sourcedatatype, int destLayer)
void copyLayerSized(int sourcelayer, int destinationlayer, int size,int type)
void copyLayerSizedAsym(int sourcelayer, int destinationlayer, int sizeX, int sizeY)
cell * copyLayerToCell(int layer)
void copyMirror()
void copyOverlapping(int layerA,int layerB, int layerOutA, int layerOutB=-1)
void copyTouching(int layerA,int layerB, int layerOutA, int layerOutB=-1)
void copyTouchingOrOverlapping(int layerA,int layerB, int layerOutA, int layerOutB=-1)
void crossSection()
void crossSection(point p1, point p2)
cell* currentCell
void cut()
double databaseunits
void delPoint()
void deleteAllCell()
void deleteCell(cell * cellPtr)
void deleteCurrentCell()
void deleteExceptOneLayer(int layer)
void deleteLayer(int layer)
void deleteLayer(int layer, int datatype)
void deleteSelect()
void deleteText()
void deleteZeroWidthPath()
void derivedLayer(int layerA, int layerB, int resultLayer, string operation)
void deselectActiveLayer()
void deselectAll()
void densityFill(int layer, double density, int shapeSpace, int minWidth, int minSpace, int frameSize)
void dot()
void ellipse()
bool existCellname(string s)
void extractLayer(int layer)
void extractCurrentCell()
void fAllDeselect()
void fAllSelect()
void fDeselect()
void fSelect()
string fileType
void fillSelectedShapes(cell * cellref, int align=0)
void fillSelectedShapes(string cellname, int align=0)
cell* findCell(string s)
stringList findCellRegExp(string regExp)
cell* findTopCell()
cellList* firstCell
void flat()
void flatAll()
pointArray getPoints()
void getView(double *scale,int *x,int *y)
string getViewMacro()
int gridMinimum
int gridOffsetX
int gridOffsetY
int gridX
int gridY
bool gridauto
void group()
int groupGlobal()
void groupSimple()
int groupStructure()
void importFile(string filename)
void importViaFile(string filename)
void importView(string library,string cellName,string viewName)
void invertSelect()
string libname
void mapLayer(layerTranslator *t)
void mergeSelect()
void mirror()
bool modified()
void move()
void moveLayer(int sourceLayer, int sourcedatatype, int destLayer)
void moveOrigin()
void moveX()
void moveY()
void newCell()
cell * oaFindCell(string libName,string cellName,string viewName,stringList parameterName=stringList(),stringList parameterValue=stringList() )
string oaGetCellName(string libName,string cellName,string viewName,stringList parameterName=stringList(),stringList parameterValue=stringList() )
void openFile(string filename)
void openView(string library,string cellName,string viewName)
void p(double x,double y)
void pDeselect()
void pDir(double length,double dir)
void pMove(double x,double y)
void pRel(double x,double y)
void pSelect()
void path()
void pathDeselect()
void pathSelect()
void pixelMap(int pixelX ,int pixelY,string functionName)
void pointMove(int x,int y)
void pointMove(point p)
void point(point p)
void point(int x,int y)
void pointRel(int x,int y)
void pointRel(point p)
void polygon()
void polygonArc()
void polygonDeselect()
void polygonSelect()
void prepareUndo()
string previousCell
void redo()
void relink(const string cellName)
void removeCellArrays()
void removeNotOrthogonalCellref()
void removeOverlap()
void removeOverlap(int layer)
void removeRotatedCellArrays()
void removeScaledCellref()
void resetUndo()
void rotate(double angle)
void saveFile(string fileName)
void saveLayer(string fileName,int layer)
void saveScreenshot(string filename)
void scale()
void scale(double scale)
void scaleEins()
void scaleFull()
void scaleMinus()
void scalePlus()
void scale(point p1, point p2)
cell * scaledCell(cell *c,double sx, double sy)
void scaleSelect()
void scrollDown()
void scrollLeft()
void scrollRight()
void scrollUp()
void searchPattern()
void sector()
void selectActiveLayer()
void selectAll()
void selectCellref(string cellname)
void selectText(string textname)
void selectVisible()
void separateLayer(drawingField * drawingWindow ,int layer)
void setAutoGrid()
void setCap(int w)
bool setCell(const string &cell)
void setCell(const cell *Cell)
void setGrid(int raster)
void setMirrorx()
void setModifyChanged()
void setModifyAdded()
void setModifySaved()
void setPresentationt(int p)
void setView(double scale,int x,int y)
void setWidth(int w)
void showGridToggle()
void sizeLayer(int layer, int size,int type=0)
void spiral()
void stripEmptyCells()
void stripIdenticalElements()
void stripUnneeded()
void swapLayerAll(int i,int k)
void swapLayerSelect(int i,int k)
void swapLayer(int i,int k)
void textDeselect()
void textSelect()
void text(string text)
void toBox()
void toCircle()
void toggleMirrorx()
void toLines()
void toPath()
void toPolygon()
void undo()
int unusedLayer(int startLayer)
void updateFile(string file)
bool useLayer(int layer)
double userunits
void extractActiveLayer()
void deleteActuellCell()

Detailed Description

graph LR la(layout)--drawing-->dr(drawingField) dr==firstCell==>cl(cellList) dr==currentCell==>ce cl--thisCell-->ce(cell) cl--nextCell-->cl ce--firstElement-->el(elementList) click ce "/layoutscript/api/cell" click cl "/layoutscript/api/celllist" click el "/layoutscript/api/elementlist" click la "/layoutscript/api/layout" click dr "/layoutscript/api/drawingfield" classDef thisClas fill:#eaf5fc,stroke:#3c7faa,stroke-width:4px; classDef clas fill:#eaf5fc,stroke:#3c7faa,stroke-width:1px; class dr thisClas class cl,la,el,ce clas

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();

Member Function Documentation


int drawingField::activeLayer

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.


void drawingField::addBoundingBox()

A bounding box of the prior entered points is add to the active layer.


cellList* drawingField::addCell()

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";

void drawingField::addConvexPolygon()

A convex polygon around all prior entered point is added to the active layer.


void drawingField::addHierarchy(int nx,int ny)

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)


void drawingField::alignBottom()

The bottom edge of the selected elements is aligned to the before entered point.


void drawingField::alignCenterXY()

Selected elements will be centered in X and Y direction to the center of a rectange created by two previous entered points.


void drawingField::alignCenterX()

Selected elements will be centered in X direction to the center of a rectange created by two previous entered points.


void drawingField::alignCenterY()

Selected elements will be centered in Y direction to the center of a rectange created by two previous entered points.


void drawingField::alignLeft()

The left edge of the selected elements is aligned to the before entered point.


void drawingField::alignRight()

The right edge of the selected elements is aligned to the before entered point.


void drawingField::alignTop()

The top edge of the selected elements is aligned to the before entered point.


void drawingField::alignValue(int distance)

Selected elements are moved so that the distance of the before entered points is set to distance


void drawingField::arc()

Add a arc path to the current cell. Three coordinates had to be entered before with the point command.


void drawingField::arrayCopy(int nx, int ny)

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.


void drawingField::autoRuler(point pos)

Performs an automatic measurement at pos and places a permanent ruler. (introduced with version 20180927)


void drawingField::bezier2()

Add a second order bezier path to the current cell. Three coordinates had to be entered before with the point command.


void drawingField::bezier3()

Add a third order bezier path to the current cell. Four coordinates had to be entered before with the point command.


void drawingField::box()

Add a box to the current cell. Two coordinates had to be entered before with the point command.


void drawingField::boxDeselect()

All boxes in the current cell are deselected.


void drawingField::boxSelect()

All visible boxes in the current cell are selected.


void drawingField::BSpline()

a B-Spline is createed from the prior entered points (introduced with release 20190202)


void drawingField::cDeselect()

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.


void drawingField::cSelect()

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.


void drawingField::cellRef(string s)

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.


void drawingField::cellrefarray(string s,int x, int y)

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)


void drawingField::cellUp()

A cell which uses the current cell is set as the current cell.


void drawingField::centerX()

Selected element are aligned to the entered point in the x axis.


void drawingField::centerXY()

Selected element are aligned to the entered point.


void drawingField::centerY()

Selected element are aligned to the entered point in the y axis.


void drawingField::circle()

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.


void drawingField::circleBox()

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.


void drawingField::circleFit()

Add a circular polygon to the current cell. The circle is fitted to the before entered points.


void drawingField::clearMirrorx()

In selected text elements and cell references the mirror flag is cleared.(introduced with release 20220808)


void drawingField::clearPoints()

Delete all entered point.


void drawingField::clearProperties()

All element properties in this design are removed. (introduced with release 20230828)


void drawingField::closeToPolygon()

Closes selected path elements to a polygon.


void drawingField::closedPathToPolygon()

Converts selected path elements to a polygon, if the last point is identical with the first point.


void drawingField::coil(int turns)

Add a coil to the current cell. Three coordinates had to be entered before with the point command. (introduced with release 20200125)


void drawingField::compareCell(string s)

Compares the current cell with the cell s. Non identical elements will be selected in both cells. All other elements will be deselected.


void drawingField::compareCellXor(string cell)

Compares the current cell with cell. An XOR of each use layer will be made. The result will be added to a new cell.


void drawingField::copy()

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.


void drawingField::copyArea(rect r, int layerSource, int layerDest)

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.


void drawingField::copyArea(double minArea, double maxArea, int layerDest, int layerSource)

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)


void drawingField::copyCurrentCell()

The current cell is copied. The copied cell is name oldcellname_copy.


void drawingField::copyDimension(int minWidth, int maxWidth, int minLength, int maxLangth, int layerDest, int layerSource=-1)

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.


void drawingField::copyLayer(int sourcelayer, int sourcedatatype, int destLayer)

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.


void drawingField::copyLayerSized(int sourcelayer, int destinationlayer, int size,int type)

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)


void drawingField::copyLayerSizedAsym(int sourcelayer, int destinationlayer, int sizeX, int sizeY)

Creates a flat copy of sourceLayer to destinationLayer with a asymetric sizeing. (introduced with release 20181119)


cell * drawingField::copyLayerToCell(int layer)

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.


void drawingField::copyMirror()

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.


void drawingField::copyOverlapping(int layerA,int layerB, int layerOutA, int layerOutB=-1)

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.


void drawingField::copyTouching(int layerA,int layerB, int layerOutA, int layerOutB=-1)

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.


void drawingField::copyTouchingOrOverlapping(int layerA,int layerB, int layerOutA, int layerOutB=-1)

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.


void drawingField::crossSection()

Create a cross section view in a new cell between two prior entered points.


void drawingField::crossSection(point p1, point p2)

Create a cross section view in a new cell between the point p1-p2.


cell* drawingField::currentCell

This is a pointer on the cell displayed.


void drawingField::cut()

Selected elements between p1 and p2 are separated. Two coordinates had to be added before with the point() or p() command.


double drawingField::databaseunits

All coordinates are integer. This value is the factor of these integers to the real value.


void drawingField::delPoint()

Delete the last entered point.


void drawingField::deleteAllCell()

All cells of the current design will be deleted.


void drawingField::deleteCell(cell * cellPtr)

cellPtr will be deleted. All cell references to this cell will be removed as well.


void drawingField::deleteCurrentCell()

The current cell is deleted.


void drawingField::deleteExceptOneLayer(int layer)

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.


void drawingField::deleteLayer(int layer)

All shapes on the layer layer will be removed on in all cells of the design.


void drawingField::deleteLayer(int layer, int datatype)

All shapes on the layer layer having datatype will be removed on in all cells of the design.


void drawingField::deleteSelect()

Selected elements/points in the currentCell are deleted.


void drawingField::deleteText()

All text elements will be deleted in all cells of the design.


void drawingField::deleteZeroWidthPath()

All path elements with a width of zero or less will be deleted in all cells of the design.


void drawingField::derivedLayer(int layerA, int layerB, int resultLayer, string operation)

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)


void drawingField::deselectActiveLayer()

All elements on the active layer are deselected.


void drawingField::deselectAll()

All elements in the current cell are deselected.


void drawingField::densityFill(int layer, double density, int shapeSpace, int minWidth, int minSpace, int frameSize)

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.


void drawingField::dot()

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.


void drawingField::ellipse()

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.


bool drawingField::existCellname(string s)

Returns: true if a cell with the name s exist.


void drawingField::extractLayer(int layer)

All elements not on the layer "layer" will be delete in any cell of the current drawing.


void drawingField::extractCurrentCell()

The current is flatten multilevel and all other cell are removed


void drawingField::fAllDeselect()

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.


void drawingField::fAllSelect()

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.


void drawingField::fDeselect()

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.


void drawingField::fSelect()

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.


string drawingField::fileType

Gives information on the type of the file, if it was loaded.


void drawingField::fillSelectedShapes(cell * cellref, int align=0)

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

void drawingField::fillSelectedShapes(string cellname, int align=0)

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)


cell* drawingField::findCell(string s)

Returns: pointer to the cell with name s. Null if the name does not exist.


stringList drawingField::findCellRegExp(string regExp)

Returns: a list of existing cells with a cellname matching regExp. (introduced with version 20180215)


cell* drawingField::findTopCell()

Returns: cell which is not referred by an other cell.


cellList* drawingField::firstCell

This is a list of all cells in the drawing.


void drawingField::flat()

Selected cellrefs and cellrefarrays are flatten.


void drawingField::flatAll()

Selected cellrefs and cellrefarrays are flatten. If the the cellrefs contain more cellrefs, they are flatten as well.


pointArray drawingField::getPoints()

Returns: a pointArray of all previous entered points with the point, pointRel, p, pRel and mouse entered points.


void drawingField::getView(double *scale,int *x,int *y)

The current view is returned: scale and the drawing position at the screen center p(x,y).


string drawingField::getViewMacro()

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);
}

int drawingField::gridMinimum

If an automatic grid is used, the grid will never less this value.


int drawingField::gridOffsetX

This member holds the actual grid-offset in X in drawingunits


int drawingField::gridOffsetY

This member holds the actual grid-offset in Y in drawingunits


int drawingField::gridX

This member holds the actual X-grid in drawingunits


int drawingField::gridY

This member holds the actual Y-grid in drawingunits


bool drawingField::gridauto

If this member is true, the grid is automaticly change after changing the scale.


void drawingField::group()

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.


int drawingField::groupGlobal()

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.


void drawingField::groupSimple()

All selected elements are moved to a new cell. A correlating cellref will be added.


int drawingField::groupStructure()

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.


void drawingField::importFile(string filename)

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.


void drawingField::importViaFile(string filename)

Similar to importFile but it imports the via data from tlef file only. (introduced with release 20201215)


void drawingField::importView(string library,string cellName,string viewName)

adds the given OpenAccess view to the current design


void drawingField::invertSelect()

The selection in the current cell is inverted.


string drawingField::libname

Name of this libary as used in GDS-file or OASIS-file.


void drawingField::mapLayer(layertranslator *t)

all elements are maped with layerTranslator t.


void drawingField::mergeSelect()

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.


void drawingField::mirror()

Selected elements are mirror between p1 and p2. Two coordinates had to be added before with the point() or p() command.


bool drawingField::modified()

Returns: true ,if the design was modifies after the last save


void drawingField::move()

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.


void drawingField::moveLayer(int sourceLayer, int sourcedatatype, int destLayer)

All shapes on the sourceLayer having sourcedatatype in the hole design will be moved to the destLayer.


void drawingField::moveOrigin()

The orgin of the current cell is move to the prior entered point. All references to this cell are adjusted.


void drawingField::moveX()

Selected elements are moved in x axis by p2-p1. Two coordinates had to be added before with the point() or p() command.


void drawingField::moveY()

Selected elements are moved in y axis by p2-p1. Two coordinates had to be added before with the point() or p() command.


void drawingField::newCell()

A new empty cell will be added, named with an unused cell name and it is set as current cell.


cell * drawingField::oaFindCell(string libName,string cellName,string viewName,stringList parameterName=stringList(),stringList parameterValue=stringList() )

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.


string drawingField::oaGetCellName(string libName,string cellName,string viewName,stringList parameterName=stringList(),stringList parameterValue=stringList() )

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.


void drawingField::openFile(string filename)

A file with the name filename is opened. The previous design will be closed.


void drawingField::openView(string library,string cellName,string viewName)

opens the given OpenAccess view as layout


void drawingField::p(double x,double y)

Set the Command Mode and add the point p(x,y) in user units.


void drawingField::pDeselect()

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.


void drawingField::pDir(double length,double dir)

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.


void drawingField::pMove(double x,double y)

The last entered point is moved by point p(x,y) in user units.


void drawingField::pRel(double x,double y)

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.


void drawingField::pSelect()

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.


void drawingField::path()

Add a path to the current cell. Two coordinates had to be entered before with the point command.


void drawingField::pathDeselect()

All path elements in the current cell are deselected.


void drawingField::pathSelect()

All visible path elements in the current cell are selected.


void drawingField::pixelMap(int pixelX ,int pixelY,string functionName)

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:


void drawingField::pointMove(int x,int y)

The last entered point is moved by point p(x,y).


void drawingField::pointMove(point p)

The last entered point is moved by point p(x,y).


void drawingField::point(point p)

Set the Command Mode and add the point p.


void drawingField::point(int x,int y)

Set the Command Mode and add the point p(x,y) in drawing units.


void drawingField::pointRel(int x,int y)

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.


void drawingField::pointRel(point p)

Set the Command Mode and add the point p relative to the last point entered. The first entered point is set absolute.


void drawingField::polygon()

Add a polygon to the current cell. Three coordinates had to be entered before with the point command.


void drawingField::polygonArc()

Add a arc polygon to the current cell. Three coordinates had to be entered before with the point command.


void drawingField::polygonDeselect()

All polygons in the current cell are deselected.


void drawingField::polygonSelect()

All visible polygons in the current cell are selected.


void drawingField::prepareUndo()

Save the cell for the next undo.


string drawingField::previousCell

The name of the cell used before the current cell.


void drawingField::redo()

Revoke the last undo.


void drawingField::relink(const string cellName)

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.

void drawingField::removeCellArrays()

All cell array references in the design are flatten to cell references.


void drawingField::removeNotOrthogonalCellref()

remove not ortogonal cellrefs


void drawingField::removeOverlap()

removes overlap of shape on the active layer


void drawingField::removeOverlap(int layer)

removes overlap of shape on layer


void drawingField::removeRotatedCellArrays()

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.


void drawingField::removeScaledCellref()

remove scaled cellrefs


void drawingField::resetUndo()

Reset the last undo.


void drawingField::rotate(double angle)

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.


void drawingField::saveFile(string fileName)

The drawing is saved to fileName. All file types are supported. The file type is detected by the extension of the fileName.


void drawingField::saveLayer(string fileName,int layer)

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.


void drawingField::saveScreenshot(string filename)

The screen will be saved in the file with the name filename. The type is selected by the extension.


void drawingField::scale()

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.


void drawingField::scale(double scale)

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.


void drawingField::scaleEins()

The current view is scaled to 1 drawingunit to 1 pixel


void drawingField::scaleFull()

The display scale is adjusted to the size of the drawing.


void drawingField::scaleMinus()

The scale is decreased,


void drawingField::scalePlus()

The scale is increased,


void drawingField::scale(point p1, point p2)

The current view is scaled so that the rectangular created by both point is visible with the maximal size.


cell * drawingField::scaledCell(cell *c,double sx, double sy)

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)


void drawingField::scaleSelect()

The display scale is adjusted to the size of all selected elements.


void drawingField::scrollDown()

The current view is scrolled down.


void drawingField::scrollLeft()

The current view is scrolled left.


void drawingField::scrollRight()

The current view is scrolled right.


void drawingField::scrollUp()

The current view is scrolled up.


void drawingField::searchPattern()

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


void drawingField::sector()

Add a sector polygon to the current cell. Three coordinates had to be entered before with the point command.


void drawingField::selectActiveLayer()

All elements on the active layer are selected.


void drawingField::selectAll()

All elements in the current cell are selected.


void drawingField::selectCellref(string cellname)

All cellref to cells named cellname are selected


void drawingField::selectText(string textname)

All text elements having the text 'textname' are selected.


void drawingField::selectVisible()

All visible elements in the current cell are deselected.


void drawingField::separateLayer(drawingField * drawingWindow ,int layer)

Elements on a certain layer will be moved to a different design.


void drawingField::setAutoGrid()

Activate the autogrid.


void drawingField::setCap(int w)

In selected path elements the caps is set to w. (0 for no cap, 1 for round caps, 2 for square caps)


bool drawingField::setCell(const string &cell)

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.


void drawingField::setCell(const cell *Cell)

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.


void drawingField::setGrid(int raster)

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.


void drawingField::setMirrorx()

In selected text elements and cell references the mirror flag is set.(introduced with release 20220808)


void drawingField::setModifyChanged()

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.


void drawingField::setModifyAdded()

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.


void drawingField::setModifySaved()

Set the design status to unmodified/saved. The dialog on exiting the LayoutEditor with a warning of a unsved design is no longer displayed.


void drawingField::setPresentationt(int p)

In selected text elements the presentation is set to p. Possible values are identical to element::setPresentation(). (introduced with release 20220808)


void drawingField::setView(double scale,int x,int y)

The current view is set to the scale. The screen center is set to the drawing position p(x,y).


void drawingField::setWidth(int w)

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.


void drawingField::showGridToggle()

Show/hide the visibility of the grid.


void drawingField::sizeLayer(int layer, int size,int type=0)

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.


void drawingField::spiral()

Add a spiral path to the current cell. Three coordinates had to be entered before with the point command.


void drawingField::stripEmptyCells()

All cell empty cells which out any shape and without any cell reference are deleted.


void drawingField::stripIdenticalElements()

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.


void drawingField::stripUnneeded()

All cells not needed in the current cell are removed.


void drawingField::swapLayerAll(int i,int k)

This function swap the layers i and k in all cells of the current drawing.


void drawingField::swapLayerSelect(int i,int k)

This function swap the layers i and k of the selected elements in the current cell.


void drawingField::swapLayer(int i,int k)

This function swap the layers i and k in the current cell.


void drawingField::textDeselect()

All text elements in the current cell are deselected.


void drawingField::textSelect()

All visible text elements in the current cell are selected.


void drawingField::text(string text)

Add a text to the current cell. One coordinate had to be entered before with the point command.


void drawingField::toBox()

Selected polygons are converted to a box-element if possible.


void drawingField::toCircle()

Converts selected polygon and box elements to a circle. The circle is fitted in all existing points of the element.


void drawingField::toggleMirrorx()

In selected text elements and cell references the mirror flag is set.(introduced with release 20220808)


void drawingField::toLines()

Converts selected path elements to a path for each segment of the path.


void drawingField::toPath()

Converts selected element to pathes with it outline.


void drawingField::toPolygon()

Converts selected element to polygon. The appearance will not change.


void drawingField::undo()

Undo the last modification.


int drawingField::unusedLayer(int startLayer)

Returns: the first unused layer in the current design. The search is started at startLayer. If no unused layer is found, -1 is returned.


void drawingField::updateFile(string file)

Cells with the same cellname with cell in the file are replaced by the cell of this file.


bool drawingField::useLayer(int layer)

Returns: true if layer is used in the current design, otherwise false.


double drawingField::userunits

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 Members


void drawingField::extractActiveLayer()

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.


void drawingField::deleteActuellCell()

OBSOLETE: please use deleteCurrentCell instead.

The current cell is deleted.