Bonjour,
Voici un autre code
sous forme de Macro pour Excel.
sinon envoye tes dimesions je te
retournerai un fichier avec la liste
des volumes mm par mm .
Sub calcul1()
L = 2600
D = 1198
Rem N = Nbre de graduation (si N=D grad.=1mm)
N = 1198
R = D / 2
E = R * R
PAS = D / N
Rem C = Nbre de lignes par page
C = 50
F = PAS * C
G = 1
Open "Fich1" For Output As #1
For H = 0 To D + PAS / 2 Step PAS
A = Sqr(Abs(H * (D - H)))
B = R - H
P = 3.1415927
If B = 0 Then S = E * P / 2: GoTo saut1
TETA = Atn(A / B)
If B < 0 Then TETA = TETA + P
S = E * TETA - B * A
saut1:
X = P * E * L * 0.01 * 0.000001
V = 0.000001 * S * L
T = 0.000001 * S * L / X
haut = Format(H, "####0")
Vol = Format(V, "####,##0.00")
Tot = Format(T, "###,##0.00")
Print #1, "Haut =", haut, "mm Vol.=", Vol, "Lit. soit", Tot, "%"
If H = F * G Then GoSub saut2
If H >= D Then GoTo saut3
Next H
saut2:
Print #1, " "
G = G + 1: Return
saut3:
Close #1
End Sub
Salut.