Skip to content

Python Binding / Layout / find_layer broken for layer "name" #1425

@ejprinz

Description

@ejprinz

The Python Binding function "find_layer" works for numeric (layer, datatype), for (const LayerInfo info), but not for (string name). Test case:

# Test case for 23/07/18 bug report
# 
import klayout.db as kl

lyo = kl.Layout()
l1 = lyo.layer(1, 0, 'L1;D0')

print(f'Layer Infos: {lyo.layer_infos()}')

print(f'Find layer by layer/datatype: {lyo.find_layer(1, 0)}')
print(f'Find layer by layer info: {lyo.find_layer(lyo.layer_infos()[0])}')
print(f'Find layer by layer name: {lyo.find_layer("L1;D0")}')

results in:

Layer Infos: ['L1;D0' (1/0)]
Find layer by layer/datatype: 0
Find layer by layer info: 0
Find layer by layer name: None

It would be good to have this working to be able to determine whether a layer of a certain name is in the layermap.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions