Skip to content

Commit a65830c

Browse files
author
Onur Rauf Bingol
committed
Update grid examples
1 parent 06fb1f7 commit a65830c

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

grid/ex_surfgen02.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
surfgrid.generate(25, 30)
3030

3131
# Generate bumps on the grid
32-
surfgrid.bumps(num_bumps=5, all_positive=True, bump_height=20, base_extent=4)
32+
surfgrid.bumps(num_bumps=5, bump_height=20, base_extent=4)
3333

3434
# Rotate the grid about y and z axes
3535
surfgrid.rotate_y(12.5)
@@ -50,11 +50,11 @@
5050
surf.knotvector_v = utilities.generate_knot_vector(surf.degree_v, surf.ctrlpts_size_v)
5151

5252
# Set sample size of the split surface
53-
surf.sample_size = 30
53+
surf.sample_size = 50
5454

5555
# Generate the visualization component and its configuration
5656
vis_config = myvis.VisConfig(ctrlpts=False, legend=False)
57-
vis_comp = myvis.VisSurface(vis_config)
57+
vis_comp = myvis.VisSurfTriangle(vis_config)
5858

5959
# Set visualization component of the split surface
6060
surf.vis = vis_comp

grid/ex_surfgen03.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@
2222
from geomdl import exchange
2323

2424
# Generate a control points grid
25-
surfgrid = CPGen.Grid(50, 100)
25+
surfgrid = CPGen.Grid(100, 100)
2626

2727
# This will generate a 10x10 grid
28-
surfgrid.generate(10, 10)
28+
surfgrid.generate(8, 8)
2929

3030
# Generate 1 bump at the center of the grid and generate some padding with a negative base_adjust value
31-
surfgrid.bumps(num_bumps=1, all_positive=True, bump_height=45, base_extent=4, base_adjust=-1)
31+
surfgrid.bumps(num_bumps=1, bump_height=20, base_extent=4)
32+
33+
# surfgrid.rotate_x(10.0)
34+
# surfgrid.rotate_y(7.5)
3235

3336
# Create a BSpline surface instance
3437
surf = BSpline.Surface()
@@ -48,7 +51,7 @@
4851
surf.sample_size = 50
4952

5053
# Generate the visualization component and its configuration
51-
vis_config = vis.VisConfig(ctrlpts=False, legend=False)
54+
vis_config = vis.VisConfig(ctrlpts=True, legend=False)
5255
vis_comp = vis.VisSurface(vis_config)
5356

5457
# Set visualization component of the surface

0 commit comments

Comments
 (0)