Giter VIP home page Giter VIP logo

opticalsetupcad's Introduction

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.

opticalsetupcad's People

Contributors

chrbeckm avatar

Stargazers

marcelkaras avatar Anno Knierim avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.