from geomdl import BSpline
from geomdl import control_points
# Number of control points in all parametric dimensions
size_u = 5
size_v = 3
size_w = 2
# Create control points manager
points = control_points.VolumeManager(size_u, size_v, size_w)
pt = [10, 15, 12]
# Set control points
for u in range(size_u):
for v in range(size_v):
for w in range(size_w):
# 'pt' is the control point, e.g. [10, 15, 12]
points.set_ctrlpt(pt, u, v, w)
# Create spline geometry
volume = BSpline.Volume()
# Set control points
volume.ctrlpts = points.ctrlpts