Optics Workbench

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Optics Workbench

Post by HoWil »

This reminds me of the post of Zolko https://forum.freecad.org/viewtopic.php ... 3e#p501442
Zolko wrote: Mon May 03, 2021 3:42 pm Ping
I personally hope to have time to play with some STEP parts from Thorlabs, Newport or others...
Thanks for sharing....
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Optics Workbench

Post by HoWil »

christi wrote:
My 2cents
...it would be good to have a single object for sun light which allows to move the complete bundle of rays. This is not possible visa the currently used group although it is possible to select all rays (includes alot scrolling) an change their position in the data view.

Do you plan to include any sort of evaluation plane to conclude how much 'light' is hitting e.g. a detector?
Do you see any possibility to introduce some sort of beam profile (e.g. gaussian)? I do not know if this would also be possible with the distribution of the origin points of the beams. I guess this is necessary if one has to deal will a little bit advanced optics.

Last bit not least I know that Johannes did work for years on 'advanced' stuff for pyrate. Do both of you see any chance to combine your work?
joha2 wrote: ping
User avatar
christi
Posts: 213
Joined: Wed Oct 24, 2018 7:03 am
Location: Karlsruhe, Germany
Contact:

Re: Optics Workbench

Post by christi »

HoWil wrote: Sat Nov 06, 2021 12:40 pm ...it would be good to have a single object for sun light which allows to move the complete bundle of rays. This is not possible visa the currently used group although it is possible to select all rays (includes alot scrolling) an change their position in the data view.
I could combine all rays into a new single object, a compound for example. But then FreeCAD assigns a new color for the object and all the formerly colorful lines will be gray. I have no idea how to solve this.

HoWil wrote: Sat Nov 06, 2021 12:40 pm Last bit not least I know that Johannes did work for years on 'advanced' stuff for pyrate. Do both of you see any chance to combine your work?
The Pyrates are using their own geometrical objects in their python scripts. My workbench uses the objects that FreeCAD provides. Although some of the used algorithms are the same, the implementation is completely different.
The Pyrate guys could think about converting the FreeCAD objects into their geometry, this would make it more usable together with FreeCAD.
The other way would be converting the pyrate algorithms to work with the FreeCAD geometry and integrate them into my workbench. I am not sure if this is possible and how much work this will be. I am only sure that I will not do this.
User avatar
christi
Posts: 213
Joined: Wed Oct 24, 2018 7:03 am
Location: Karlsruhe, Germany
Contact:

Re: Optics Workbench

Post by christi »

HoWil wrote: Sat Nov 06, 2021 12:40 pm Do you plan to include any sort of evaluation plane to conclude how much 'light' is hitting e.g. a detector?
Do you see any possibility to introduce some sort of beam profile (e.g. gaussian)? I do not know if this would also be possible with the distribution of the origin points of the beams. I guess this is necessary if one has to deal will a little bit advanced optics.
Yes. I have just done this. I added counters for each mirror, lens and absorber that count the number of rays that hit it. After a ray or beam has been added, a parameter 'Hits From Ray/Beam...' will appear in each mirror, lens and absorbers parameter list.
fdortu
Posts: 1
Joined: Mon Nov 08, 2021 2:15 pm

Re: Optics Workbench

Post by fdortu »

This Optics Workbench is very useful and very well integrated in FreeCad ! It adds a feature I was looking for a long time.

Thank you a lot !!!

Do you have any plan to add support for diffraction gratings ?
User avatar
christi
Posts: 213
Joined: Wed Oct 24, 2018 7:03 am
Location: Karlsruhe, Germany
Contact:

Re: Optics Workbench

Post by christi »

fdortu wrote: Mon Nov 08, 2021 2:22 pm Do you have any plan to add support for diffraction gratings ?
In the moment I have no plans for additional features, but everybody is invited to extend the workbench.
Cobras62
Posts: 14
Joined: Thu Oct 28, 2021 9:37 am

Re: Optics Workbench

Post by Cobras62 »

Hi,
I don't know if I should post here or on the github (I'm not used to github) but I have a little problem:
If I take the example of refraction (with the prism), the refraction no longer works if we change the index of the prism.
In fact, in the data, we lose the Sellmeier data if we change the prism index.
Do you have any idea how to fix this?
Thank you.
I would like to be able to help develop this workshop but it is beyond my programming skills ^^
User avatar
Boogieman
Posts: 34
Joined: Wed Apr 18, 2018 9:03 am

Re: Optics Workbench

Post by Boogieman »

Cobras62 wrote: Mon Nov 15, 2021 11:50 am Hi,
I don't know if I should post here or on the github (I'm not used to github) but I have a little problem:
If I take the example of refraction (with the prism), the refraction no longer works if we change the index of the prism.
In fact, in the data, we lose the Sellmeier data if we change the prism index.
Do you have any idea how to fix this?
Thank you.
I would like to be able to help develop this workshop but it is beyond my programming skills ^^
I just tested it and it works as expected. If you change the refractive index then the dispersion is lost, but not the refraction. This means the light ray is "bend" but not split up into its colors.
This behavior is intended because a refractive index alone is not enough information for dispersion. Instead we need a wavelength dependent refractive index. This is calculated from the sellmeier coefficients but not the other way around.

If you want refraction and dispersion for a material that is not yet present, then you have to enter the sellmeier coefficients yourself. You can find them for example at refractiveindex.info

And i prefer to post bug reports on github and keep the forum discussion about feature, etc, to keep things a bit more organised.
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Optics Workbench

Post by HoWil »

Would be good to have some standard models (analytical or real) to compare to.
I tried to reconstruct the image of the diffraction on a prisma from wikipedia but did not succeed do to limited time :? https://de.wikipedia.org/wiki/Prisma_(Optik)
Cobras62
Posts: 14
Joined: Thu Oct 28, 2021 9:37 am

Re: Optics Workbench

Post by Cobras62 »

Boogieman wrote: Mon Nov 15, 2021 3:58 pm
Cobras62 wrote: Mon Nov 15, 2021 11:50 am Hi,
I don't know if I should post here or on the github (I'm not used to github) but I have a little problem:
If I take the example of refraction (with the prism), the refraction no longer works if we change the index of the prism.
In fact, in the data, we lose the Sellmeier data if we change the prism index.
Do you have any idea how to fix this?
Thank you.
I would like to be able to help develop this workshop but it is beyond my programming skills ^^
I just tested it and it works as expected. If you change the refractive index then the dispersion is lost, but not the refraction. This means the light ray is "bend" but not split up into its colors.
This behavior is intended because a refractive index alone is not enough information for dispersion. Instead we need a wavelength dependent refractive index. This is calculated from the sellmeier coefficients but not the other way around.

If you want refraction and dispersion for a material that is not yet present, then you have to enter the sellmeier coefficients yourself. You can find them for example at refractiveindex.info

And i prefer to post bug reports on github and keep the forum discussion about feature, etc, to keep things a bit more organised.
Hi Boogieman,
Indeed, I went a little too fast in my tests and I confused refraction and dispersion... :roll:
Sorry for the post and thanks for the reply!
Post Reply