Skip to main content

Tests Coverage

Optics Design Workbench

This workbench was inspired by the OpticsWorkbench and aims to extend its functionality towards design and optimization of optical assemblies.

The documentation is far from complete but growing.

Feel free to ask any question in the forum thread.

Getting started with examples

To get started, FCStd files and corresponding jupyter notebooks can be found in the examples folder of this repository.

Gaussian beam point source and detector

examples/1-source-and-detector

Ray-fan simulation mode

The ray-fan mode renders rays for cross-sections of the solid angle with a spacing matching the inverse power density of the light source. This mode renders fast and gives a good first impression where the optical power of your sources ends up.

ray-fan mode screenshot

Monte-Carlo simulation mode

In the Monte-Carlo simulation mode, rays are placed randomly in the full solid angle according to the given power density of the light source. If the simulation is run in continuous mode, recorded ray hits will be stored to disk and can be loaded and further analyzed with the accompanying notebook in the example folder.

monte-carlo mode screenshot

Spherical lens and parabolic mirror

examples/2-lens-and-mirror

Any geometric body in FreeCAD can become member of one of the OpticalGroups to turn them into reflective, refractive, absorbing or ray-detecting objects. This example contains spherical lenses and slotted parabolic mirrors, transparent and absorbing detectors. When running the continuous simulation, folders for all objects that have set Store Hits to true will be generated.

lens and mirror screenshot

Geometry parameter optimization

examples/3-parameter-sweeps

All parameters of the FreeCAD model are accessible from an external python shell through the jupyter_utils submodule. The recommended workflow is to use a jupyter notebook for such edits (hence the module name). The example shows a simple spherical lens, the radius of which is optimized to minimize the spot size on a detector.

Troubleshooting

When encountering errors please make sure that the workbench is up-to-date (Addon Manager->Optics Design Workbench->Update) and that all python dependencies have the latest version (Addon Manager->Little "gear" button->Update all python packages).

When things don't work as expected first make sure you are actually running want you intend to run and whether the same workbench version is installed on the python and the FreeCAD side. To check this, run

import freecad.optics_design_workbench
freecad.optics_design_workbench.versionInfo()

in the FreeCAD python shell and

import optics_design_workbench
optics_design_workbench.versionInfo()

in your regular python shell of choice.

Make sure that the workbench versions seen by FreeCAD and by python match and that all the displayed versions and paths match your expectations.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

optics_design_workbench-1.2.6.tar.gz (5.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

optics_design_workbench-1.2.6-py3-none-any.whl (499.1 kB view details)

Uploaded Python 3

File details

Details for the file optics_design_workbench-1.2.6.tar.gz.

File metadata

  • Download URL: optics_design_workbench-1.2.6.tar.gz
  • Upload date:
  • Size: 5.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for optics_design_workbench-1.2.6.tar.gz
Algorithm Hash digest
SHA256 e930bec6770cf7e7f8498d7c41b3e71261002a075b6e827b137a252c4196f194
MD5 9136d6acc2a593a404bed103a9ee827a
BLAKE2b-256 3bd4e5ac9e0e521c1615c90b53c6e9304602f9aee2b24d592e361deab88bd5ac

See more details on using hashes here.

File details

Details for the file optics_design_workbench-1.2.6-py3-none-any.whl.

File metadata

  • Download URL: optics_design_workbench-1.2.6-py3-none-any.whl
  • Upload date:
  • Size: 499.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for optics_design_workbench-1.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7ca0abc679afbcc9176ab59cae9616c28b4a0140c6577b3c852323b42ddd2af4
MD5 ecf1d433a4261c6e0a3216a4827e683d
BLAKE2b-256 97b99b3bde40fc41b73bb0ffe9f53b0a5995405b75ed510524a5ecddafcd9ce1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.2.6 This release

2 files

1.2.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

0.7.3

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page