@@ -319,8 +319,8 @@ def save(self, name=None, library=None, grid_steps_per_micron=1000, parallel=Fal
319
319
elif name .endswith ('.gds' ):
320
320
name = name [:- 4 ]
321
321
library = library or 'gdshelpers'
322
- elif name .endswith ('.oasis ' ):
323
- name = name [:- 6 ]
322
+ elif name .endswith ('.oas ' ):
323
+ name = name [:- 4 ]
324
324
library = library or 'fatamorgana'
325
325
elif name .endswith ('.dxf' ):
326
326
name = name [:- 4 ]
@@ -370,24 +370,6 @@ def save(self, name=None, library=None, grid_steps_per_micron=1000, parallel=Fal
370
370
371
371
layout .cells = [cells [0 ]] + list (set (cells [1 :]))
372
372
373
- # noinspection PyUnresolvedReferences
374
- def replace_names_by_ids (oasis_layout ):
375
- name_id = {}
376
- for cell_id , cell in enumerate (oasis_layout .cells ):
377
- if cell .name .string in name_id :
378
- raise RuntimeError (
379
- 'Each cell name should be unique, name "' + cell .name .string + '" is used multiple times' )
380
- name_id [cell .name .string ] = cell_id
381
- cell .name = cell_id
382
- for cell in oasis_layout .cells :
383
- for placement in cell .placements :
384
- placement .name = name_id [placement .name .string ]
385
-
386
- oasis_layout .cellnames = {v : k for k , v in name_id .items ()}
387
-
388
- # improves performance for reading oasis file and workaround for fatamorgana-bug
389
- replace_names_by_ids (layout )
390
-
391
373
with open (name + '.oas' , 'wb' ) as f :
392
374
layout .write (f )
393
375
elif library == 'ezdxf' :
0 commit comments