Vizard 8 » Command Index » Vizard modules » vizshape » <vizshape>.addGrid
8.1

<vizshape>.addGrid

Adds a grid

<vizshape>.addGrid(  
size = [50.0,50.0]  
step = 1.0  
boldStep = 0  
axis = vizshape.AXIS_Y  
)  
size = [50.0,50.0]
Grid dimensions
step = 1.0
Defines the size of squares within the grid.
boldStep = 0
Defines which, if any, lines in the grid will be drawn in bold.

If boldStep is None, no bold lines will be drawn.
If boldStep < step, the center and outer lines will be bold.
Otherwise boldStep must be a multiple of step and those lines will be drawn in bold.
axis = vizshape.AXIS_Y
Can be a positive or negative value of one of the following:

Flag

Description

vizshape.AXIS_X

Shape will point toward the X axis when added

vizshape.AXIS_Y

Shape will point toward the Y axis when added

vizshape.AXIS_Z

Shape will point toward the Z axis when added

Remarks

This command will add a grid.

Return Value

<node3D> object

Example

import viz
import vizshape
viz.go()

grid = vizshape.addGrid()
grid.color([0.2]*3)

viz.clearcolor(viz.GRAY)