The voxel solver mode type
pw::Object pw::Mode pw::Solver
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]
pw:: | The voxel solver mode type |
Instance Actions | |
run | This action runs the voxel solver. |
getCurrentStage | This action gets the current stage of the voxel solver. |
getCurrentEntity | This action gets the current entity of the voxel solver. |
getCompletedTRexLayers | This action gets the number of completed T-Rex layers of the current entity of the voxel solver. |
overrideTRexMaximumLayers | This action overrides the T-Rex maximum layers setting for a given entity while it is in the current solver. |
clearOverrides | This action clears any overrides previously set for the current solver. |
Instance Attributes | |
AllowIncomplete | This attribute controls whether the pw::Solver.run command will throw an error if initialization produces an incomplete grid. |
StopWhenFullLayersNotMet | Some variations of the voxel solver will invoke T-Rex and isotropic tet generation. |
$solver run ?-entities ents? method ?steps?
This action runs the voxel solver.
-entities ents | This 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. |
method | The method to run. For a pure voxel block, one of: Initialize | Release. For an enclosing voxel block One of: Initialize | Refine | Smooth | Release. |
steps | This optional parameter is the integer number of Smooth steps to run. Default is 1. Only valid when method is Smooth. |
This action returns nothing.
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.
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
$solver getCurrentEntity
This action gets the current entity of the voxel solver.
This action has no parameters.
This action returns a pw::Entity object that is currently being solved on.
$solver getCompletedTRexLayers
This action gets the number of completed T-Rex layers of the current entity of the voxel solver.
This action has no parameters.
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.
$solver overrideTRexMaximumLayers entity layers
This action overrides the T-Rex maximum layers setting for a given entity while it is in the current solver.
entity | This parameter is a pw::Entity object that should have it’s <TRexMaximumLayers> attribute overridden with the given number of T-Rex layers. |
layers | This parameter is an integer with the range [0, infinity), where 0 means that there should be no T-Rex layers. |
This action returns nothing.
$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.
This attribute is a boolean value.
The default for this attribute is False, which means the pw::Solver.run command will throw an error if an incomplete block is created.
$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.
This attribute is a boolean value.
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.
This action runs the voxel solver.
$solver run ?-entities ents? method ?steps?
This action gets the current stage of the voxel solver.
$solver getCurrentStage
This action gets the current entity of the voxel solver.
$solver getCurrentEntity
This action gets the number of completed T-Rex layers of the current entity of the voxel solver.
$solver getCompletedTRexLayers
This action overrides the T-Rex maximum layers setting for a given entity while it is in the current solver.
$solver overrideTRexMaximumLayers entity layers
This action clears any overrides previously set for the current solver.
$solver clearOverrides
This attribute controls whether the pw::Solver.run command will throw an error if initialization produces an incomplete grid.
$solver get/setAllowIncomplete value
This action runs the solver.
$solver run ?-entities ents? ?steps | method ?method_args??
Some variations of the voxel solver will invoke T-Rex and isotropic tet generation.
$solver get/setStopWhenFullLayersNotMet value
This action begins a mode in the application.
pw::Application begin ?-mode_specific_flags? mode ?entities?