Skip to content

Commit 6d6c5d0

Browse files
author
Onur R. Bingol
committed
More compatibility updates
1 parent 4d4249e commit 6d6c5d0

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

bezier/ex_bezier_curve2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#
2626

2727
# Create a B-Spline curve instance (Bezier Curve)
28-
curve1 = BSpline.Curve2D()
28+
curve1 = BSpline.Curve()
2929

3030
# Set evaluation delta
3131
curve1.delta = 0.01

curve2d/ex_curve04_convert3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
os.chdir(os.path.dirname(os.path.realpath(__file__)))
2121

2222
# Create a NURBS curve instance (full circle)
23-
curve = NURBS.Curve2D()
23+
curve = NURBS.Curve()
2424

2525
# Set evaluation delta
2626
curve.delta = 0.01
@@ -32,7 +32,7 @@
3232
curve.knotvector = [0, 0, 0, 0.25, 0.25, 0.5, 0.5, 0.75, 0.75, 1, 1, 1]
3333

3434
# Convert to a 3D curve
35-
curve3d = curve.convert3d()
35+
curve3d = curve.add_dimension()
3636

3737
# Translate curve to z = 5
3838
curve3d.translate((0, 0, 5))

surface/ex_surface03_decompose.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@
2727
# Set evaluation delta
2828
surf.delta = 0.025
2929

30-
# Set up surface
31-
surf.read_ctrlpts_from_txt("ex_surface03.cptw")
30+
# Set degrees
3231
surf.degree_u = 1
3332
surf.degree_v = 2
33+
34+
# Set control points
35+
surf.read_ctrlpts_from_txt("ex_surface03.cptw")
36+
37+
# Set knot vector
3438
surf.knotvector_u = [0, 0, 1, 1]
3539
surf.knotvector_v = [0, 0, 0, 0.25, 0.25, 0.5, 0.5, 0.75, 0.75, 1, 1, 1]
3640

0 commit comments

Comments
 (0)