Skip to content

Commit

Permalink
Update grid examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Onur Rauf Bingol committed Sep 11, 2018
1 parent 06fb1f7 commit a65830c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions grid/ex_surfgen02.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
surfgrid.generate(25, 30)

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

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

# Set sample size of the split surface
surf.sample_size = 30
surf.sample_size = 50

# Generate the visualization component and its configuration
vis_config = myvis.VisConfig(ctrlpts=False, legend=False)
vis_comp = myvis.VisSurface(vis_config)
vis_comp = myvis.VisSurfTriangle(vis_config)

# Set visualization component of the split surface
surf.vis = vis_comp
Expand Down
11 changes: 7 additions & 4 deletions grid/ex_surfgen03.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@
from geomdl import exchange

# Generate a control points grid
surfgrid = CPGen.Grid(50, 100)
surfgrid = CPGen.Grid(100, 100)

# This will generate a 10x10 grid
surfgrid.generate(10, 10)
surfgrid.generate(8, 8)

# Generate 1 bump at the center of the grid and generate some padding with a negative base_adjust value
surfgrid.bumps(num_bumps=1, all_positive=True, bump_height=45, base_extent=4, base_adjust=-1)
surfgrid.bumps(num_bumps=1, bump_height=20, base_extent=4)

# surfgrid.rotate_x(10.0)
# surfgrid.rotate_y(7.5)

# Create a BSpline surface instance
surf = BSpline.Surface()
Expand All @@ -48,7 +51,7 @@
surf.sample_size = 50

# Generate the visualization component and its configuration
vis_config = vis.VisConfig(ctrlpts=False, legend=False)
vis_config = vis.VisConfig(ctrlpts=True, legend=False)
vis_comp = vis.VisSurface(vis_config)

# Set visualization component of the surface
Expand Down

0 comments on commit a65830c

Please sign in to comment.