Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

ScriptEditor Grasshopper not working

$
0
0

Hi,

What has happened with Scripteditor for Grasshopper Python?
Any code I copy paste freezes Rhino completely.

This is some basic math:

from math import cos, sin, pi

H0 = 9.145

V0 = 2.37

xV0 = 0.723

yH0 = 0.420

angle0 = 14.036

e0 = 0.03

# weight

W = 0.92

xW = 1.515

# left side:

H1 = H0

V1 = V0-W

xV1 = 2.313

yH1 = 0.739

angle1 = 8.422

# signs

s_0_H0 = 1

s_0_V0 = -1

s_0_x = -1

s_0_y = 1

s_W = 1

s_1_H1 = 1

s_1_V1 = -1

s_1_x = -1

s_1_y = 1

H0 = H0 * s_0_H0

V0 = V0 * s_0_V0

yH0 = yH0 * s_0_y

xV0 = xV0 * s_0_x

xW = xW * s_W

H1 = H1 * s_1_H1

V1 = V1 * s_1_V1

# cosine positive or negative is the same result

a0 = H0 * (yH0 + e0 * cos(angle0 * pi/180) * s_0_y)

a1 = V0 * (xV0 + e0 * sin(angle0 * pi/180) * s_0_x)

a2 = W*xW

A = a0 + a1 + a2

ab = H0*yH1

cd = V1*xV1

ae = H0*cos(angle1*(pi/180)) * s_1_y

cf = V1*sin(angle1*pi/180) * s_1_x

e = (A - ab - cd) / (ae + cf)

print(e) # 0.04323345363865652

5 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles