ClipPlane

 

The ClipPlane module is created with the CreateModule command by setting the Type to ClipPlane. The properties of the ClipPlane are altered with the ModifyModule command. This is similar to the Network | Graphics Output | ClipPlane command.

 

Module Type

ClipPlane

 

Syntax

object.Construct(“CreateModule”)

object.Option(“SourceModule”, “data file name”)

object.Option(“Type”, “ClipPlane”)

object.Do() or object.DoOnce()

 

object.Construct(“ModifyModule”)

object.Option(“Module”, “ClipPlane”)

object.Option(“Option_Name”, “OptionValue”)

object.Do() or object.DoOnce()

 

object.Construct(“ConnectModules”)

object.Option(“TargetModule”, “ClipPlane”)

object.Option(“SourceModule”, “new data file name”)

object.Option(“TargetPort”, “1”)

object.Do() or object.DoOnce()

 

 

Option Name

ClipPlaneDragger

ClipPlaneOrientation

ClipPlaneXDir

ClipPlaneYDir

ClipPlaneZDir

ClipPlaneSwap

ClipPlaneDistance

 

Example

This example shows how to open an existing Voxler file, add a ClipPlane module, connect both geometry modules to the ClipPlane, and alter the ClipPlane direction.

 

Sub Main

 'Declares VoxlerApp as an object

  Dim VoxlerApp As Object

 

 'Creates an instance of the Voxler application object

 'and assigns it to the variable named "VoxlerApp"

  Set VoxlerApp = CreateObject("Voxler.Application")

 

 'Make Voxler visible

  VoxlerApp.Visible = True

 

 'Access CommandApi

  Set CommandApi = VoxlerApp.CommandApi

 

 'Open an existing file

  CommandApi.Construct ("Open")

  CommandApi.Option ("Path", VoxlerApp.Path+"\Samples\Gold (ScatterPlot).voxb")

  CommandApi.DoOnce()

 

 'Add a clip plane

  CommandApi.Construct ("CreateModule")

  CommandApi.Option ("Type", "ClipPlane")

  CommandApi.Option ("AutoConnect", "True")

  CommandApi.Option ("SourceModule", "ScatterPlot")

  CommandApi.Do()

 

 'Add the boundingbox to the clipplane

  CommandApi.Construct ("ConnectModules")

  CommandApi.Option ("TargetModule", "ClipPlane")

  CommandApi.Option ("SourceModule", "BoundingBox")

  CommandApi.Option ("TargetPort", "1")

  CommandApi.Do()

 

 'Alter the axis that the clip plane is showing - clip along Y

  CommandApi.Construct ("ModifyModule")

  CommandApi.Option ("Module", "ClipPlane")

  CommandApi.Option ("ClipPlaneOrientation", "1")

  CommandApi.Do()

 

End Sub

 

Used by: CommandApi object, CreateModule, ModifyModule

 

 

See Also

Automation Model

Automation Example - ClipPlane