Home Forums Nazca Exclude Layers from Export_GDS Reply To: Exclude Layers from Export_GDS


Dear Daneel,

You can apply a layermap dictionary upon export, like {old_layer: new_layer}:

import nazca as nd

points = [(0, 0), (5, 0), (0, 5)]
nd.Polygon(points, layer=1).put(0)
nd.Polygon(points, layer=2).put(5)

nd.export_gds(layermap={1:5}, layermapmode='none')
#nd.export_gds(layermap={1:5, 2:None}) # layermapmode default = 'all'

The layermapmode keyword sets if you start the mapping with all layers removed (‘none’) or all layers still in (‘all’). In the commented out export_gds line I noticed that layer 2 exports to Nazca’s “dump-layer” 1111/0 (Nazca-0.5.3). It is better to have None-mappings removed completely though and I will adapt that.