import Rhino.Geometry as rg
import math
u_values = rg.Interval(0, 2 * math.pi).DivideByCount(100, True)
v_values = rg.Interval(0, 2 * math.pi).DivideByCount(100, True)
points = []
for u in u_values:
for v in v_values:
x = math.cos(u) * math.sin(v)
y = math.sin(u) * math.sin(v)
z = math.cos(v)
point = rg.Point3d(x, y, z)
points.append(point)
mesh = rg.Mesh()
mesh.Vertices.AddVertices(points)
a = mesh
If ‘u_values’ and ‘v_values’ are your inputs, why do you immediately ignore and override them?
The error message is crystal clear to me.
import Rhino.Geometry as rg
import math
u_values = rg.Interval(0, 2 * math.pi).DivideByCount(100, True)
v_values = rg.Interval(0, 2 * math.pi).DivideByCount(100, True)
points = []
for u in u_values:
for v in v_values:
x = math.cos(u) * math.sin(v)
y = math.sin(u) * math.sin(v)
z = math.cos(v)
point = rg.Point3d(x, y, z)
points.append(point)
mesh = rg.Mesh()
mesh.Vertices.AddVertices(points)
a = mesh
3. Attach minimal versions of all the relevant files
Then tried a few different things and finally settled on creating 1/4 of an Oloid (white group) and mirroring it twice to get a “Closed Brep” (cyan group). I replaced EdgeSrf with NetSrf because it looked better when baked.