Ready to create a custom lens in OpticStudio? Find the help you need here!
- 56 Topics
- 144 Replies
I was pleased to see the new NSC Source DLL 'SkewRaysCircular.dll' added in the May 19 release (OpticStudio 20.2). We have immediate use for it in modeling our systems. It was inspired by the similar (sequential) User Defined Surface DLLs discussed in Paul Colbourne's webinar and KnowledgeBase Article KA-01772, which allows optimization of generally astigmatic Gaussian beams in Sequential mode. But I was disappointed to see that the new Non-Sequential Source DLL only models CIRCULAR Gaussian beams with no astigmatism, unlike the Sequential capabilities that were supplied by Dr. Colbourne, which accommodate general astigmatism! I suggest updating and replacing SkewRaysCircular.dll with a new, more general, Source DLL, renamed appropriately, e.g., SkewRaysGaussianXY.dll , that DOES support general astigmatism. This would seem simple enough to implement starting from the existing SkewRaysCircular.dll: add new pairs of parameters for WaistX, WaistY, (and/or SIzeX, Siz
This forum post is a place to collect update history of diffractive tools beta functions, which includes all RCWA DLLs (and visualization API), polygon DLL, and Zemax Grating Data (ZGD) DLL. Content:1. Overview2. Resources3. Change history OverviewCurrently in OpticStudio, we are adding some useful DLLs to enhance the ability of fully simualting gratings. They allow OpticStudio to consider the efficiency when rays pass through diffractive optical elements (DOE), such like 1D/2D gratings, binary optics, or volume holograms. These extensions can be found in OpticStudio installations.These tools improve frequently based on users’ feedback. We decide to provide functions with DLL so it can be updaetd fast upon users' request. Between each OpticStudio public releases, there might be several minor updates and bug fixes. This forum post is a place for changes history.Note all tools provided here are only available with OpticStudio Premium Subscription. If users are interested in these functio
In OpticStudio, currently we only support one dimensional grating. However, it's not difficult to simulate 2D grating. Here we will show an example using diffractive DLL.You may compile it with the instructions or use the DLL file attached to this article. Before we start, here are some articles for required background knowledge that we will not repeat in this forum post. How diffractive surfaces are modeled in OpticStudio (KBA) How diffraction ray-tracing is calculated (forum post) Custom DLLs in OpticStudio: An overview of user-defined surfaces, objects, and other DLL types (KBA) How to compile a User-Defined DLL (KBA) Let's simply open the attached cpp file and observe how it works.This example is mainly modified from the built-in sample \Documents\Zemax\DLL\Diffractive\diff_samp_1.c To compile the program as C++ code. We package the functions with extern 'C'. In this example, we only want to return diffraction ray direction and its relative intensity. So setting data = 1
Hi there, I am trying to write a source DLL file to use in OpticStudio, which is based on the built-in source “Source Two Angle”. It would be great if I could use this as a starting point. Is the (cpp) code available for this source? Or is there something similar I could start with? Thank you!
Hello I have a license for basic version of OpticStudio. I need to apply an apodization filter to a surface in order to program the transmission to be a Gaussian function. But it seems that the 'filter' type of surface is only available in the premium version. Is there any substitute for this function that I can use? Thank you.
I need to simulate a gaussian beam in non sequential mode, which has 850 nm wavelength, 15 degree diveregence angle (half angle) and the beam raduis of 2.563 mm at 10 mm which has the cross section of the beam profile shape as attached below, but when putting this values using the Gaussian source it doesnt give me the same results. By using the skewRaysCircular I cannot get the gaussain beam profile and it just shows me a ring, how can I get a gaussian beam profile in the output?
Hi all, I’ve seen a few discussions about ellipsoids in non-sequential mode. Notably, @David has shown how the Standard Lens object could be used to build ellipsoids with at least one axis of rotational symmetry in his remarkable answer to the post: Modelling an ellipsoidal volume in non-sequential mode. The Help File also has a section called “Modeling an ellipsoid with the Biconic surface” (The Setup Tab > Editors Group (Setup Tab) > Lens Data Editor > Sequential Surfaces (lens data editor) > Biconic), and the Biconic Surface is also available as a non-sequential object. However, I did not manage to recreate the ellipsoid as depicted in the Help File, which is certainly my fault. In light of the above, I thought it would be a good idea to program a DLL for an ellipsoid object. At the very least, it should have some educational value. You can find the current result of this work in this repository: https://github.com/Omnistic/ellipsoid_object.Here is an example (I’m using
Why did Malwarebytes flag and quarantine RIHWSTY31.DLL as malware? See attached screensnap. Is it a valid DLL or did malware somehow get attached to OpticStudio? Need to know whether to keep in quarantine or release it. Thanks, Mike
I wanted to try out the new diffraction grating DLLs.  Following the example in the knowledge base article, when I get to the point of selecting one of the DLLs I get an error message "Unable to load 'UserParamNames' function from DLL".  The only DLL that seems to work is diff_samp_1.DLL
We have some asymmetric scatterers in the lab that I would like to model in zemax. They have different gaussian scattering properties in horizontal and vertical direction. So i tried to use the Gaussian XY DLL to model it, but it behaves weired. A ray hitting the surface perpendicular is scattered as intended, but rays under even small angles are changing it completely. The scatter pattern for a ray with 1° in x-direction is twisted 90° to a ray under 1° in y-direction. Is there a mistake or do I something wrong? I have attached an example file. Best Steffen
Zemax has the wonderful ability to add user-defined surfaces and objects, but they have to be compiled by the user into a dll. With the Community version of Visual Studio 2019, does anybody know (a) which components of Visual Studio need to be installed, (b) what settings are needed in order to “Attach to Process…” in order to debug, and (c) what settings are needed to compile routines correctly. The background here is that the user has to look through a set of examples to work out how to do anything, and these are mostly in C, probably from 20 years ago. There are 2 very useful articles about how to compile a dll, and debug a dll, but they are for C++, with no explanation about when and why C++ is needed. Some VS2017 compiler settings are given, but a lot of others are not mentioned, and there is no information about how to install Visual Studio. The ability to debug a file is phenomenal, but they do not attach with VS2017 and VS2019, and there is a message that &ld
I am new to DLL programming for Zemax. I have an older file using the Fixed-Data 3 standard. This should support 201 parameters. Unfortuneatly in the LDE editor a maximum of 12 Parameter columns are generated even if i define more. Is there a cap of how many parameters can be displayes as input in the LDE?
A user-defined surface DLL will retrieve information from OpticStudio via the FIXED_DATA5 structure defined in the header file. An example of the header file can be found under '\Zemax\DLL\Surfaces\usersurf.h'. To access the surface parameters, the DLL reads the variable param in the FIXED_DATA5 structure: If we need to pass more parameters to the DLL, one way can be to use the datasurf_numvalues and datasurf_values. To use this, a 'Data' surface has to be used. Below I have taken a screenshot when debugging a user-defined surface: I hope this helps but do not hesitate to share your comments. Sandrine
Hi, I was reading Michael Cheng's article 'OpticStudio grating tools beta function update history' and have some questions. This article mentioned 'download link' many times, but I did not see these corresponding links. And I did not see some DLLs mentioned in this article in OpticStudio 21.2.1, for example: 'Polygon grating DLL', 'A new DLL is created for reading pre-calculated efficiency data for 1D/2D gratings'. I want to know where I can find these DLLs and their usage. Thanks & Regards, Dongdong
Hi, I have a Global Academic Program License for OpticStudio, and from my License Manager I see this license is of type 'Premium' which should give me the possibility to use dll scattering model. I have downloaded one of Luminit's scattering dll and placed it in the correct folder, but nevertheless the model does not appear in the user defined scatter model list! Is this a limitation of the academic license? Thanks, Chiara
Hi, The tutorial on 'Simulating diffraction efficiency of surface-relief grating using the RCWA method' assumes a unit cell comprising of one period with linear grating of fixed duty cycle. I am wondering if anyone knows if we can simulate 1. curved diffraction grating and/or 2. diffraction grating with a chirp (i.e assume a super cell comprising of multiple unit cells with varying period and fill factor)? Thanks, Arvinder
Hi all! I have done user defined dll surface and want to check its accuracy. For this, I did a lens with such surface on one side and plane on the other in SolidWorks and opened it like .STEP file as a non-sequential component. In the second Zemax file, I opened my user-defined dll. All dimensions, apertures the same. Also, I can see that rays go through the lens in almost the same way. Spot diagrams look very similar. But I want to compare the wavefront map and here I have a huge difference also ray fan very different and I cant understand the reason. It's my first time with non-sequential mode, maybe someone can help me with good advice? Thank you a lot
Hi,I’m looking for “us_gskew.dll” shown to be used in “Using skew rays to model Gaussian beam propagation in OpticStudio” webinar.I download the attached zip files which contained *.c file. I wonder where can I find the complied file. is there a reasone why I couldn’t used an allready complied filed? (and instead have to complie it myself)Thank you,Amir
According to Zemax’s online help https://support.zemax.com/hc/en-us/articles/1500005578722-Simulating-diffraction-efficiency-of-surface-relief-grating-using-the-RCWA-method, for the particular diffraction grating that we are trying to model, we need to increase the Max Order parameter.In the help on “simulating diffraction efficiency of a surface relief grating using the RCWA method” authored by Michael Cheng and updated on April 28, 2023 under the subsection Max Order it is stated“This is currently limited to 10 (totally 21 harmonics). When the number is larger than 10, it’s modified to 10 in the DLL. Contact support team to increase the limitation.”What is the procedure to increase the limitation?
Hi everyone, I'm trying to insert a surface using a DLL file, but it looks like my OpticStudio is not recognize the file. My actions were putting the file in C:\ProgramData\Zemax\DLL\Surfaces (where all the other user define functions located) and then search for this file in the lens data editor. (I followed the instruction from https://my.zemax.com/en-US/Knowledge-Base/kb-article/?ka=KA-01787. Without making any changes) Looking over the list, I don't see my file. What could be the reason for that? What is the right way to use user-defined function/ DLL functions? Thanks a lot! Marta
Dear person in charge, Hello, This is Munseok Choe. I am visiting researcher in ITER Organization. I am using ZEMAX to simulate Quasi-optical Gaussian beam propagation in mirror system. My license information is attached in below. To make Gaussian beam as a source in non-sequence mode. I used Gaussiansource.dll in Source.DLL option. However, It can only generate the ray with random sampling. It disturb measuring exact value of power density on detector. Could you explain why sobal sampling is not available? Thank you. Best Regards, Munseok
Hello everyone, I am trying to design Digital Micromirror Device(DMD) in SEQ using 'us_mems.dll'. We know that the DMD behaves as a blazed grating, and also it has diffraction pattern, what I have seen during experiments also. I am wondering how can I simulate the diffraction orders of DMD in ZEMAX. Thanks in advance. Ast
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.