Class Reference layer

Setup class of a single layer. More...

Member

int blue()
void disable()
void enable()
int get3dLevel()
int get3dThickness()
int getStyle()
int green()
bool isConductor()
bool isEnabled()
bool isVia()
bool isVisible(int datatype)
int mapToDatatype
int mapToLayer
string name
void set3dView(int level,int thickness)
int red()
void setColor(string name)
void setColor(int red, int green, int blue)
void setCustomStyle(string style)
void setDatatypesInvisible(int start, int stop)
void setDatatypesVisible(int start, int stop)
void setDatatypesVisibleAll()
void setStyle(int style)
string shortkey
bool visible

Detailed Description

This class is the setup for the display of a single layer. Each layer can accessed via the class layers. Example:

layers::num[5].name="Layer Number 5";

The class layer can not be used as type, so new instances of the layer class cannot be created. Layer setting are global and will affect all open LayoutEditor windows.

Some scripting languages are not able to handle an array of classes. In that case the individual layers can be accessed with the number method. Here is an example for Python scripting:

layers.number(9).name="layer nine"

Member Function Documentation


int layer::blue()

Returns: the blue part of the layer color.


void layer::disable()

The layer will be disabled and not be displayed in the menus/toolbars.


void layer::enable()

The layer will be enabled and be displayed in the menus/toolbars.


int layer::get3dLevel()

Returns: the level of the layer in the 3d view


int layer::get3dThickness()

Returns: the thickness of the layer in the 3d view


int layer::getStyle()

The style/filling of a layer can read via this method.

Returns: the style number is returned. See setStyle for details on available styles.


int layer::green()

Returns: the green part of the layer color.


bool layer::isConductor()

Returns: true, if the layer is a conductor.


bool layer::isEnabled()

Returns: true, if the layer is enabled.


bool layer::isVia()

Returns: true, if the layer is a via.


bool layer::isVisible(int datatype)

Returns: true, if datatype is currently displayed (introduced with releases 20200409)


int layer::mapToDatatype

If the option "gds map layer" or "oasis map layer" is active, the layer is mapped to this datatype. If datatype is set lower than 0, all datatypes are mapped and saved with datatype 0


int layer::mapToLayer

If the option "gds map layer" or "oasis map layer" is active, the layer is mapped to this value.


string layer::name

The name of a layer is hold here.


void layer::set3dView(int level,int thickness)

The height level and the thickness of the layer ist set. The values are used for the 3dView and some calulations like the Extraction of Capacitance.


int layer::red()

Returns: the red part of the layer color.


void layer::setColor(string name)

Sets the RGB value of this layer-color to name, which may be in one of these formats:

  • #RGB (each of R, G, and B is a single hex digit)
  • #RRGGBB
  • #AARRGGBB
  • #RRRGGGBBB
  • #RRRRGGGGBBBB
  • A name from the list of colors defined in the list of SVG color keyword names provided by the World Wide Web Consortium.

(introduced with release 202011122)


void layer::setColor(int red, int green, int blue)

The color of a layer can modified via method.

Parameter:
red the red component
green the green component
blue the blue component

void layer::setCustomStyle(string style)

Sets a custom fill style to the layer.

Parameter:
style is a string with three comma separated values. The first one is the fill pattern size in x direction, followed by the fill pattern size in y direction and finally the fill pattern itself. Each character of the fill pattern defines 6 bit of the pattern. Example: "6,6,aaaaa=" is a fill pattern with a size of 6x6 bit and 5 clear lines and one solid filled line.
Pattern of Characters:
a 000000 q 0000X0 G 00000X W 0000XX
b X00000 r X000X0 H X0000X X X000XX
c 0X0000 s 0X00X0 I 0X000X Y 0X00XX
d XX0000 t XX00X0 J XX000X Z XX00XX
e 00X000 u 00X0X0 K 00X00X 1 00X0XX
f X0X000 v X0X0X0 L X0X00X 2 X0X0XX
g 0XX000 w 0XX0X0 M 0XX00X 3 0XX0XX
h XXX000 x XXX0X0 N XXX00X 4 XXX0XX
i 000X00 y 000XX0 O 000X0X 5 000XXX
j X00X00 z X00XX0 P X00X0X 6 X00XXX
k 0X0X00 A 0X0XX0 Q 0X0X0X 7 0X0XXX
l XX0X00 B XX0XX0 R XX0X0X 8 XX0XXX
m 00XX00 C 00XXX0 S 00XX0X 9 00XXXX
n X0XX00 D X0XXX0 T X0XX0X 0 X0XXXX
o 0XXX00 E 0XXXX0 U 0XXX0X - 0XXXXX
p XXXX00 F XXXXX0 V XXXX0X = XXXXXX

void layer::setDatatypesInvisible(int start, int stop)

The visibility for datatype between start and stop will set off. Any previous setting on visible datatypes will be removed. (introduced with releases 20200409)


void layer::setDatatypesVisible(int start, int stop)

The visibility for datatype between start and stop is set, all other datatypes will get invisible. (introduced with releases 20200409)


void layer::setDatatypesVisibleAll()

All datatype on the layer will be displayed.(introduced with releases 20200409)


void layer::setStyle(int style)

The style/filling of a layer can modified via this method. 40 diffent fillstyles are supported:

row one has the style number 0 to 9 (from left to right), row two the number 10 to 19 and so on.

layer fill styles


string layer::shortkey

shortkey for this layer used in the layer-shortkey functions.


bool layer::visible

The visibility of a layer can modified via this value.