Skip to content

Commit 06fce70

Browse files
committed
Update examples that contain visualization component demonstration
1 parent 10165e6 commit 06fce70

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

curve2d/ex_curve01.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
u = 0.2
4646
curve.insert_knot(u)
4747

48+
# Draw the control point polygon and the evaluated curve after knot insertion
49+
if render_curve:
50+
curve.render()
51+
4852
# Save control points and evaluated curve points after knot insertion
4953
curve.save_curvepts_to_csv("curvepts01_knotins.csv")
5054
curve.save_ctrlpts_to_csv("ctrlpts01_knotins.csv")

curve3d/ex_curve3d01.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,27 @@
3131
# Evaluate curve
3232
curve.evaluate()
3333

34+
# Draw the control point polygon and the evaluated curve
3435
if render_curve:
3536
vis_comp = VisMPL.VisCurve3D()
3637
curve.vis = vis_comp
3738
curve.render()
3839

40+
# Save control points and evaluated curve points
41+
curve.save_curvepts_to_csv("curvepts3d01_orig.csv")
42+
curve.save_ctrlpts_to_csv("ctrlpts3d01_orig.csv")
43+
3944
# Insert a knot
4045
u = 0.2
4146
curve.insert_knot(u)
4247

48+
# Draw the control point polygon and the evaluated curve after knot insertion
49+
if render_curve:
50+
curve.render()
51+
4352
# Save control points and evaluated curve points after knot insertion
44-
curve.save_curvepts_to_csv("curvepts01_knotins.csv")
45-
curve.save_ctrlpts_to_csv("ctrlpts01_knotins.csv")
53+
curve.save_curvepts_to_csv("curvepts3d01_knotins.csv")
54+
curve.save_ctrlpts_to_csv("ctrlpts3d01_knotins.csv")
4655

4756
# Good to have something here to put a breakpoint
4857
pass

0 commit comments

Comments
 (0)