Synopsis
create an array of fields from a single field based on material properties of cell sets
Input Ports
in_field |
Mesh |
ui_parent |
user interface parent object |
Output Ports
out_fld |
Mesh[] |
out_obj |
GroupObject |
Description
Each cell set in a field has an associated properties array. You may use this array to store anything related to the cell set, but it is commonly used to store material properties of the cells in the cell set.
explode_materials splits up the field into an array of fields based on the values of a particular element of the properties array. The same array index is used to look up the value in the properties array of each cell set. Each cell set with a distinct value of that property goes into a separate output field. Whether the values are equal is all that is significant, the actual values are not significant.
Note that this macro compares floating point numbers for equality; you are responsible for ensuring that the values in the material property array are bit-for-bit equal or not equal, as desired.
Input Ports
in_field
Mesh. This mesh is split apart into multiple meshes on the output, according to the selected property value of each cell set.
ui_parent
A port to connect to a user interface object that contains the macro's widgets. By default, it is connected to the default user interface object in the application in which the macro is instanced. (This default connection is not drawn.)
Parameters
material index
UIslider. Selects which element of each cell set's material properties array to use to split the input. All cell sets' arrays use the same index.
Output Ports
out_fld
Mesh[]. An array of meshes, with other data merged from the input field.
out_obj
GroupObject. Group of renderable objects corresponding to out_fld.
Example
Libraries.Examples.Visualization.Explode_Field
examples/explode.v
File
See also