Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
Gdspy 2 initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
heitzmann committed Oct 4, 2019
1 parent 93f6b4b commit 5e50026
Show file tree
Hide file tree
Showing 26 changed files with 8,682 additions and 9,358 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ Typical applications of gdspy are in the fields of electronic chip design, plana

### Dependencies:

* [Python](http://www.python.org/) (tested with versions 2.7, 3.5, 3.6, and 3.7)
* [Python](http://www.python.org/) (tested with versions 3.5, 3.6, and 3.7)
* [Numpy](http://numpy.scipy.org/)
* [Python-future](http://python-future.org/) (only for Python 2)
* C compiler (needed only if built from source)
* Tkinter (optional: needed for the `LayoutViewer` GUI)
* [Sphinx](http://sphinx-doc.org/) (optional: to build the documentation)
Expand Down Expand Up @@ -70,6 +69,14 @@ Help support gdspy development by [donating via PayPal](https://www.paypal.com/c
* Iterating over `Cell` objects yield all its polygons, paths, labels and references.
* Breaking change to `*.to_gds` functions in order to improve write efficiency (this should not be a problem for most users, since `gdspy.write_gds` and `Cell.write_gds` remain the same).

#### Version 2.0
* Gdspy no longer maintains a global library; the user is responsible for creating a library and adding cells to it.
* `GdsLibrary.add` can add dependencies recursively.
* Renamed `GdsLibrary.cell_dict` to `GdsLibrary.cells`.
* Removed `GdsLibrary.extract`.
* Deprecated classes `PolyPath` and `L1Path` removed: use `FlexPath` and `RobustPath`.
* Deprecated function `fast_boolean` removed: use `boolean`.

### Version 1.4.2 (Oct 01, 2019)
* Bug fix in `FlexPath`.

Expand Down
Binary file modified docs/_static/fonts.gds
Binary file not shown.
7 changes: 4 additions & 3 deletions docs/_static/fonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def render_text(text, size=None, position=(0, 0), font_prop=None, tolerance=0.1)
if __name__ == "__main__":
fp = FontProperties(family='serif', style='italic')
text = gdspy.PolygonSet(render_text('Text rendering', 10, font_prop=fp), layer=1)
gdspy.Cell('TXT').add(text)
gdspy.write_gds('fonts.gds')
gdspy.LayoutViewer()
lib = gdspy.GdsLibrary()
lib.add(gdspy.Cell('TXT').add(text))
lib.write_gds('fonts.gds')
gdspy.LayoutViewer(lib)
Binary file modified docs/_static/photonics.gds
Binary file not shown.
7 changes: 5 additions & 2 deletions docs/_static/photonics.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def grating(period, number_of_teeth, fill_frac, width, position, direction, lda=

if __name__ == '__main__':
# Examples
lib = gdspy.GdsLibrary()

# Negative resist example
width = 0.45
Expand Down Expand Up @@ -109,6 +110,7 @@ def grating(period, number_of_teeth, fill_frac, width, position, direction, lda=
c.add(gdspy.CellArray(taper, len(ring_gaps), 1, (input_gap, 0), (0, 0)))
c.add(gdspy.CellArray(grat, len(ring_gaps), 1, (input_gap, 0), (io_gap, 900 + taper_len)))

lib.add(c)

# Positive resist example
width = 0.45
Expand Down Expand Up @@ -157,7 +159,8 @@ def grating(period, number_of_teeth, fill_frac, width, position, direction, lda=
c.add(gdspy.CellArray(taper, len(ring_gaps), 1, (input_gap, 0), (0, 0)))
c.add(gdspy.CellArray(grat, len(ring_gaps), 1, (input_gap, 0), (io_gap, 900 + taper_len)))

lib.add(c)

# Save to a gds file and check out the output
gdspy.write_gds('photonics.gds')
gdspy.LayoutViewer()
lib.write_gds('photonics.gds')
gdspy.LayoutViewer(lib)
Loading

0 comments on commit 5e50026

Please sign in to comment.