Draw a bench or a chip once, in Python or in the editor. Get the paper figure, the 1D schematic, the 3D scene with moving light, and the chip's layout and cross-sections.
| Figures | Light and chips | Tools |
|---|---|---|
Each figure redraws a published one. The example cells name the papers.
What it does
| Area | What you get |
|---|---|
| Figures | Benches and chips in 1D, 2D and 3D, with plots and pictures as insets: SVG, TikZ or a studio 3D image. |
| Editor | The same scenes without code, in the 1D, 2D, 3D and Layout views. |
| Light | Light moves through the bench or the chip, live in 3D or in a video of a camera tour. |
| Chips | Rings, modulators, couplers and pads on a die, with waveguide routes that bend like real ones. |
| GDS | A GDS file with its layer stack or KLayout technology, in 3D and in cross-sections. |
| Agents | Skills and an MCP server for Claude Code, Codex and other agents. |
Install
pip install "optodraw[gui,gds]" # with the editor and GDS
optodraw-gui # open the editor
Without extras you get the Python package alone. [all] adds every extra.
Quick start
# The 8.9 times beam expander of Curd et al., Methods 88, 37-47 (2015), Fig. 1A (1 unit = 4 mm)
from optodraw import Beam, Laser, Lens, Scene
scene = Scene(title="Beam expander", platform="free_space")
laser = scene.add(Laser(center=(-78, 0), wavelength=488, label="488 nm laser"))
lens1 = scene.add(Lens(center=(-58, 0), focal_length=45 / 4, aperture=6, label="f = 45 mm"))
lens2 = scene.add(Lens(center=(53, 0), focal_length=400 / 4, aperture=24, label="f = 400 mm"))
scene.add(Beam.through(laser, lens1, lens2, wavelength=488))
scene.fit_frame(margin=8)
scene.render_svg("expander.svg") # the 2D figure; render_threejs("expander.html") gives 3D
Use it with an AI agent
The package ships agent skills: instructions that Claude Code, Codex and other agents read first.
| skill | use it for |
|---|---|
optodraw-figure |
a paper figure of a bench or a chip |
optodraw-layout |
chip floorplans and routes that are right, not only clean |
optodraw-component |
a part of your own, in 1D, 2D and 3D |
optodraw-gds-3d |
a GDS file in 3D, with a layer stack and cross-sections |
optodraw-animation |
light that moves through a setup or a chip |
optodraw-skills install # into ~/.claude/skills and ~/.agents/skills
optodraw-skills install --project # into ./.claude/skills and ./.agents/skills
Agents that speak MCP can use the optodraw-mcp server (pip install "optodraw[mcp]").
Learn more
- The editor: every view, menu and export.
- GDS files: layer stacks, KLayout technologies and the Layout view.
- Moving light: GIFs, videos and the live 3D player.
- AI agents: the skills and the MCP server.
- API reference: every public name.
Cite and license
Please cite optodraw with CITATION.cff.
optodraw is free and open source under the BSD 3-Clause License.
It grew from Alex Tait's first drawsvg package.
Metadata
Release files for optodraw 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| optodraw-0.10.0.tar.gz | 9.9 MB | With provenance | Details for optodraw-0.10.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| optodraw-0.10.0-py3-none-any.whl | Python 3 | none | any | Details for optodraw-0.10.0-py3-none-any.whl |
Total release size: 12.3 MB
Release files / optodraw-0.10.0.tar.gz
| Download URL | optodraw-0.10.0.tar.gz |
|---|---|
| Size | 9.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01254e2b2d0d1eb379d0d6f364d0c87cb4295daf098dfb830b6878fbdd01adf6
|
|
BLAKE2b-256 checksum How to use checksums |
5421f72041916fb690520f423aac477db83c12cf4e6e9d36f4d09fba09258e05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logRelease files / optodraw-0.10.0-py3-none-any.whl
| Download URL | optodraw-0.10.0-py3-none-any.whl |
|---|---|
| Size | 2.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
570530f05ab5d85fc172fae7ecd694c0583db32bb537ff6f16d2a09ad7ce47b8
|
|
BLAKE2b-256 checksum How to use checksums |
92d7652e2b463ed621deac5a4c0c4897e550e85187ab119c8587df281ac0b0e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logSecurity for optodraw 0.10.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for optodraw-0.10.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.