import rhinoscriptsyntax as rs
def box3pt(p1, p2 ,p4, z2):
pt0 = p1 pt1 = rs.coerce3dpoint([p2[0], p1[1], p1[2]]) pt2 = rs.coerce3dpoint([p2[0], p2[1], p1[2]]) pt3 = rs.coerce3dpoint([p1[0], p2[1], p1[2]]) pt4 = rs.coerce3dpoint([p1[0], p1[1], p4[2]]) pt5 = rs.coerce3dpoint([p2[0], p1[1], p4[2]]) pt6 = rs.coerce3dpoint([p2[0], p2[1], p4[2]]) pt7 = rs.coerce3dpoint([p1[0], p2[1], p4[2]]) rs.AddBox([pt0, pt1, pt2, pt3, pt4, pt5, pt6, pt7])
def zkayit():
zk = open("zk.txt","w") zk.write(p4) zk.close() ana = open ('zk.txt','r') z2 = ana.readline() z2 = z2.rstrip('\n') z2 = int(z2) z2 = ana.readline() z2 = z2.rstrip('\n') print(type(z2))
zkayit()
def degerlerim():
p1 = rs.GetPoint('ilk nokta') if not p1: return p2 = rs.GetPoint('ilk nokta') if not p2: return p3 = rs.GetPoint('ilk nokta') if not p3: a = 0 b = 0 c = z2 p3 = rs.AddPoint(a, b, c) p4 = p3 box3pt(p1, p2, p4)
degerlerim(z2)
hi ı get this problem. I don’t know how to fix that problem. When I run the program and give values It says “z2 is not defined”. My regards