UMassIonTrappers / PyOpticL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyOpticL - Code-to-CAD optical design system for AMO experiments

Example of design abstraction layers applied to a strontium trapped ion quantum computer: image

Useful Links

ReadMe

Wiki

Examples

Modular Saturated Absorption Spectroscopy Baseplates compiled at different scales

image

Modular Doublepass Baseplate

image

Simple ECDL (all off-the-shelf components)

image

About PyOpticL

FreeCAD is based on python with built-in support for python scripts etc. It also has:

  • Support for custom workbenches and python libraries
  • Fully featured and customizable GUI
  • Ability to work with various object formats

Beam Simulation

  • Beam paths are automatically calculated based on component placement
  • Component placement can be defined "along beam" to remove the need for hard-coded coordinates
  • Beam calculations include reflection, transmission, refraction, and diffraction (limited)

Workbench Functions

Some GUI accessable functions have been implemented to perform various helpful actions:

  • Re-Run Last Macro - Clears and re-draws last baseplate, great for quickly checking changes
  • Recalculate Beam Path - Useful to check beam paths when applying in-editor modifications
  • Toggle Component Visibility - Easily hide all beams and components
  • Toggle Draw Style - Toggle wire-frame draw style to easily check for hidden issues
  • Export STLs - Export all baseplates and adapter components to STL for fabrication
  • Export Cart - Export all parts to both a spreadsheet and a csv compatible with Thorlabs upload-a-cart system
  • Reload Modules - Reload all PyOpticL modules, great for debugging new parts
  • Get Orientation - Automatic orientation and importing of new components from STEP files
  • Get Position - Measure offsets and mount locations from oriented STEP file

These functions can also be scripted into macros if desired

Getting Setup

There are a few important things to ensure before you can use PyOpticL:

  1. Install FreeCAD, Python, and Git

  2. Add PyOpticL as an custom addon repository in FreeCAD
    Under Edit>Preferences>Addons>Custom Repositories, enter the following information:
    Repository URL: https://github.com/UMassIonTrappers/PyOpticL.git
    Branch: main

  3. Install the PyOpticL library In the Addon Manager (Tools>Addon Manager), search for "PyOpticL" and click install.

  4. Check everything is setup correctly
    You should now be able to re-launch FreeCAD and see the "PyOpticL" workbench in the dropdown

Screenshot 2023-10-27 225345
  1. Check out the wiki or the docs for guides, examples, and library documentation

We thank the MIT QUANTA LAB for sharing their C4PO ('CAD for Precision Optics') based on OpenSCAD which inspired this library.

About


Languages

Language:Python 100.0%