Rule type
pw:: | Rule type |
Static Actions | |
create | This action creates a new rule object. |
getAll | This action gets a list of all of the current rules. |
getAllowableEntityTypes | This action gets a list of allowable entity types supported by the specified function. |
getFunctionNames | This action gets a list of allowable function names. |
Static Attributes | |
setViolationLimit | This attribute is the maximum number of cell or point locations that will be reported in violation of any rule. |
Instance Attributes | |
Global | This attribute controls whether the rule is a global rule. |
Description | This attribute is a description of the rule. |
Color | This attribute is the color of the rule. |
Visibility | This attribute controls whether rule violations are displayed. |
Instance Actions | |
delete | This action deletes this rule. |
isDefaultDescription | This action checks to see if the description is the default description. |
setCriterion | This action sets the measurement to be used, the comparison operand, and the limit to check. |
getCriterion | This action gets the measurement to used, the comparison operand, and the limit being checked. |
add | This action adds an entity to the rule. |
remove | This action removes an entity from the rule (can only call for non-global rules). |
contains | This action checks to see if a rule contains a specified entity. |
getEntityCount | This action gets the number of entities monitored by the rule and optionally gets the list of entities. |
getOutdatedEntityCount | This action gets the number of outdated entities monitored by the rule and optionally gets the list of entities. |
getFailingEntityCount | This action gets the number of failing entities monitored by the rule and optionally gets the list of entities. |
evaluate | This action evaluates any assigned entities that have not been evaluated or that have changed since the last evaluation. |
getEntityViolations | This action gets the number of rule violations for a specific entity. |
reset | This action resets the criterion and removes all entities from the rule. |
getAllowableEntityTypes | This action gets a list of allowable entity types currently supported by the rule based on the specified criterion and any entities already added. |
pw::Rule create
This action creates a new rule object.
None
This action returns a new pw::Rule object.
pw::Rule getAll
This action gets a list of all of the current rules.
None
This action returns a list of pw::Rule objects.
pw::Rule getAllowableEntityTypes function
This action gets a list of allowable entity types supported by the specified function.
function | This parameter is the type of measurement to be used BlockAspectRatio | BlockCentroidX | BlockCentroidY | BlockCentroidZ | BlockComponentVolume | BlockJacobian | BlockLengthI | BlockLengthJ | BlockLengthK | BlockLengthRatioI | BlockLengthRatioJ | BlockLengthRatioK | BlockMaximumAngle | BlockMinimumAngle | BlockSkewCentroid | BlockSkewEquiangle | BlockSkewEquivolume | BlockSmoothnessI | BlockSmoothnessJ | BlockSmoothnessK | BlockVolume | BlockVolumeRatio | BlockNone | BlockCellType | ConnectorLengthI | ConnectorLengthRatioI | ConnectorOnDatabase | ConnectorSmoothnessI | DomainArea | DomainAreaRatio | DomainAspectRatio | DomainCentroidX | DomainCentroidY | DomainCentroidZ | DomainDatabaseDeviation | DomainRelativeDeviation | DomainLengthI | DomainLengthJ | DomainLengthRatioI | DomainLengthRatioJ | DomainMaximumAngle | DomainMinimumAngle | DomainOnDatabase | DomainSkewEquiangle | DomainSkewEquiarea | DomainSmoothnessI | DomainSmoothnessJ | DomainWarp | FaceWallOrthogonality | FaceWallSpacing. |
This action returns a list of strings representing the supported entity types.
pw::Rule getFunctionNames
This action gets a list of allowable function names.
None
This action returns a list of strings representing the supported function names.
pw::Rule get/setViolationLimit limit
This attribute is the maximum number of cell or point locations that will be reported in violation of any rule. This does not affect the count reported by getEntityViolations. It only affects the number of actual locations reported.
This attribute is a integer with range [1, infinity)
1000
$rule get/setGlobal global
This attribute controls whether the rule is a global rule.
This attribute is a boolean, with true meaning that rule is global.
The default value for this attribute is false.
If a global rule has this attribute set to false, the rule will retain the current entities but will not be automatically updated with any future entities, although they can still be added manually. A non-global rule cannot be made global if the function is not defined.
$rule get/setDescription description
This attribute is a description of the rule.
This attribute is a string.
The default value for this attribute is generated based on the type of rule created.
$rule get/setColor color
This attribute is the color of the rule.
This attribute is a color.
The default value of this attribute is 0x00ff0000.
$rule get/setVisibility value
This attribute controls whether rule violations are displayed.
This attribute is a boolean value, with true meaning that element violations will be displayed.
The default for this attribute is true.
$rule isDefaultDescription
This action checks to see if the description is the default description.
None
This action returns a boolean, which is true if the rule’s description is the default value, false if the description has been set by the user.
$rule setCriterion function operand limit
This action sets the measurement to be used, the comparison operand, and the limit to check.
function | This parameter is the type of measurement to be used BlockAspectRatio | BlockCentroidX | BlockCentroidY | BlockCentroid Z | BlockComponentVolume | BlockJacobian | BlockLengthI | BlockLengthJ | BlockLengthK | BlockLengthRatioI | BlockLengthRatioJ | BlockLengthRatioK | BlockMaximumAngle | BlockMinimumAngle | BlockSkewCentroid | BlockSkewEquiangle | BlockSkewEquivolume | BlockSmoothnessI | BlockSmoothnessJ | BlockSmoothnessK | BlockVolume | BlockVolumeRatio | BlockNone | BlockCellType | ConnectorLengthI | ConnectorLengthRatioI | ConnectorOnDatabase | ConnectorSmoothnessI | DomainArea | DomainAreaRatio | DomainAspectRatio | DomainCentroidX | DomainCentroidY | DomainCentroidZ | DomainLengthI | DomainLengthJ | DomainLengthRatioI | DomainLengthRatioJ | DomainMaximumAngle | DomainMinimumAngle | DomainOnDatabase | DomainSkewEquiangle | DomainSkewEquiarea | DomainSmoothnessI | DomainSmoothnessJ | DomainWarp | FaceWallOrthogonality | FaceWallSpacing. |
operand | This parameter is the comparison operand to be used Equal | NotEqual | LessThan | LessThanEqual | GreaterThan | GreaterThanEqual. |
limit | This parameter is the float value against which the results are compared. |
This action returns boolean, which is true if the criterion was successfully set.
$rule add entity
This action adds an entity to the rule.
entity | This parameter is the pw::GridEntity object to add. The acceptable types may be constrained by the criterion or by previously added entities (can only add to non-global rules). |
This action returns boolean, which is true if the entity was successfully added.
$rule remove entity
This action removes an entity from the rule (can only call for non-global rules).
entity | This parameter is the pw::GridEntity object to remove. |
This action returns boolean, which is true if the entity was successfully removed.
$rule contains entity
This action checks to see if a rule contains a specified entity.
entity | This parameter is the pw::GridEntity object to check. |
This action returns boolean, which is true if the entity is monitored by the rule.
$rule getEntityCount ?-entities entsVar?
This action gets the number of entities monitored by the rule and optionally gets the list of entities.
-entities entsVar | This parameter is a string variable name which will be assigned with the list of pw::GridEntity objects monitored by the rule. |
This action returns the integer number of entities.
$rule getOutdatedEntityCount ?-entities entsVar?
This action gets the number of outdated entities monitored by the rule and optionally gets the list of entities. Outdated entities are entities that have had their points modified since the last rule evaluation.
-entities entsVar | This parameter is a string variable name which will be assigned with the list of pw::GridEntity objects monitored by the rule. |
This action returns the integer number of outdated entities.
$rule getFailingEntityCount ?-entities entsVar?
This action gets the number of failing entities monitored by the rule and optionally gets the list of entities. Failing entities are entities that had cells or points that violated the rule at the time of the last rule evaluation.
-entities entsVar | This parameter is a string variable name which will be assigned with the list of pw::GridEntity objects monitored by the rule. |
This action returns the integer number of failing entities.
$rule getEntityViolations ?-locations locationsVar? ?-percent percentVar? entity
This action gets the number of rule violations for a specific entity. It returns the total count, regardless of the value set by setViolationLimit. Optionally, a list of the cell or points violating the rule can be retrieved. This list is limited by the number specified with setViolationLimit.
-locations locationsVar | This parameter is a string variable name that will be assigned with a list of violation locations (the length of this list may be smaller than the value returned by the function depending on the limit set in setViolationLimit). Each location is a list of 3 integer values regardless of the entity type. For connectors, the first value is the point or cell location and the remaining 2 values are ignored. For structured domains, the first 2 values represent the IJ values. For unstructured domains and blocks, the first value represents the cell or point index. For structured blocks, the three values represent the IJK location. For prism blocks, the first value represents the cell or point location within the layer, and the last value represents the layer. |
-percent percentVar | This parameter is a string variable name that will be assigned with the fraction of cells or points that are in violation of the rule. The value will be in the range [0.0, 1.0]. |
This action returns the integer number of rule violations.
pw::Rule getAllowableEntityTypes function
This action gets a list of allowable entity types currently supported by the rule based on the specified criterion and any entities already added.
NOne
This action returns a list of strings representing the supported entity types.
This action creates a new rule object.
pw::Rule create
This action gets a list of all of the current rules.
pw::Rule getAll
This action gets a list of allowable entity types supported by the specified function.
pw::Rule getAllowableEntityTypes function
This action gets a list of allowable function names.
pw::Rule getFunctionNames
This attribute is the maximum number of cell or point locations that will be reported in violation of any rule.
pw::Rule get/setViolationLimit limit
This attribute controls whether the rule is a global rule.
$rule get/setGlobal global
This attribute is a description of the rule.
$rule get/setDescription description
This attribute is the color of the rule.
$rule get/setColor color
This attribute controls whether rule violations are displayed.
$rule get/setVisibility value
This action deletes this rule.
$rule delete
This action checks to see if the description is the default description.
$rule isDefaultDescription
This action sets the measurement to be used, the comparison operand, and the limit to check.
$rule setCriterion function operand limit
This action gets the measurement to used, the comparison operand, and the limit being checked.
$rule getCriterion
This action adds an entity to the rule.
$rule add entity
This action removes an entity from the rule (can only call for non-global rules).
$rule remove entity
This action checks to see if a rule contains a specified entity.
$rule contains entity
This action gets the number of entities monitored by the rule and optionally gets the list of entities.
$rule getEntityCount ?-entities entsVar?
This action gets the number of outdated entities monitored by the rule and optionally gets the list of entities.
$rule getOutdatedEntityCount ?-entities entsVar?
This action gets the number of failing entities monitored by the rule and optionally gets the list of entities.
$rule getFailingEntityCount ?-entities entsVar?
This action evaluates any assigned entities that have not been evaluated or that have changed since the last evaluation.
$rule evaluate
This action gets the number of rule violations for a specific entity.
$rule getEntityViolations ?-locations locationsVar? ?-percent percentVar? entity
This action resets the criterion and removes all entities from the rule.
$rule reset