How chbergmann/opticsworkbench works
Optics Workbench is a FreeCAD add-on for geometrical ray tracing. The principal workflow is to prepare CAD geometry, assign it optical behavior, create ray or beam sources, and recompute the document to trace light through the scene. Users can then inspect recorded hit and energy data through plots or spreadsheet export. The graph includes documented lenses, gratings, and analysis tools; some subsystem links are based on the README because their implementation was not sampled.
Main entry points: Ray.py Ray Sources · OpticsWorkbench.py Workbench Operations · InitGui.py Workbench Commands · OpticalObject.py Optical Elements
Components 12
Workbench Setup
- Workbench Commands
InitGui.py - Workbench Operations
OpticsWorkbench.py
Optical Scene
- CAD Geometry
- Optical Elements
OpticalObject.py
Ray Tracing
- Ray Sources
Ray.py - Spectral Sources
SunRay.py - FreeCAD Document
Results Analysis
- Hit Statistics
Ray.py - Hit And Energy Plots
Plot.py - Spreadsheet Export
OpticsWorkbench.py
Other components
- FreeCAD User
- FreeCAD Runtime
Connections 20
- FreeCAD User → Workbench Commands: chooses tools
- Workbench Commands → FreeCAD Runtime: registers workbench
- FreeCAD User → CAD Geometry: creates geometry
- FreeCAD User → Workbench Commands: invokes commands
- Workbench Commands → Workbench Operations: dispatches operations
- Workbench Operations → Ray Sources: creates sources
- Workbench Operations → Optical Elements: creates elements
- Workbench Operations → Spectral Sources: creates spectral group
- Spectral Sources → Ray Sources: creates wavelength rays
- Optical Elements → CAD Geometry: references base geometry
- Ray Sources → FreeCAD Document: creates ray shapes
- Optical Elements → FreeCAD Document: stores optical properties
- Ray Sources → Optical Elements: traces interactions
- Ray Sources → Hit Statistics: records hit data
- Hit And Energy Plots → Hit Statistics: reads hit data
- Spreadsheet Export → Hit Statistics: reads hit data
- FreeCAD User → Hit And Energy Plots: requests analysis
- FreeCAD User → Spreadsheet Export: requests export
- Hit And Energy Plots → FreeCAD Runtime: displays plots
- Spreadsheet Export → FreeCAD Document: creates spreadsheet