pw::VoxelSolver

The voxel solver mode type

Derives From

pw::Object pw::Mode pw::Solver

Notes

To create a mode of this type, use the pw::Application.begin command with the mode VoxelSolver specified, like this:

set solver [pw::Application begin VoxelSolver $entities]
Summary
pw::VoxelSolverThe voxel solver mode type
Instance Actions
runThis action runs the voxel solver.
getCurrentStageThis action gets the current stage of the voxel solver.
getCurrentEntityThis action gets the current entity of the voxel solver.
getCompletedTRexLayersThis action gets the number of completed T-Rex layers of the current entity of the voxel solver.
overrideTRexMaximumLayersThis action overrides the T-Rex maximum layers setting for a given entity while it is in the current solver.
clearOverridesThis action clears any overrides previously set for the current solver.
Instance Attributes
AllowIncompleteThis attribute controls whether the pw::Solver.run command will throw an error if initialization produces an incomplete grid.
StopWhenFullLayersNotMetSome variations of the voxel solver will invoke T-Rex and isotropic tet generation.

Instance Actions

run

$solver run ?-entities ents? method ?steps?

This action runs the voxel solver.

Parameters

-entities entsThis optional parameter is a subset of the entities in the solver mode to run the solver on.  If this parameter is not given the solver will be run on all the entities of the solver mode.
methodThe method to run.  For a pure voxel block, one of: Initialize | Release.  For an enclosing voxel block One of: Initialize | Refine | Smooth | Release.
stepsThis optional parameter is the integer number of Smooth steps to run.  Default is 1.  Only valid when method is Smooth.

Returns

This action returns nothing.

Information

This command supports progress updates.  Unlike most commands that support progress updates, if the user aborts this command, instead of reverting to the previous state the entities being solved will be left as is.

See pw.Solver for more details.

Example

Code

$solver run Initialize  ;# rebuild interior points
$solver run Refine      ;# refine voxel entity
$solver run Smooth 500  ;# run 500 smoothing passes
$solver run Release     ;# clear interior points

See pw.Solver

getCurrentStage

$solver getCurrentStage

This action gets the current stage of the voxel solver.

Parameters

This action has no parameters.

Returns

This action returns the current stage; None | PushAttributes | TRex | Isotropic

getCurrentEntity

$solver getCurrentEntity

This action gets the current entity of the voxel solver.

Parameters

This action has no parameters.

Returns

This action returns a pw::Entity object that is currently being solved on.

getCompletedTRexLayers

$solver getCompletedTRexLayers

This action gets the number of completed T-Rex layers of the current entity of the voxel solver.

Parameters

This action has no parameters.

Returns

This action returns the integer number of completed T-Rex layers of the current entity.  It is only valid if the current stage is TRex or Isotropic.

overrideTRexMaximumLayers

$solver overrideTRexMaximumLayers entity layers

This action overrides the T-Rex maximum layers setting for a given entity while it is in the current solver.

Parameters

entityThis parameter is a pw::Entity object that should have it’s <TRexMaximumLayers> attribute overridden with the given number of T-Rex layers.
layersThis parameter is an integer with the range [0, infinity), where 0 means that there should be no T-Rex layers.

Returns

This action returns nothing.

clearOverrides

$solver clearOverrides

This action clears any overrides previously set for the current solver.

Parameters

This action has no parameters.

Returns

This action returns nothing.

Instance Attributes

AllowIncomplete

$solver get/setAllowIncomplete value

This attribute controls whether the pw::Solver.run command will throw an error if initialization produces an incomplete grid.  Some variations of the voxel solver will invoke T-Rex and isotropic tet generation.  Failures can occur during T-Rex initialization when the isotropic tet generation failed.  This setting will retain the T-Rex cells when such failures occur.

Type

This attribute is a boolean value.

Default

The default for this attribute is False, which means the pw::Solver.run command will throw an error if an incomplete block is created.

StopWhenFullLayersNotMet

$solver get/setStopWhenFullLayersNotMet value

Some variations of the voxel solver will invoke T-Rex and isotropic tet generation.  This attribute controls whether the pw::Solver.run command will stop when the requested number of full layers is not met by the solver.

Type

This attribute is a boolean value.

Default

The default for this attribute is False, which means the pw::Solver.run command will not stop if the requested number of full alyers is not met.

$solver run ?-entities ents? method ?steps?
This action runs the voxel solver.
$solver getCurrentStage
This action gets the current stage of the voxel solver.
$solver getCurrentEntity
This action gets the current entity of the voxel solver.
$solver getCompletedTRexLayers
This action gets the number of completed T-Rex layers of the current entity of the voxel solver.
$solver overrideTRexMaximumLayers entity layers
This action overrides the T-Rex maximum layers setting for a given entity while it is in the current solver.
$solver clearOverrides
This action clears any overrides previously set for the current solver.
$solver get/setAllowIncomplete value
This attribute controls whether the pw::Solver.run command will throw an error if initialization produces an incomplete grid.
$solver run ?-entities ents? ?steps | method ?method_args??
This action runs the solver.
$solver get/setStopWhenFullLayersNotMet value
Some variations of the voxel solver will invoke T-Rex and isotropic tet generation.
Base type for all glyph types
The mode base type
The solver mode type
pw::Application begin ?-mode_specific_flags? mode ?entities?
This action begins a mode in the application.
An integer is a whole number.
Entity type
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
Close