Solved

UDA file


Userlevel 1

Hi all,

 

I am trying to use UDA file to change the structure of a lens, but it’s not working.

 

thanks,

Nadav

 

 

icon

Best answer by David.Nguyen 9 June 2022, 16:52

View original

6 replies

Userlevel 7
Badge +2

Hi Nadav,

 

When you say it’s not working, what is the problem? I downloaded your file and it looks alright to me. Are you referring to the odd thing happening in the corners of your lens?

On your aperture properties, you’ve set a UDA Scale of 12.7 and your UDA describes a 2 by 2 rectangle (-1 to 1 in both X and Y). Therefore, the effective aperture is 25.4 by 25.4. However, your lens is only about 25.4 in diameter. OpticStudio needs to extend the surface of your lens to fit the rectangular aperture and by doing so, the lens thickness also reduces to the point where it becomes zero, and even turns negative, which is a problem and the reason for the odd corners I believe.

If you reduce the UDA Scale to 8, for example, you get the expected result because the aperture fits over the lens:

I’m not sure this was your problem, but let me know otherwise. Also, for a rectangular aperture, you don’t need a UDA. There’s already an aperture type: Rectangular Aperture that you can use.

Hope this helps.

Take care,

 

David

Userlevel 1

Hi David,

 

Thanks for the quick answer.

But when scaling to 8, the lens is too small and some rays don’t enter the system:

 

 

Userlevel 7
Badge +2

Hi Nadav,

 

I said 8 just as an example. The root cause of your problem is that the semi-diameter of your lens is too small. You need to increase it, but then you’ll have the problem of negative edge thickness. You might need to re-optimize this lens at a larger scale with Edge Thickness constraints.

I hope that makes sense.

Take care,


David

Userlevel 1

Hi David,

 

I think i understand.

Another problem with some connection:

I used an UDA file to create lens with curved AND straight lines:

When I try to create IGES file when there is a folding mirror, the lens after the mirror don’t appear correct.

 

Thanks again,

Nadav

Userlevel 7
Badge +2

Hi Nadav,

 

I think it has to do with your folding mirror, which is rather strangely defined, because when I just export your last lens (Surface 11-12), it works fine:

As you can see in the screenshot below, your mirror surface (highlighted in orange) is colliding with multiple other elements of your system, which is why OpticStudio has a hard time exporting it to a CAD:

I managed to convert your file to non-sequential by changing the thickness of surface 6, 8, and 10 to 5, and then in the non-sequential result, I had to change object 12 maximum aperture to 5. It gave the following result:

So, perhaps you should double-check how you are defining your folding mirror. Also, why is there a glass thickness before the mirror? Is it supposed to be glass also straight after the mirror? You might need to give us more details on what you are trying to achieve.

Take care,

 

David

Userlevel 1

Hi David,

Thanks for the answer.

The glass + mirror is a cubic fold prism

Reply