import FreeCAD from Part import * from FreeCAD import Base points = [(0,0,0), (0,1,2), (0,2,0), (1,0,1), (1,1,0), (1,2,0), (2,0,2), (2,1,0), (2,2,0)] knots_u = [0,0,0,1,1,1] knots_v = [0,0,0,1,1,1] surface = Part.BSplineSurface() surface.buildFromPolesMultsKnots(points, [3,3], [3,3], knots_u, knots_v, False, False, 3, 3) Part.show(surface)
import FreeCAD from Part import * from FreeCAD import Base points = [(0,0,0), (0,1,2), (0,2,0), (1,0,1), (1,1,0), (1,2,0), (2,0,2), (2,1,0), (2,2,0)] knots_u = [0,0,0,1,1,1] knots_v = [0,0,0,1,1,1] surface = Part.BSplineSurface() surface.buildFromPolesMultsKnots(points, [3,3], [3,3], knots_u, knots_v, False, False, 3, 3) points[4] = (1, 1.5, 1) Part.show(surface)In both examples, the `Part` module is used to create and modify the BSplineSurface object. This module is part of the FreeCAD library.