Ready to create a custom lens in OpticStudio? Find the help you need here!
- 51 Topics
- 122 Replies
I tried to create a dll file by compiling grin.c, but Windows SDK 7.1. was not installed.
hello,I want to compile DLLhttps://support.zemax.com/hc/en-us/articles/1500005577602-How-to-compile-a-User-Defined-DLLbut, I couldn’t download and install window SDK 7.1.https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=8279There is a message that"this feature is disabled because required .net 4 framework is not installed"as the result ".NET Development" cannot be selected. when i proceed without selecting it, "Installation Failed" will be appeared. Have you ever solved a problem like this?
How does DLL find project name or project folder?
I have many projects using the same DLL (non-sequential object). The DLL is general. The DLL retrieves a unique data file for each project.How does the DLL find or look up the name of the project or the file path for the project (each project is in its own path)?Yes, I can keep this straight manually, renaming, and moving stuff around when changing projects. But why? This is what we have computers for!thanks,
How to use RCWA DLL to simulate rectangular amplitude grating
How do I simulate a rectangular amplitude grating using the RCWA DLL. I used srg_trapezoid_RCWA.dll for the simulation. I set Index Grate to 1, Index Env to 0.7-7.0i to simulate transmissive and opaque slits, and both substrate and outside refractive index are set to 1. However, I found that the diffraction efficiency calculated by it is quite different from that calculated by using scalar theory in the paraxial region. Also, when I change Index Env (e.g., 0.7-20i) and Depth, the diffraction efficiency changes more significantly. How can I simulate a rectangular amplitude grating that is consistent with scalar theory?
OPEV / OPEW
Hi,I would like to know how to use the OCOD and OPEV operands with multi configuration files: In case the same operand is present more than once (for example for different configurations) how to read the right one?Also, I want to know if it is possible to use OCOD with mathematical operands, like MINN, or MAXX, and same question, what if there is more than one in the Merit Function?Otherwise, is there a simpler way to read one value from any line in the MF?Thanks, Cristina.
User Defined Surfare shows only 12 Parameters in LDE
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?
Variable coating in non-sequential mode
I have a rectangular object that I want to have a variable coating on one of its faces. The coating should be a dichroic coating on part of the face (say 2/3 of one rectangle) and no coating at all on the remaining 1/3.I would also need to update this coating (e.g., change the coated area and coating parameters) and object through ZOS-API, so a dynamic solution would be appreciated.Thanks!
how to make a dichroic filter DLL to apply in a volume surface, not just a 2D surface?
hi,it’s easy to make a DLL working as dichroic filter in the surface scatter way, by just changing the specular ray direction according to its wavelength in the DLL. however, it seems it only works in a 2D surface, and when it goes to a volume surface with different refraction index from the air, especially when the ray needs to reflect at the surface inside the volume, it can no longer work normally. examples illustrated as follows:I analyzed the cause through ray tracing and ray database viewer, and found that if the ray made reflective mandatorily inside a volume via the DLL by one of its surfaces, zemax has no way to know the reflected ray by the surface is still inside the volume, as it seems zemax does not provide such an interface in the function “UserScatterDefinition” .I hope to consult zemax development engineers and also guys with related experience, how to solve this? thx in advance!and I also wondering why zemax does not provide the incident ray direction cosines and why
How to make a source in non-sequential that looks like a letter?
I’m interested in modeling an OLED display that’s displaying the letter P. The brute way to do this would be a series of lambertian point sources that form that shape. Is there a better way? Maybe with a dll or a CAD object? Thanks!Donna
DLL Non-Sequential User Defined Object data structure
For the User defined object DLL, Zemax passes a variable “data” to the function UserObjectDefinition. However, I have not been able to find any documentation on what each element of this array is. The examples provide some of the parameters (for example the CoatingSample.dll file gives the first 15 parameters and a few others up to parameter 34, see the code below from the example). Where can I find documentation to understand what other parameters I have access to from this data structure? The data ZEMAX sends is formatted as follows: data, data, data = x, y, z data, data, data = l, m, n data = coat group number data, data, data = normal nx, ny, nz data, data = current and next index of refraction data = cosine of normal incidence angle data = wavelength in µm data = zero flag. Set this to 1.0 to indicate the DLL computes the coating data, otherwise, ZEMAX will compute u
Source Two Angle DLL
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!
Some RCWA DLLs cannot be found in OpticStudio 21.2.1
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
gaussian beam in non sequential mode
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?
OpticStudio can not load DLLs
I tried to use the original Gaussian.cpp in Visual Studio 2019 to create a dll project. I created a default dll project and copied the Gaussian.cpp and tried to build the file. The header file is left empty. The build was successful but when I tried to load into Zemax, it gives error saying cannot load DLL as in the attachment.
Comparison of custom dll surface and CAD lens
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
Scattering in Zemax
Hi I have a question about the Henyey Greenstein model in Zemax. I am now using the Henyey-Greenstein (HG) model in combination with the wavelength shift to simulate the Raman scattering. Because the mean free path is wavelength-dependent in the same tissue, my question is that, in the multiple scattering, if the input photon is altered in wavelength, will its mean free path be changed too in the next scattering event? From the HG source code, it seems like the mean free path is a constant to all wavelengths. Furthermore, I also found from your HG source code that you didn't really consider the light absorption while in scattering events, right? Thanks in advance!
Diffraction Orders in NS components
Hello, I have sequential rays that enter a non-sequential component. In this element there are two sets of dffraction gratings helps rays to couple into the the medium and extract from the medium for analysis. However, the rays I sent only diffract along the set primary diffraction order. Can Optistudio simultaneously trace multiple diffraction orders NS components? Thanks,
Looking for someone who has Experience with developing new surface DLL
Hello, I need to create a new surface lens array DLL. Lens parameter changes through array according to some formula (In Zemax DLL all lenses are identical). Looking for someone who has experience with developing new surface DLL and interested to develop it. Please apply to my personal mail directly.
Malwarebytes flagged RIHWSTY31.DLL as malware.
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
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
substitute for surface apodization in basic version
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.
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.