# Optical Forums > Ophthalmic Optics >  Accurate Calculation of thickness

## eyeboy

Can anybody help me. I trying to do an accurate thickness calculator on excel, as my current surfacing calculator doesn't handle finished plus lens thickness very well for rimless and supra. 
Since I surface I know the base curve, the minimum size uncut and the finished edge thickness. So to ensure that the back vertex power is correct I need to know the thickness of the lens first. But to calculate the thickness I need edge thickness, sag1 and sag 2. So how do these surfacing programs work do they have an average thickness for a given base in a given lens power and index? Or do they have an average back surface power for a given base, lens power and index?
I thought one way to do it acurately was to calculate the approximate thickness using the approximate sag formula then sag 2. Then simply work it back through to find the accurate thickness using accurate sag formula?

Is there an easier way?

Confused..... :Confused:

----------


## OPTIDONN

funny you should mention this I was playing aroung with this at work today its from the ABDO's WORKED PROBLEMS IN OPHTHALMIC LENSES. 


Determine the diameter by :


              Blank Size = ED + ( A + DBL - PD)

Then half the diameter to the second power and multiply by lens power. Next subtract 1 from the lens index and multiply by 2000 divide the first answer by the second and add the desired edge thickness to answer and there you go. It matched our computer program but only for spheres I'm not sure yet how to do lenses with cyl.

PS- to all you optic geeks if I butchered this please be kind!:o

----------


## Darryl Meister

> I thought one way to do it acurately was to calculate the approximate thickness using the approximate sag formula then sag 2. Then simply work it back through to find the accurate thickness using accurate sag formula?


Unfortunately you can't solve for the exact thickness without knowing the back curve, and you can't determine the back curve without knowing the exact thickness. However, you are on the right track. If you are interested in accuracy, your best bet would be to solve the equation iteratively using a custom function in Excel (this requires a little knowledge about Macros or Visual Basic for Applications).

Begin by calculating an initial center thickness value using the approximate sag formula and the minimum edge thickness. Then pass this into a loop that calculates the back curve from the power and this initial thickness. Compute the new center thickness from the sag of the front, sag of the back, and minimum edge thickness.

If the difference between this new thickness and the initial thickness is greater than a certain threshold (say 0.05 mm), add half of this thickness difference to the initial thickness and use it as the next initial thickness. Repeat the loop. After a few iterations, you should arrive at the correct center thickness value. You can then use this value to compute the correct back surface.

----------


## Alvaro Cordova

> funny you should mention this I was playing aroung with this at work today its from the ABDO's WORKED PROBLEMS IN OPHTHALMIC LENSES. 
> 
> 
> Determine the diameter by :
> 
> 
>               Blank Size = ED + ( A + DBL - PD)
> 
> Then half the diameter to the second power and multiply by lens power. Next subtract 1 from the lens index and multiply by 2000 divide the first answer by the second and add the desired edge thickness to answer and there you go. It matched our computer program but only for spheres I'm not sure yet how to do lenses with cyl.
> ...


I wish I had more time to explain it better, but yes you are on the right track more or less.  From the look of it, you are using the approximate forumla.  

Sag of a Lens = ((radius)^2 * Diopters) / (2000 * (n -1))	
C.T. = Sag + E.T.	 	
E.T. = Sag + C.T.

You would only really care about the 90th and 180th meridian for the most part (unless you are talking about an aviator like frame in which the ED is significantly greater)

first decide on a material say poly because you can have the CT equal to 1.0mm (nice round whole numbers)

Lets say you have a patient like this:
-4.00 -1.50 x 56
-5.00 Sph
Frame PD = 70  (A=50; DBL=20; ED/LD=51) in a squarish looking frame 
Patients PD = 66

(FPD - PPD) / 2 = 2mm per eye of decentration IN.
A/2 = 25
25 + 2 = 27mm from the OC to the edge of the frame. This is your radius from the OC

Now to determine the power you just have to use this forumla:
Total Power = Sphere Power + Cylinder Power * (sin(θ (distance from meridian)))^2
-2.96904... = -4.00 + -1.50(Sin(180 - 56)^2)

Now we have all of our info to plug and chug our original formula:
Sag of a Lens = ((radius)^2 * Diopters) / (2000 * (n -1))	
E.T. = Sag + C.T.

1.846 mm = (27^2 * 2.969) / (2000 * 0.586) approximate 
2.846 mm = 1.846 mm + 1.0 mm

2.846 mm would be the thickest they would be.  Again, note that this is an approximation.  You would have to use the Sagitta formula

Sagitta = R - √(R^2 - (D / 2)^2)	
C.T. = S1 + E.T. - S2  (for plus lenses)	
E.T. = S2 + C.T. - S1 (for minus lenses)
E.T. = edge thickness (in mm)
C.T. = center thickness (in mm)		
S1 = front sagittal curve	
S2 = back sagittal curve

You would have to decide what curves you are going to use. 
Have fun with that one 

I think this is more or less correct, and I'm sure Darryl will check in too

----------


## Alvaro Cordova

I think I may have answered a different question.   :shiner:

----------


## Darryl Meister

> I think I may have answered a different question


Still valuable information, nevertheless.

----------


## Alvaro Cordova

Well, my boards are Tuesday, so this was defintely good practice to be able to get my thoughts correctly down on paper/screen ???

----------


## OPTIDONN

Hey thanks guys!! Darryl is there a way you could show what you mean? I might get it a little better if I see what you are talking about.

----------


## Alvaro Cordova

> Hey thanks guys!! Darryl is there a way you could show what you mean? I might get it a little better if I see what you are talking about.


 x(n+1) = f(x(n)) read as X sub (n+1) = f x sub n   (sub being a subscript)


what this means is that some function f(x) yields the next x and that in turn gets reinserted to f(x).  What's supposed to happen is that the fx should seem like it is converging to some number.  One of the most famous examples of iteration is Newton's method.  Usually you just start with a value and it should converge to the answer.  As to exactly how sag software works, I can't say.  I would imagine it would start with a large thickness and work its way down until some curve combination in tscherings ellipse is met.  But I'm just speculating.  That's how I would do it.

----------


## Darryl Meister

> Start with an initial thickness value:

Center = Calculate thickness from sag approximation + edge thickness

> Set New Center to some arbitrary value:

New Center = Center + 1

> Begin loop to minimize difference between Center and New Center:

Loop While (AbsoluteValue(New Center - Center) > 0.05)
{
Back = Calculate back curve from back vertex power formula using Center
New Center = Calculate thickness from exact sag formulas for front and back with edge thickness
Center = Center + (New Center - Center) / 2
}

> Once done, calculate the actual back curve using Center again

----------


## Darryl Meister

I should add that this routine is for _plus_ lenses.

----------


## HarryChiling

hey Darryl you think like a programer.  Thanks Donn for the book I have been extremely busy with my new job but I have been trying to read it a little here and there.  I also ordered the surfacing boo you recommended great book.  I will make a javascript example of the problem that is up and post it later.

----------


## Darryl Meister

> hey Darryl you think like a programer.


Yeah. This way you guys could easily adapt it to whatever language you're using. (Though I could show you what it should look like in Visual Basic, C++, JavaScript, or PHP, this will give you a general idea of what it should look like in _any_ language.)

----------


## OPTIDONN

Thanks every one!!:cheers:

----------


## QDO1

> hi, 
> this is my first post but i was wondering which lens would have less edge thickness...the frame is 52-20 and the Rx is -7.00 both eyes.
> the choice between lenses is either Poly Resolution or a no-brand 1.67.
> 
> i know the 1.67 lenses are not aspheric/atoric and i know the poly resolution is aspheric/atoric so i wasnt sure which would have a thinner edge...i would assume 1.67 since the index is much higher but i didnt know what center thickness the resolution used and wasnt sure if the flatness of the lens mattered as much.
> 
> thanx again!


 
Off the top of my head I would say the 1.67 was thinner. It actually depends on the exact shape, and required OC/PD and heights tooThere will also be the degree of asphericity employed between the designs

----------


## Darryl Meister

For a -7.00, you'll almost certainly get more thickness reduction with the 1.67 lens than with an aspheric polycarbonate lens, regardless of whether the 1.67 is aspheric or not.

----------


## HarryChiling

I have just added the Calculator for the Thickness formula in The New Equations Package

Unzip it and it will be the html page actualthick.html

also the script file will give you a good idea of how the iterations are done in javascript.  If you want to change the accuracy of the equations you can set the while loop to anything you would like

while (ctdif>0.05) {
...
}

creates a thickness accuracy down to 0.05mm you can of course change it to whatever you like.  Also the Math.round lines at the end can be taken out to get more acurate than 2 decimal places.  Enjoy.

P.S. - Steve Please move to the downloads section

----------


## Darryl Meister

> I have just added the Calculator for the Thickness formula in The New Equations Package


Weren't you the guy who was just asking me last night how I have time to work _and_ program? ;)

----------


## HarryChiling

I had the day off today very rare occurence.:hammer:

----------


## Darryl Meister

Yeah, I have a couple of those each week, myself. ;)

----------


## Emily Chen

Sagitta = R - √(R^2 - (D / 2)^2)    
C.T. = S1 + E.T. - S2  (for plus lenses)    
E.T. = S2 + C.T. - S1 (for minus lenses)
E.T. = edge thickness (in mm)
C.T. = center thickness (in mm)        
S1 = front sagittal curve    
S2 = back sagittal curve

I can followed others, but I would like to know the R meanings of 
 Sagitta = R - √(R^2 - (D / 2)^2)    

And  front sagittal curve =R1 - √(R1^2 - (D / 2)^2) ? could some one help me? thanks a lot

----------


## lensgrinder

> Sagitta = R - √(R^2 - (D / 2)^2)    
> C.T. = S1 + E.T. - S2  (for plus lenses)    
> E.T. = S2 + C.T. - S1 (for minus lenses)
> E.T. = edge thickness (in mm)
> C.T. = center thickness (in mm)        
> S1 = front sagittal curve    
> S2 = back sagittal curve
> 
> I can followed others, but I would like to know the R meanings of 
> ...


Radius

----------


## Emily Chen

Thank you, I still try to calculate the cutted lens edge thickness for plus and minus lens. It's hard to do it,thanks

----------

