A single element of the drawing like box or polygon. More...
A single element of the drawing. It can ether be a shape (path, box, polygon or text) or a cell reference (cell reference or cell reference array).
//...
element \*e=layout->drawing->currentCell->firstElement->thisElement;
if (e!=NULL) {
e->layerNum=23;
if (e->isPath()) e->setWidth(34);
if (e->isBox()) e->selectAll();
}
//...
Also some some general geometric operations are part of this class as static member.
point p1(34,87);
point p2(267,142);
double distance=element::distance(p1,p2);
Clears the mirror attribute for cellrefs, cellrefarrays and text elements. Has no effect for other elements.
See also: setMirrorx(), toggleMirrorx()
All properties in this element are removed. (introduced with release 20230828)
Stores the datatype for each element. The datatype is a additional integer property of each element. This property is often used to store the energy level for electron beam writers. Also it is often used to store the purpose of this element.
See also: getDatatype(), setDatatype()
Mask writer from the company Raith uses some GDS extensions. This method will read the PxxData from an path element. For more information, please see the example macro within the LayoutEditor package under macros/examples/raith_GDS_extension.layout.(introduced with release 20220323)
int dwelltimeSelection;
double pitchInPathDir;
double pitchCrossPathDir;
double pitchScalingFactor;
int periods;
int gratingType;
int dotsPerCycle;
if (my_element->decodeRaithPxxData(&dwelltimeSelection, &pitchInPathDir,
&pitchCrossPathDir, &pitchScalingFactor, &periods,&gratingType,&dotsPerCycle)){
string sname=my_element->getPropertyString("RaithMBMSPath");
In LayoutScript for Python there are two ways to receive the values:
# there is one addition 'list' function returning a Python list will all values:
data= my_element.decodeRaithPxxDataList()
print (data)
# will print: [True, 16, 100000.0, 0.0, 1000, 1, 0, 0]
# the explicit way by creating a pointer variable for each value:
dwelltimeSelection=LayoutScript.pointerInt()
pitchInPathDir=LayoutScript.pointerDouble()
pitchCrossPathDir=LayoutScript.pointerDouble()
pitchScalingFactor=LayoutScript.pointerDouble()
periods=LayoutScript.pointerInt()
gratingType=LayoutScript.pointerInt()
dotsPerCycle=LayoutScript.pointerInt()
result= my_element.decodeRaithPxxData(dwelltimeSelection, pitchInPathDir, pitchCrossPathDir, pitchScalingFactor, periods,gratingType,dotsPerCycle)
print (dwelltimeSelection.value()) # will print 16
print (pitchInPathDir.value()) # will print 100000.0
In the case an element is partial selected, any selected point is removed from the element. For example if you have a path with three points and the middle point is selected, the middle point will be removed and you will get a simple line. The method will have no effect an complete selected shapes.
For cell references and cell array references the referred cell is returned as a pointer to this cell. This method will return NULL for any other shapes.
See also: setCellRef()
DeselectAll will complete deselect this shapes independent whether it is selected complete or partial.
Mask writer from the company Raith uses some GDS extensions. This method will set the PxxData to an path element. For more information, please see the example macro within the LayoutEditor package under macros/examples/raith_GDS_extension.layout.(introduced with release 20220323)
Returns: the bounding box of the element. If a text element has a negative width a rect with zero size is retunr at the origin. The same for cellreferences to emtpy cells.
Returns: for path element the setting for the path cap is returned. The same value as for setCap are used (0 no caps, 1 round caps, 2 square caps):
For all other elements 0 is returned.
See also: setCap()
The value of datatype property is returned.
See also: datatype, setDatatype()
The text contents for text element is returned. Has no effect for other elements. To set the text contents use setName.
See also: setName()
For a cell reference arrays the number of repetitions in x direction is return. For all other elements 0 is returned.
See also: setNx()
For a cell reference arrays the number of repetitions in y direction is return. For all other elements 0 is returned.
See also: setNy()
Returns:
See also: setPoints()
Returns: the presentation value of a text element. The returned value are identical with the value of setPresentation(). (introduced with release 20190411)
Mask writer from the company Raith uses the datatype to store the exposure dosis. The valule in encoded in a special kind. The method will decode it and returns the dosis value. (introduced with release 20220323)
Similar to getPoints, but only returns a point, if it is selected.
Returns: the value string of the property num. If the property with this number not exists, an empty string is returned.
See also: setPropertyString()
Properties of an elment can inside the LayoutEditor addressed by a name or by a number. With this method a name address is used. Properties wih names are supported by OASIS but only partly by GDSII. Other file formats will ignore it. Returns: the property of an element with named name. (introduced with release 20220323)
Returns: the transformation for text eleemnts and cell references. A identical transformation is returned for any other shape.
See also: setTrans()
Get the width for path and text-elements.
Returns: The height of a text-element/ width of a path. Positive value for a width in drawing-units. Negative value for size in pixel.
See also: setWidth()
The selection of this element is inverted.
Returns: true if element is a box otherwise false
Returns: true if element is a cellRef otherwise false
Returns: true if element is a cellRefArray otherwise false
Returns: true if element is a regular polygon with more than 8 points
Returns: true if element is a regular polygon with more than 8 points. The point is set to the centre point and the integer is set to the radius.
For LayoutScript: Pointers to non-classes had be be created with the pointInt() command:
# for python
p2=point()
radius=pointerInt()
# set value with
radius.assign(45);
# read with
print (radius.value())
if el.thisElement.isCircle(p2,radius):
# ....
#alternative way (introduced with release 20220923 with a 'List' function:
p=LayoutScript.point()
data= el.thisElement.isCircleList(p)
print (data) # will print [true,1000]
#for ruby
p2=Point.new()
radius=PointerInt.new()
# to assign radius use
radius.assign(34)
# to output radius use
puts radius.value()
if e.thisElement.is_circle(p2,radius)
#...
end
Returns: true if element is a path otherwise false
Returns: true if element is a polygon otherwise false
Returns: true, if the element has all information of a Raith MBMS path and the option Setup::gdsStoreRaithExtension is enabled. (introduced with release 20220323)
Returns: true if element has a rectangle shape. So for all box elements true will be return. Also polygons and path can have a rectangle shape. For cell references always false will returned. (introduced 20190409)
Returns: true if element has a path, a polygon or a box element. For all other elements false will returned. (introduced 20210105)
Returns: true if element has a square shape. So for box elements with identical width and height true will be return. For cell references always false will returned. (introduced 20190409)
Returns: true if element is a text otherwise false
The layer number of a element. It has no function for cellRefs and cellRefArrays.
The maximum coordinates is returned, if bigger than pos. pos will keep unchanged.
The maximum coordinates of all selected vertexes is returned, if less than pos. pos will keep unchanged, if nothing is selected.
The maximum coordinates is returned.
The maximum coordinates of all selected vertexes is returned. The maximum possible coordinate is returned, if the element is not selected.
The minimum coordinates is returned, if less than pos. pos will keep unchanged, if the design does not contain any element.
The minimum coordinates of all selected vertexes is returned, if bigger than pos. pos will keep unchanged, if no vertex is selected.
The minimum coordinates is returned.
The minimum coordinates of all selected elements is returned. The minimum possible coordinate is returned, if the element is not selected.
If the text is identical with the first argument, it is replaced with the second arugment.
Returns: true, if the text is replaced.
Elements having a transfomation (text, cellref, cellrefArray) will be rotated in deg. This method has no effect on other elements.
Elements having a transfomation (text, cellref, cellrefArray) will be scaled. This method has no effect on other elements.
If set to true the whole element is selected. To select a single point use pSelect.
Selects this element completely. To select single points use pselect.
If the datatype is t, the element is selected.
Selects this element if it is visible.
Set the caps for path elements.
Parameters: cap 0 for no caps, 1 for round caps, 2 for square caps.
See also: getCap()
For cell references and cell array references the refered cell is set. It has no effect on other elements. Reading the refered cell is possible with depend.
See also: depend()
The datatype is set to t, if the element is selected.
The datatype is set to t.
See also: getDatatype()
sets the mirror attribute for cellrefs, cellrefarrays and text element. Has no effect for other elements.
See also: clearMirrorx(), toggleMirrorx()
set the text for text element. Has no effect for other elements.
See also: getName()
For a cell reference arrays the number of repetitions in x direction is set.
See also: getNx()
For a cell reference arrays the number of repetitions in y direction is set.
See also: getNy()
Sets the cooridinates in the same way as getPoints() read it out.
See also: getPoints()
set the presentation for text element. Has no effect for other elements.
Values: | Alignment: |
---|---|
0 | top/left |
1 | top/horizontal center |
2 | top/right |
4 | vertical centered/left |
5 | centered |
6 | vertical centered/right |
8 | bottom/left |
9 | bottom/horizontal center |
10 | bottom/right |
See also: getPresentation().
set the property num to s
See also: getPropertyString()
Set the property with name to value. (introduced with release 20220323)
See also: getPropertyString()
Mask writer from the company Raith uses the datatype to store the exposure dosis. The valule in encoded in a special kind. The method will encode the value into the designated form and sets the datatype accordingly. (introduced with release 20220323)
Sets the transformation for text elements and any cell reference. Will have no effect for any other shape.
See also: getTrans()
Set the width for path and text-elements.
Parameters:
width The height of a text-element/ width of a path is set to this value. Positive value result in a width in drawing-units. Negative value for size in pixel. Set the width for path and text-elements.
See also: getWidth()
toggles the mirror attribute for cellrefs, cellrefarrays and text element. Has no effect for other elements.
See also: clearMirrorx(), setMirrorx()
These methods have been moved to the class point. It may be removed in this class in a coming update.
This function return the angle of line p1-p2 and p2-p3.
This function return the angle of line p1-p2 to the xaxis.
This function return the distance between p1 and p2 in databaseunits.
This function return the shortest distance of p3 to the line p1-p2 in databaseunits.
This function rounds the double d.