Skip to content

Repository files navigation

OpticalSetupCAD

Design your optical setup with python and the actual optical elements.

This library utilizes CadQuery. For visualization I use CQ-Editor and FreeCAD.

Workflow

Many suppliers of optical components offer .step-files for their products. These can be used to build the various components of your setup as 3D models.

In this example I will show it with the RS3P4M pedestal and LMR1/M lens mount. First download the .step-files and save them to the object_files directory. Open import_export.py in CQ-Editor, import the files and place the objects fittingly together. I aligned every component to a beam travelling the x-axis from positive to negative and the x-z-plane is the foundation. The combo is then saved to the combined_files directory, your defintion can be saved to defintions.py. Open combinations.py in the editor of your choice and add your combined file to it.

utils.py has some useful functions.

  • calculate_angle is used internally
  • markers places circles in the x-z-plane at 25mm distance, symbolising the holes in the table
  • table does the same as markers but builds a plane and drills the holes
  • line places mirror objects at the points in a given list, so you don't need to set each one per hand
  • beam places a beam, with given radius and color. Can be circular and rectangular. Returns length of the path.

About

Design your optical setup with python and the actual optical elements.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages