Hi @PJT, are you planning to use Optics in PUMA? That would be sweet!
Optics Workbench
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Optics Workbench
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Optics Workbench
I wanted to simulate some aberrations to see if I can design correction plates for the PUMA beam splitters. So far I am just getting used to using it. It is the only free simulator I have seen that allows me to see colour dispersion. So - good for chromatic aberration in single rays. However I am not sure if it can help with more complex aberrations such as spherical aberrations in 2D images (3D beams) so I am just exploring what it can do for now. Not sure if I will be able to design any affordable correctors for PUMA - with any software - but this optics workbench is a very nice simulator anyway for anyone playing with optics. Up till now I have used the Google Chrome plugin 'Ray Optics' app but that doesn't do colour.
Re: Optics Workbench
I figured out how to move a SunRay - select all 100 rays then do a 'Placement' op - seems to work.
Re: Optics Workbench
Hi Christi,
Thank you for sharing the insights into your Optics Workbench, too, and pointing me to the code!
Best wishes
Johannes
Thank you for sharing the insights into your Optics Workbench, too, and pointing me to the code!
This seems to be a bit of another approach than we use in pyrate, since we have a strictly sequential raytracing where the user gives a list of surfaces which should be hit by the rays in the given order. In your case it seems to be more a non-sequential raytracing (i.e. trace all rays which hit some object somewhere). Do you also follow the refracted/reflected rays recursively until a distinct recursion depth?christi wrote: ↑Thu Jan 06, 2022 2:55 pm - Create a line (ray) with infinite length
- Find all intersection points with any FreeCAD geometry
- Find the nearest intersection point that is part of an OpticalObject (=lens, mirror or absorber)
- Create a mirrored or refracted ray with the help of the normal vector on the intersection point
Thanks for the hints, I knew that such functions exists, but forgot their names I think I would use FreeCAD the other way around: Instead of mapping the FreeCAD surfaces (i.e. faces) to existing pyrate surface classes, we would implement a new surface type (FreeCAD surface) which encapsulates the face and implements the necessary methods (intersect, refract/reflect, getSag, ...) and group them into a class derived from the OpticalElement class, such that a FreeCAD shape provides a 1:1 correspondence to an OpticalElement in pyrate. At the end the implementation of such objects wouldn't be too difficult, but the mixing between pyrate surfaces and FreeCAD derived surfaces is maybe difficult.christi wrote: ↑Thu Jan 06, 2022 2:55 pm You can get all surfaces of a FreeCAD object if you loop through Shape.Faces. Each face has a surface component, but there are many different types of surface. See section GeometrySurface(Geometry) in Part.html in the automatic Python modules documentation. The conversion should be simple if the FreeCAD type equals a surface type in pyrate.
Best wishes
Johannes
Re: Optics Workbench
Hi,
Great workbench! Thanks for sharing it.
I've been trying the workbench while using cemented achromats, i.e. two lenses of different refractive index that are in physical contact. The .step file I get from a commercial supplier (e.g. https://www.thorlabs.com/thorproduct.cf ... C508-150-A).
I noticed that at the interface between the two glasses, the refraction is not correctly calculated. It seems to me that the index of the second material is taken as 1 when calculating the refraction angle.
As a test, I moved the two lenses apart such that an air gap exists between then. In that case the refraction is calculated correctly.
Is this a known issue? Is an air gap required between two optical elements?
Great workbench! Thanks for sharing it.
I've been trying the workbench while using cemented achromats, i.e. two lenses of different refractive index that are in physical contact. The .step file I get from a commercial supplier (e.g. https://www.thorlabs.com/thorproduct.cf ... C508-150-A).
I noticed that at the interface between the two glasses, the refraction is not correctly calculated. It seems to me that the index of the second material is taken as 1 when calculating the refraction angle.
As a test, I moved the two lenses apart such that an air gap exists between then. In that case the refraction is calculated correctly.
Is this a known issue? Is an air gap required between two optical elements?
Re: Optics Workbench
Hi,
yes there has to be at least a tiny gap, so that the light ray leaves the first lens before it enters the other one.
yes there has to be at least a tiny gap, so that the light ray leaves the first lens before it enters the other one.
Re: Optics Workbench
I added support for adjacent lenses and lenses inside lenses.tbr wrote: ↑Tue Jan 18, 2022 7:30 am Hi,
I noticed that at the interface between the two glasses, the refraction is not correctly calculated. It seems to me that the index of the second material is taken as 1 when calculating the refraction angle.
As a test, I moved the two lenses apart such that an air gap exists between then. In that case the refraction is calculated correctly.
Is this a known issue? Is an air gap required between two optical elements?
You do not need an air gap between two lenses any more
Re: Optics Workbench
I've started to use the optical workbench for creating a lightguide to transport light from a led (placed on a pcb) to another location of my device.thschrader wrote: ↑Sun Jul 18, 2021 3:47 pm Played a little bit with optics:
Draft-wb snapping works for every ray. You can construct faces, lets say for
energy-loss calculation.
With curves-wb you can extract single rays for further calculations.
Fascinating stuff, congratulations!
optics_play.JPG
It would be awsome to be able to get a measurement for the light intensity on an (absorber)object, even cooler would be a intensity distribution across an (absorber) object.
How did you manage to get a measurement Thschrader?
-
- Veteran
- Posts: 3157
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: Optics Workbench
You can draw a face wich contains all beams at point 1+2.
The areas can be measured with the "survey"-tool from arch-wb (the blue helmet).
The left/lower tip is always located at the center of gravity (COG).
Lets say you have a light intensity of 100 lumen/0,16 mm^2 = 625 Lux at point 1,
the light intensity at 2 should be 625/37,85=16,5 Lux.
You compare the areas, that was the idea.
I am not an optics-geek, at the moment, optics-wb is not installed.
Hope that helps.