addClipPlane()

Create a Clip Plane for an actor.

Usage

clipPlane = vis.addClipPlane( point1, point2, point3,
                                       side = 'up', actor = None )

Parameters

point1 (list)
Point1 is used for creating clip plane.
point2 (list)
Point1 is used for creating clip plane.
point3 (list)
Point3 is used for creating clip plane.
side (string)
Side of the clip plane.
actor (object)
The actor which the clipping is applied to it. If actor is None (the default), the clipping is applied to all 3D objects.

Return Value

clipPlane (object)
Clip Plane object

Errors

actor should already be created and be valid.

Description

This routine creates a clip plane for the specified actor, and adds it to Scene Graph. If actor is None (the default), the clipping is applied to all 3D objects. For example,
bndBox = vis.bndBox()
imp = vis.getVolActor( "impeller" )
impBbox = imp.bndBox()
xmin = bndBox[0][0]
xmax = bndBox[0][1]
ymin = bndBox[1][0]
ymax = bndBox[1][1]
zmin = bndBox[1][0]
zmax = bndBox[1][1]
ymid = (impBbox[1][0] + impBbox[1][1] ) / 2
clp = vis.addClipPlane( [xmin, ymid, zmin],
                        [xmax, ymid, zmin],
                        [xmax, ymid, zmax],
                         side = "up" )