Class: Layer

Layer

Members

color :string

Type:
  • string

ctx_ :up.api.Context|up.api.ComponentContext

@private
Type:
Inherited From:

ident :string

Type:
  • string

isCopper :boolean

Type:
  • boolean

isFootprint :boolean

Type:
  • boolean
Inherited From:

isMoveable :boolean

Type:
  • boolean

isPadstack :boolean

Type:
  • boolean
Inherited From:

isPlane :boolean

Type:
  • boolean

isPlatedThroughHole :boolean

Type:
  • boolean
Inherited From:

isPour :boolean

Type:
  • boolean
Inherited From:

isTrace :boolean

Type:
  • boolean
Inherited From:

isVia :boolean

Type:
  • boolean
Inherited From:

isVisible :boolean

Type:
  • boolean

name :string

Type:
  • string

(non-null) nets :Array.<up.api.core.Net>

Type:
Inherited From:

Methods

closeCheckAndCall(toCall) → {function}

Parameters:
Name Type Description
toCall function
Inherited From:
Returns:
Type
function

defineGetAndSetFunctions(propertyName, getFunction, setFunction)

Parameters:
Name Type Description
propertyName string
getFunction function
setFunction function
Inherited From:

defineGetFunction(propertyName, getFunction)

Parameters:
Name Type Description
propertyName string
getFunction function
Inherited From:

isNet(netName) → {boolean}

Returns true <=> the object is in the provided net.
Parameters:
Name Type Description
netName string
Inherited From:
Returns:
Type
boolean

isValid() → {boolean}

This:
Returns:
Type
boolean

onLayer(layer) → {boolean}

Returns true <=> the pcb object is on the provided layer. Default False for proxyobjects.
Parameters:
Name Type Description
layer string
Inherited From:
Returns:
Type
boolean

setActive(active)

This:
Parameters:
Name Type Description
active boolean Whether the layer should be active.

setColor(color)

This:
Parameters:
Name Type Description
color string The colour to set the layer to, as a six-digit hex string.

setVisible(visible)

This:
Parameters:
Name Type Description
visible boolean True to show the layer, false to hide.