Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with layer mapping #592

Closed
klayoutmatthias opened this issue Jun 27, 2020 · 0 comments
Closed

Issue with layer mapping #592

klayoutmatthias opened this issue Jun 27, 2020 · 0 comments
Assignees
Labels

Comments

@klayoutmatthias
Copy link
Collaborator

klayoutmatthias commented Jun 27, 2020

test.gds.zip

The following code gives unexpected results. It is supposed to make two layers, 10000 and 10001 to 85 and 185 respectivly:

ly = RBA::Layout::new
l1 = ly.layer(85, 0)
l2 = ly.layer(185, 0)
## PROBLEM: these layers act as catch-all when the reader normalizes the layer map
## and inserts them as "known" layers!!!!
la = ly.layer
lb = ly.layer
 
opt = RBA::LoadLayoutOptions.new
lm = RBA::LayerMap.new
lm.map(RBA::LayerInfo.new(10001, 0), l1)
lm.map(RBA::LayerInfo.new(10000, 0), l2)
opt.set_layer_map(lm, false)

lm = ly.read("test.gds", opt)
puts lm.to_string
 
puts ly.top_cell.bbox_per_layer(l1).to_s
puts ly.top_cell.bbox_per_layer(l2).to_s
puts ly.top_cell.bbox_per_layer(la).to_s
puts ly.top_cell.bbox_per_layer(lb).to_s

The output is:

*/*
()
()
()
(-530,-190;560,720)

which is unexpected because it means all layers have been read into lb.

Without the presence of layers la and lb, the code works as expected. It also works if la and lb are assigned a specific layer and datatype.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant