Persistent cut plane type
pw:: | Persistent cut plane type |
Static Actions | |
create | This action creates a new cut plane object. |
getAll | This action returns all of the currently defined cut planes. |
isValidMetric | This action checks to see if the specified examine function is valid for use with the cut planes. |
applyMetric | This action applies a block metric function name to the cuts. |
getMetric | This function returns the current block metric used by pw::CutPlane objects. |
refresh | This action runs the default metric function on any blocks cut by pw::CutPlane objects and updates the display of the cut planes. |
getByName | This action returns returns a pw::CutPlane using the name. |
Instance Actions | |
delete | This action deletes this cut plane. |
getPlaneType | This action returns whether the cutting plane type is a physical or computational type. |
setPointNormal | This action defines the cut plane as a plane centered on the given point with the specified normal. |
setConstant | This action defines the cut plane as either a constant X, Y, Z, I, J, or K value. |
setCoefficients | This function specifies the cutting plane via the coefficients of the plane equation Ax + By + Cz + D = 0. |
setPoints | This action sets the cutting plane by giving three points that plane will pass through. |
setPlane | This action defines the cutting plane via the result of any of the pwu::Plane definition methods. |
getPlaneNormal | For physical cutting planes, this returns the plane normal. |
getPlaneDistance | For physical cutting planes, this returns the signed distance from the origin to the plane (the value of D in the plane equation Ax + By + Cz = D). |
getPlaneCenter | This routine gets the center point on the plane if a physical plane is defined. |
getPlane | This action gets the plane coefficients if the plane is a physical plane. |
setComputationalPlane | This method defines the cutting plane as a computational plane at a specified constant computational axis. |
getComputationalPlaneDirection | If the plane is defined as a computational plane, this returns the const computational direction (either “I”, “J”, or “K”). |
getComputationalPlaneIndex | This action gets the constant index of the computational plane. |
getCuts | This action returns the individual cut objects associated with this cut plane. |
getCut | This function returns the cut object corresponding to the intersection of this cut plane through the specified block. |
setForm | This action sets the cutting form for physical cuts. |
getForm | This action returns the cutting form of the cutting plane. |
getFrameworkPath | This function returns the path to the framework instance in which the cutting plane resides. |
setRenderAttribute | This action sets the fill and line render attributes for the cutting plane’s cut objects. |
getRenderAttribute | This action gets the cut plane’s fill and line render attributes. |
setShrinkFactor | This action specifies the shrink factor to use for each displayed element in the cut plane’s cut objects. |
getShrinkFactor | This action returns the shrink factor specified for the cut plane. |
setName | This function sets the cut plane name. |
getName | This function returns the name of the cutting plane. |
getEnabled | This function returns whether or not the cutting plane is enabled. |
addBlock | This action specifies a block or list of blocks to be intersected by the cutting plane. |
removeBlock | This action removes a block from the cutting plane and deletes the corresponding pw::Cut object. |
getBlocks | This method returns a list of the blocks the cutting plane is monitoring. |
setExtremaMode | This action controls whether or not the cutting plane repositions its cut objects in each block such that they intersect the minimum or maximum value. |
getExtremaMode | This method returns the current extrema setting for the cut plane group. |
setTransparency | This action sets the transparency level for the cut plane’s current and future cuts. |
getTransparency | This action returns the transparency setting for the cut plane group. |
setOversetRenderAttribute | This action sets the overset render attributes for the cutting plane’s cut objects. |
getOversetRenderAttribute | This action returns the overset render attributes for the cutting plane. |
resetRenderAttributes | This action resets the various display settings of a cut to their default values. |
Render Attributes | |
FillMode | This attribute is the fill mode for rendering a cut object. |
LineMode | This attribute is the line mode for rendering a cut object. |
Overset Render Attributes | |
FringeOption | This attribute controls how fringe information is displayed. |
ShowHoleGrid | This attribute controls whether cells identified as holes by the IBLANK array are displayed. |
ShowHoleSymbol | This attribute determines if a dot is drawn at the center of each cell identified as a hole by the IBLANK array. |
ShowOrphans | This attribute controls if orphan objects are rendered for the cut plane group. |
ShowOrphanDonorCandidates | This attribute controls if orphan donor objects are displayed for the cut plane group. |
pw::CutPlane create
This action creates a new cut plane object.
This action has no parameters.
This actions returns a new pw::CutPlane object.
This examples shows how to create a persistent cut plane through two blocks at X=5.
Code
set cut [pw::CutPlane create] $cut setConstant -X 5.0 $cut setForm Cells $cut addBlock [pw::Grid getByName "blk-1"] $cut addBlock [pw::Grid getByName "blk-2"]
pw::CutPlane getAll
This action returns all of the currently defined cut planes. Cut planes from all framework paths are returned.
This action has no parameters.
Returns; This action returns a list of pw::CutPlane objects.
pw::CutPlane isValidMetric metric
This action checks to see if the specified examine function is valid for use with the cut planes. In order to be valid, an examine function has to support either structured, unstructured, or extruded blocks and not be voxel-based.
metric | This argument specifies the name of the string metric function to use. See pw::Examine.create for the superset of options. |
Returns; This function returns a boolean value indicating whether or not the metric function is valid for use with cut planes.
This function does not check to see if the function works with the specific block types currently cut by the cut planes. For example, BlockLengthI is a valid metric even if no structured blocks are cut (or even present).
pw::CutPlane applyMetric
This action applies a block metric function name to the cuts.
metric | This string argument specifies the block metric function to apply to the blocks cut by the pw::CutPlane objects. The cut planes are re-evaluated with the new metric. |
This action returns nothing.
pw::CutPlane getMetric
This function returns the current block metric used by pw::CutPlane objects.
None
This action returns a string value representing the metric function used by pw::CutPlane objects.
pw::CutPlane refresh ? -force ?
This action runs the default metric function on any blocks cut by pw::CutPlane objects and updates the display of the cut planes. The default metric function is specified by pw::CutPlane.applyMetric.
-force | Forces the metric to be rerun even if the blocks have not changed since the last refresh. |
This action has no return value.
pw::CutPlane getByName name
This action returns returns a pw::CutPlane using the name.
name | This parameter is a name string. |
This actions returns a pw::CutPlane object.
$cutPlane delete
This action deletes this cut plane. The cut plane’s pw::Cut objects will be deleted as well.
None.
This action returns nothing.
$cutPlane getPlaneType
This action returns whether the cutting plane type is a physical or computational type.
None.
This function returns a string result of either “Physical” or “Computational”.
$cutPlane setPointNormal $point $normal
This action defines the cut plane as a plane centered on the given point with the specified normal. This is categorized as a physical cut.
point | This argument should be a vector value specifying a point on the cutting plane. |
normal | This parameter should be a vector value specifying the plane normal. |
This action does not return anything.
$cutPlane setConstant < -X | -Y | -Z | -I | -J | -K > value
This action defines the cut plane as either a constant X, Y, Z, I, J, or K value. The first three types are categorized as physical cuts while the latter three are computational cuts.
-X | This flag indicates the plane will represent a physical plane with a constant X value. |
-Y | This flag indicates the plane will represent a physical plane with a constant Y value. |
-Z | This flag indicates the plane will represent a physical plane with a constant Z value. |
-I | This flag indicates the plane will represent a computational plane with a constant I value. It is relevant for structured blocks only. |
-J | This flag indicates the plane will represent a computational plane with a constant J value. It is relevant for structured blocks only. |
-K | This flag indicates the plane will represent a computational plane with a constant K value. It is relevant for structured and extruded blocks only. |
value | This argument specifies the constant value. It should be a real value for a constant X, Y, or Z plane, and an unsigned integer value for a constant I, J, or K plane. |
This function returns nothing.
$cutPlane setCoefficients A B C D
This function specifies the cutting plane via the coefficients of the plane equation Ax + By + Cz + D = 0. This plane type is categorized as a physical cut.
A | This parameter is the first coefficient. |
B | This parameter is the second coefficient. |
C | This parameter is the third coefficient. |
D | This parameter is the fourth coefficient. |
This action returns nothing.
$cutPlane setPoints point1 point2 point3
This action sets the cutting plane by giving three points that plane will pass through. This plane type is categorized as a physical cut.
point1 | This parameter is a point the plane will pass through. |
point2 | This parameter is a point the plane will pass through. |
point3 | This parameter is a point the plane will pass through. |
This action returns nothing.
$cutPlane setPlane $plane_coeffs
This action defines the cutting plane via the result of any of the pwu::Plane definition methods.
plane_coeffs | This argument is a list of four float value defining the coefficients of the plane equation Ax + By + Cz = D. Note that this is different from the equation used in pw::CutPlane.setCoefficients. It reflects the value used by the pwu::Plane methods. |
This action returns nothing.
$cutPlane getPlaneNormal
For physical cutting planes, this returns the plane normal. This action raises an error if the cutting plane type is computational.
None.
This action returns the plane normal as a vector value if the plane is categorized as a physical plane. It raises an error otherwise.
$cutPlane getPlaneDistance
For physical cutting planes, this returns the signed distance from the origin to the plane (the value of D in the plane equation Ax + By + Cz = D). This action raises an error if the cutting plane type is computational.
None.
This action returns the signed distance from the origin to the plane as a float value if the plane is categorized as a physical plane. It raises an error if the plane is a computational plane.
This routine gets the center point on the plane if a physical plane is defined. An error is raised if this is a computational plane.
None.
This action returns the center value as a vector.
$cutPlane getPlane ?-D?
This action gets the plane coefficients if the plane is a physical plane. It raises an error if the plane is a computational plane.
-D | If specified, the coefficients correspond to the equation Ax + By + Cz = D, which matches the pwu::Plane format. If not specified, the coefficients correspond to the Ax + By + Cz + D = 0 equation. |
This action returns the plane as list of 4 coefficients. If the -D option is specified, the result can be treated as a pwu::Plane object.
$cutPlane setComputationalPlane computational_direction index
This method defines the cutting plane as a computational plane at a specified constant computational axis.
computational_direction | This argument specifies the “I”, “J”, or “K” computational plane. |
index | This parameter specifies the constant index value for the computational plane. |
This action returns nothing.
$cutPlane getComputationalPlaneDirection
If the plane is defined as a computational plane, this returns the const computational direction (either “I”, “J”, or “K”). If this is a physical cutting plane, an error is raised.
None.
This function returns the constant computational axis: “I”, “J”, or “K”.
$cutPlane getComputationalPlaneIndex
This action gets the constant index of the computational plane. An error is raised if this is a physical plane.
None.
This action returns the computational plane index as an integer value.
$cutPlane getCuts
This action returns the individual cut objects associated with this cut plane. Each cut will correspond to a different block.
None.
This actions returns a list of pw::Cut objects.
$cutPlane getCut $block
This function returns the cut object corresponding to the intersection of this cut plane through the specified block.
block | This argument specifies the block of interest. |
This action returns a pw::Cut object.
$cut setForm < Cells | Crinkle | Flat >
This action sets the cutting form for physical cuts.
form | This argument specifies the cutting form. Valid values are “Cell”, “Crinkle”, and “Flat”. |
This routine has no effect for computational cutting planes.
This action returns nothing.
$cutPlane getForm
This action returns the cutting form of the cutting plane.
None.
This routine returns a string value representing the cutting plane form. The value with either be “Cells”, “Crinkle”, or “Flat”. For computational cutting planes, the form will always be “Flat”.
$cutPlane getFrameworkPath
This function returns the path to the framework instance in which the cutting plane resides.
None.
This action returns list of pw::Framework objects defining the framework path to the cutting plane.
$cutPlane setRenderAttribute < FillMode | LineMode > value
This action sets the fill and line render attributes for the cutting plane’s cut objects.
attribute | This string value is the name of the attribute to set. |
value | This string value is the attribute setting. |
This action returns nothing.
$cutPlane getRenderAttribute < FillMode | LineMode >
This action gets the cut plane’s fill and line render attributes. Note that the cut plane’s individual cuts may have different attributes.
attribute | This string value is the name of the attribute to query. |
This action returns a string representing the value of the queried attribute.
This action specifies the shrink factor to use for each displayed element in the cut plane’s cut objects. This value is applied to all cut objects belonging to the cut plane.
factor | This float value specifies the shrink factor from 0.0 (full shrink) to 1.0 (no shrinking). |
This action returns nothing.
$cutPlane getShrinkFactor
This action returns the shrink factor specified for the cut plane. Note that individual cut objects may have been overridden with different shrink factors.
None.
This action returns the shrink factor as a float value.
$cutPlane setName name
This function sets the cut plane name.
name | This parameter specifies the new name for the cutting plane. If the name is not unique amongst the other pw::CutPlane objects, a dash and a number will be appended to make the name unique. |
This action returns the new name (which may have been modified to make it unique).
This function returns the name of the cutting plane.
None.
This action returns the cutting plane’s name as a string value. */
static Gci::Status obj_getName(GciParser &parser, GlyphCutPlane *glyph) { if (Gci::OK != parser.endOfArgs()) { parser.usageError(1, “”); return Gci::Error; } parser.setResultGgString(glyph->getGgCutPlaneGroup()->getName()); return Gci::OK; }
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Method: setEnabled This function controls whether or not the cutting plane is displayed.
value | This boolean value controls if the cutting plane is shown. A true value results in the cutting plane being shown while a false value hides the cutting plane. |
This action returns nothing.
$cutPlane addBlock $block
This action specifies a block or list of blocks to be intersected by the cutting plane. If the cutting plane intersects a block, a new pw::Cut object will be generated.
block | A pw::Block object or list of pw::Block objects specifying the block or blocks to be cut. |
This action returns nothing.
$cutPlane getBlocks
This method returns a list of the blocks the cutting plane is monitoring.
None.
This action returns a list of pw::Block objects the cutting plane is potentially cutting.
$cutPlane setExtremaMode < None | Minimum | Maximum >
This action controls whether or not the cutting plane repositions its cut objects in each block such that they intersect the minimum or maximum value.
mode | This argument specifies either “None”, “Minimum”, or “Maximum”. A value of “None” uses the actual definition of the cutting plane to determine the cut location. A “Minimum” value specifies that each cut should be repositioned to intersect the minimum value. A value of “Maximum” indicates that each cut should be repositioned to intersect the maximum value. |
This action returns nothing.
If the extrema mode is enabled, physical cuts will retain the specified normal value, but will be moved to intersect the given extrema value. For computational cuts, the index will be modified to have the cut include the extrema value. If the extrema mode is “None” or no metric has been specified, the cuts will fallback to the specified plane definition.
$cutPlane getExtremaMode
This method returns the current extrema setting for the cut plane group.
None.
This action returns a string value indicating whether the cut plane group is set to move individual cuts to the minimum (“Minimum”) or maximum (“Maximum”) extrema of a block or the cut plane group will not modify the position of the cuts (“None”).
$cutPlane setTransparency transparency
This action sets the transparency level for the cut plane’s current and future cuts.
transparency | This parameter is a float value between 0 (fully opaque) and 1 (fully transparent) inclusive. |
This action returns nothing.
$cutPlane getTransparency
This action returns the transparency setting for the cut plane group.
None.
This action returns a float value between 0 and 1 inclusive. A value of 0 means the cut plane group is set to fully opaque, while a value of 1 indicates the cut plane group is set to fully transparent.
The transparency level can be set on individual cuts, so the value returned by this action does not necessarily reflect the value on each individual cut.
$cutPlane setOversetRenderAttribute < FringeOption | ShowHoleGrid | ShowHoleSymbol | ShowOrphans | ShowOrphanDonorCandidates > value
This action sets the overset render attributes for the cutting plane’s cut objects.
attribute | This string value is the name of the attribute to set. |
value | This string value is the attribute setting. |
This action returns nothing.
FringeOption, ShowHoleGrid, ShowHoleSymbol, ShowOrphans, ShowOrphanDonorCandidates
$cutPlane getOversetRenderAttribute < FringeOption | ShowHoleGrid | ShowHoleSymbol | ShowOrphans | ShowOrphanDonorCandidates >
This action returns the overset render attributes for the cutting plane.
attribute | This string value is the name of the attribute to set. |
This action returns a string representing the value of the specified attribute.
FringeOption, ShowHoleGrid, ShowHoleSymbol, ShowOrphans, ShowOrphanDonorCandidates
$cut resetRenderAttributes
This action resets the various display settings of a cut to their default values. This includes the FillMode, the LineMode, the transparency, the shrink factor, and the overset render attributes.
None.
This action returns nothing.
setRenderAttribute, setOversetRenderAttribute, setShrinkFactor, setTransparency
$cutPlane get/setRenderAttribute FillMode mode
This attribute is the fill mode for rendering a cut object.
string; < None | Flat | Shaded | HiddenLine >
None | Cell polygons are drawn as lines. |
Flat | Render the polygon interior filled with a constant, non-gradient color. This produces a flat, uncontoured appearance. |
Shaded | The cut cell polygons are filled with a color that varies based on the angle of its normal with the lighting direction and viewing direction. |
HiddenLine | Similar to Flat except that the fill color is the average of the background colors. This produces a hidden-line appearance. |
$cutPlane get/setRenderAttribute LineMode mode
This attribute is the line mode for rendering a cut object. This setting only applies when the fill mode is set to Flat or Shaded.
string; < All | None >
None | No outlines are drawn. |
All | The outlines of each polygon in the cut are drawn. |
$cutPlane get/setOversetRenderAttribute FringeOption mode
This attribute controls how fringe information is displayed.
string; < Off | FringeOnly | FringeDonors >
Off | No fringe information is displayed. |
FringeOnly | Fringe cells are marked with a small dot at the cell center. |
FringeDonors | Fringe cells are marked with a small dot at the cell center and the fringe donors are draw in wireframe mode. |
ShowHoleGrid, ShowHoleSymbol, ShowOrphans, ShowOrphanDonorCandidates, setOversetRenderAttribute, getOversetRenderAttribute
$cutPlane get/setOversetRenderAttribute ShowHoleGrid mode
This attribute controls whether cells identified as holes by the IBLANK array are displayed.
boolean; < false | true >
false | Cells identified as holes by the IBLANK array are not displayed. |
true | All cells in the cut plane are displayed. |
FringeOption, ShowHoleSymbol, ShowOrphans, ShowOrphanDonorCandidates, setOversetRenderAttribute, getOversetRenderAttribute
$cutPlane get/setOversetRenderAttribute ShowHoleSymbol mode
This attribute determines if a dot is drawn at the center of each cell identified as a hole by the IBLANK array.
boolean; < false | true >
false | No dot is displayed at hole cell centers. |
true | A dot is displayed at hole cell centers. |
FringeOption, ShowHoleGrid, ShowOrphans, ShowOrphanDonorCandidates, setOversetRenderAttribute, getOversetRenderAttribute
$cutPlane get/setOversetRenderAttribute ShowOrphans mode
This attribute controls if orphan objects are rendered for the cut plane group.
boolean; < false | true >
false | The orphan objects are not displayed. |
true | The orphan objects are displayed. |
FringeOption, ShowHoleGrid, ShowHoleSymbol, ShowOrphanDonorCandidates, setOversetRenderAttribute, getOversetRenderAttribute
$cutPlane get/setOversetRenderAttribute ShowOrphanDonorCandidates mode
This attribute controls if orphan donor objects are displayed for the cut plane group.
boolean; < false | true >
false | No orphan donor objects are displayed. |
true | Orphan donor objects are displayed in a wireframe manner, colored by the donating block. |
FringeOption, ShowHoleGrid, ShowHoleSymbol, ShowOrphans, setOversetRenderAttribute, getOversetRenderAttribute
This action creates a new cut plane object.
pw::CutPlane create
This action returns all of the currently defined cut planes.
pw::CutPlane getAll
This action checks to see if the specified examine function is valid for use with the cut planes.
pw::CutPlane isValidMetric metric
This action applies a block metric function name to the cuts.
pw::CutPlane applyMetric
This function returns the current block metric used by pw::CutPlane objects.
pw::CutPlane getMetric
This action runs the default metric function on any blocks cut by pw::CutPlane objects and updates the display of the cut planes.
pw::CutPlane refresh ? -force ?
This action returns returns a pw::CutPlane using the name.
pw::CutPlane getByName name
This action deletes this cut plane.
$cutPlane delete
This action returns whether the cutting plane type is a physical or computational type.
$cutPlane getPlaneType
This action defines the cut plane as a plane centered on the given point with the specified normal.
$cutPlane setPointNormal $point $normal
This action defines the cut plane as either a constant X, Y, Z, I, J, or K value.
$cutPlane setConstant < -X | -Y | -Z | -I | -J | -K > value
This function specifies the cutting plane via the coefficients of the plane equation Ax + By + Cz + D = 0.
$cutPlane setCoefficients A B C D
This action sets the cutting plane by giving three points that plane will pass through.
$cutPlane setPoints point1 point2 point3
This action defines the cutting plane via the result of any of the pwu::Plane definition methods.
$cutPlane setPlane $plane_coeffs
For physical cutting planes, this returns the plane normal.
$cutPlane getPlaneNormal
For physical cutting planes, this returns the signed distance from the origin to the plane (the value of D in the plane equation Ax + By + Cz = D).
$cutPlane getPlaneDistance
This action gets the plane coefficients if the plane is a physical plane.
$cutPlane getPlane ?-D?
This method defines the cutting plane as a computational plane at a specified constant computational axis.
$cutPlane setComputationalPlane computational_direction index
If the plane is defined as a computational plane, this returns the const computational direction (either “I”, “J”, or “K”).
$cutPlane getComputationalPlaneDirection
This action gets the constant index of the computational plane.
$cutPlane getComputationalPlaneIndex
This action returns the individual cut objects associated with this cut plane.
$cutPlane getCuts
This function returns the cut object corresponding to the intersection of this cut plane through the specified block.
$cutPlane getCut $block
This action sets the cutting form for physical cuts.
$cut setForm < Cells | Crinkle | Flat >
This action returns the cutting form of the cutting plane.
$cutPlane getForm
This function returns the path to the framework instance in which the cutting plane resides.
$cutPlane getFrameworkPath
This action sets the fill and line render attributes for the cutting plane’s cut objects.
$cutPlane setRenderAttribute < FillMode | LineMode > value
This action gets the cut plane’s fill and line render attributes.
$cutPlane getRenderAttribute < FillMode | LineMode >
This action returns the shrink factor specified for the cut plane.
$cutPlane getShrinkFactor
This function sets the cut plane name.
$cutPlane setName name
This function returns whether or not the cutting plane is enabled.
$cutPlane getEnabled
This action specifies a block or list of blocks to be intersected by the cutting plane.
$cutPlane addBlock $block
This action removes a block from the cutting plane and deletes the corresponding pw::Cut object.
$cutPlane removeBlock $block
This method returns a list of the blocks the cutting plane is monitoring.
$cutPlane getBlocks
This action controls whether or not the cutting plane repositions its cut objects in each block such that they intersect the minimum or maximum value.
$cutPlane setExtremaMode < None | Minimum | Maximum >
This method returns the current extrema setting for the cut plane group.
$cutPlane getExtremaMode
This action sets the transparency level for the cut plane’s current and future cuts.
$cutPlane setTransparency transparency
This action returns the transparency setting for the cut plane group.
$cutPlane getTransparency
This action sets the overset render attributes for the cutting plane’s cut objects.
$cutPlane setOversetRenderAttribute < FringeOption | ShowHoleGrid | ShowHoleSymbol | ShowOrphans | ShowOrphanDonorCandidates > value
This action returns the overset render attributes for the cutting plane.
$cutPlane getOversetRenderAttribute < FringeOption | ShowHoleGrid | ShowHoleSymbol | ShowOrphans | ShowOrphanDonorCandidates >
This action resets the various display settings of a cut to their default values.
$cut resetRenderAttributes
This attribute is the fill mode for rendering a cut object.
$cutPlane get/setRenderAttribute FillMode mode
This attribute is the line mode for rendering a cut object.
$cutPlane get/setRenderAttribute LineMode mode
This attribute controls how fringe information is displayed.
$cutPlane get/setOversetRenderAttribute FringeOption mode
This attribute controls whether cells identified as holes by the IBLANK array are displayed.
$cutPlane get/setOversetRenderAttribute ShowHoleGrid mode
This attribute determines if a dot is drawn at the center of each cell identified as a hole by the IBLANK array.
$cutPlane get/setOversetRenderAttribute ShowHoleSymbol mode
This attribute controls if orphan objects are rendered for the cut plane group.
$cutPlane get/setOversetRenderAttribute ShowOrphans mode
This attribute controls if orphan donor objects are displayed for the cut plane group.
$cutPlane get/setOversetRenderAttribute ShowOrphanDonorCandidates mode
This action creates an examine object.
pw::Examine create type