Skip to content

Commit 1352a45

Browse files
committed
Introduction of GdsLibrary
1 parent 69ba153 commit 1352a45

File tree

9 files changed

+387
-295
lines changed

9 files changed

+387
-295
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ Help support Gdspy development by [donating via PayPal](https://www.paypal.com/c
5353
## History of changes
5454

5555
### Version 1.? (?)
56+
* Introduction of ``GdsLibrary`` to allow user to work with multiple library simultaneously.
57+
* Deprecated ``GdsImport`` in favor of ``GdsLibrary``.
5658
* Renamed `gds_print` to `save_gds` and `GdsPrint` to `GdsWriter`.
5759
* Development changed to Python 3 (Python 2.6 and above supported via [python-future](http://python-future.org/)).
5860
* Added photonics example.

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# You can set these variables from the command line.
55
SPHINXOPTS =
6-
SPHINXBUILD = sphinx-build2
6+
SPHINXBUILD = sphinx-build
77
PAPER =
88
BUILDDIR = _build
99

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python2
1+
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
44
# gdspy documentation build configuration file, created by
@@ -51,7 +51,7 @@
5151

5252
# General information about the project.
5353
project = 'gdspy'
54-
copyright = '2009-2016, Lucas H. Gabrielli'
54+
copyright = '2009-2017, Lucas H. Gabrielli'
5555
author = 'Lucas H. Gabrielli'
5656

5757
# The version info for the project you're documenting, acts as replacement for

docs/construction.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ Main API
77
Classes
88
~~~~~~~
99

10+
GdsLibrary
11+
----------
12+
13+
.. autoclass:: gdspy.GdsLibrary
14+
:members:
15+
:no-undoc-members:
16+
:inherited-members:
17+
:show-inheritance:
18+
19+
1020
Cell
1121
----
1222

docs/io.rst

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ Import and Output
77
Classes
88
~~~~~~~
99

10-
GdsImport
11-
---------
10+
LayoutViewer
11+
------------
1212

13-
.. autoclass:: gdspy.GdsImport
13+
.. autoclass:: gdspy.LayoutViewer
1414
:members:
1515
:no-undoc-members:
16-
:inherited-members:
17-
:show-inheritance:
16+
:no-inherited-members:
17+
:no-show-inheritance:
1818

1919

2020
GdsWriter
@@ -27,16 +27,6 @@ GdsWriter
2727
:show-inheritance:
2828

2929

30-
LayoutViewer
31-
------------
32-
33-
.. autoclass:: gdspy.LayoutViewer
34-
:members:
35-
:no-undoc-members:
36-
:no-inherited-members:
37-
:no-show-inheritance:
38-
39-
4030
Functions
4131
~~~~~~~~~
4232

examples/tutorial.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -341,14 +341,15 @@ def dspiral_dt(t):
341341

342342
# Import the file we just created, and extract the cell 'POLYGONS'. To
343343
# avoid naming conflict, we will rename all cells.
344-
gdsii = gdspy.GdsImport('tutorial.gds',
345-
rename={'POLYGONS': 'IMPORT_POLY',
346-
'PATHS': 'IMPORT_PATHS',
347-
'OPERATIONS': 'IMPORT_OPER',
348-
'SLICE': 'IMPORT_SLICE',
349-
'REFS': 'IMPORT_REFS',
350-
'TRANS': 'IMPORT_TRANS'},
351-
layers={1: 7, 2: 8, 3: 9})
344+
gdsii = gdspy.GdsLibrary()
345+
gdsii.read_gds('tutorial.gds',
346+
rename={'POLYGONS': 'IMPORT_POLY',
347+
'PATHS': 'IMPORT_PATHS',
348+
'OPERATIONS': 'IMPORT_OPER',
349+
'SLICE': 'IMPORT_SLICE',
350+
'REFS': 'IMPORT_REFS',
351+
'TRANS': 'IMPORT_TRANS'},
352+
layers={1: 7, 2: 8, 3: 9})
352353

353354
# Now we extract the cells we want to actually include in our current
354355
# structure. Note that the referenced cells will be automatically

0 commit comments

Comments
 (0)