the strm2xxx utilities have been provided for test purposes mainly, so they don't provide much functionality. They could be extended to support layer maps of course, but right now, there is no such option.
KLayout tries to derive reasonable numbers from the CIF layer names (i.e. a layer name of "5" will be written to layer 5). If you want to specify a layer mapping in batch more the only solution is to use a Ruby script. this is such a script:
# Specify the layer list here:
# The format is "name" => GDS layer number
list = {
"METAL" => 17,
"VIA" => 18
}
ly = RBA::Layout.new
# Prepare the layer mapping for the reader
layer_map = RBA::LayerMap::new
list.each do |name,layer|
spec = RBA::LayerInfo::new(layer, 0, name)
layer_map.map(spec, ly.insert_layer(spec))
end
# Read the input file ($input is taken from the klayout
# command line)
opt = RBA::LoadLayoutOptions::new
opt.set_layer_map(layer_map, false)
ly.read($input, opt)
# Write the output ($output is taken from the klayout
# command line)
ly.write($output)
You'll have to adjust the layer mapping accordingly.
Save the script to a .rb file, i.e. "convert_cif_to_gds.rb" and run it using KLayout's command line with
Comments
Hi,
the strm2xxx utilities have been provided for test purposes mainly, so they don't provide much functionality. They could be extended to support layer maps of course, but right now, there is no such option.
KLayout tries to derive reasonable numbers from the CIF layer names (i.e. a layer name of "5" will be written to layer 5). If you want to specify a layer mapping in batch more the only solution is to use a Ruby script. this is such a script:
You'll have to adjust the layer mapping accordingly.
Save the script to a .rb file, i.e. "convert_cif_to_gds.rb" and run it using KLayout's command line with
(the -zz option runs KLayout in batch mode without user interface).
Regards,
Matthias