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 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::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.