masque/examples/tutorial
2026-02-16 17:58:34 -08:00
..
basic_shapes.py misc cleanup (mostly type-related) 2026-02-16 17:58:34 -08:00
devices.py [examples] clean up imports 2026-02-14 16:57:11 -08:00
library.py [examples] clean up imports 2026-02-14 16:57:11 -08:00
pather.py [tutorial] include a repetition and update docs 2026-02-15 20:05:38 -08:00
pcgen.py [examples] some cleanup 2026-02-14 16:58:24 -08:00
port_pather.py [examples] expand port_pather tutorial 2026-02-14 17:06:29 -08:00
README.md [tutorial] include a repetition and update docs 2026-02-15 20:05:38 -08:00
renderpather.py [tutorial] include a repetition and update docs 2026-02-15 20:05:38 -08:00

masque Tutorial

Contents

  • basic_shapes:
    • Draw basic geometry
    • Export to GDS
  • devices
    • Reference other patterns
    • Add ports to a pattern
    • Snap ports together to build a circuit
    • Check for dangling references
  • library
    • Create a LazyLibrary, which loads / generates patterns only when they are first used
    • Explore alternate ways of specifying a pattern for .plug() and .place()
    • Design a pattern which is meant to plug into an existing pattern (via .interface())
  • pather
    • Use Pather to route individual wires and wire bundles
    • Use AutoTool to generate paths
    • Use AutoTool to automatically transition between path types
  • renderpather
    • Use RenderPather and PathTool to build a layout similar to the one in pather, but using Path shapes instead of Polygons.
  • port_pather
    • Use PortPather and the .at() syntax for more concise routing
    • Advanced port manipulation and connections

Additionaly, pcgen is a utility module for generating photonic crystal lattices.

Running

Run from inside the examples directory:

cd examples/tutorial
python3 basic_shapes.py
klayout -e basic_shapes.gds