Yvo

01-28-2005, 11:40 AM

Hi everybody,

I'm a beginner considering Maxscript (and new on this forum), so the following problem shoul be too easy:

I'm making a special shape existing of ellipses:

When i run this one in MaxScript Listener it gives the following error for the highlighted line:

"If-test requires Boolean Class, got: 0"

How can i resolve this problem?

------------------------------------------------

A = 6750.0

B = 9000.0

F = 3750.0 - 375.0

G = 6000.0 - 375.0

tga = 37.5 / 75.

C = (A - F) * tga + 375

S = 100

------------------------------------------------

dak = Sphere()

dak.radius = C

dak.segs= S

converttomesh(dak)

For n=1 to (getnumverts(dak)) do

If (getvert dak n).x = 0 then H = A else H = 1/sqrt(1/A^2+ (getvert dak n).y^2/((getvert dak n).x*B)^2)

If H >= A*sqrt(1-G^2/B^2) then J=tga*(H-F) else (If H <= F then J=tga*(B*sqrt(1-H^2/A^2)-G) else J = tga*sqrt((H-F)^2+(B*sqrt(1-H^2/A^2)-G)^2))

k = H/sqrt(1-J^2/C^2)

l = k*(getvert dak n).y/(getvert dak n).x

u = 1/sqrt(1/k^2 + (getvert dak n).z^2/((getvert dak n).x*C)^2)

v = l*u/k

w = C*sqrt(1-u^2/k^2)

setvert dak n [u,v,w]

I'm a beginner considering Maxscript (and new on this forum), so the following problem shoul be too easy:

I'm making a special shape existing of ellipses:

When i run this one in MaxScript Listener it gives the following error for the highlighted line:

"If-test requires Boolean Class, got: 0"

How can i resolve this problem?

------------------------------------------------

A = 6750.0

B = 9000.0

F = 3750.0 - 375.0

G = 6000.0 - 375.0

tga = 37.5 / 75.

C = (A - F) * tga + 375

S = 100

------------------------------------------------

dak = Sphere()

dak.radius = C

dak.segs= S

converttomesh(dak)

For n=1 to (getnumverts(dak)) do

If (getvert dak n).x = 0 then H = A else H = 1/sqrt(1/A^2+ (getvert dak n).y^2/((getvert dak n).x*B)^2)

If H >= A*sqrt(1-G^2/B^2) then J=tga*(H-F) else (If H <= F then J=tga*(B*sqrt(1-H^2/A^2)-G) else J = tga*sqrt((H-F)^2+(B*sqrt(1-H^2/A^2)-G)^2))

k = H/sqrt(1-J^2/C^2)

l = k*(getvert dak n).y/(getvert dak n).x

u = 1/sqrt(1/k^2 + (getvert dak n).z^2/((getvert dak n).x*C)^2)

v = l*u/k

w = C*sqrt(1-u^2/k^2)

setvert dak n [u,v,w]