A node is the zero-dimensional boundary of a one-dimensional pw::Connector. A node cannot exist without a connector.
pw:: | A node is the zero-dimensional boundary of a one-dimensional pw::Connector. |
Instance Actions | |
getXYZ | This action gets the XYZ location of this node. |
getPoint | This action gets the position of a node. |
getConnectors | This action gets the connectors of this node. |
getDimensions | This action gets the dimensions of this node. |
getPointCount | This action gets the number of grid points in the node. |
getName | This gets the system assigned node name. |
$node getXYZ ?-grid? ?value?
This action gets the XYZ location of this node.
-grid | This optional parameter is the notification to get the position at a grid point. The value is an integer index in the range [1, 1]. This is the default. |
value | This optional parameter is the integer value to get the location. If provided, value must be 1. The default is 1. |
This action returns an XYZ vector.
getPoint, pw::Connector.getNode
This example shows how to get the XYZ vector of a grid point in a node. $node references an existing node.
Code
# these four actions are equivalent puts [$node getXYZ] puts [$node getXYZ -grid] puts [$node getXYZ -grid 1] puts [$node getXYZ 1]
Output
3.75 2.0 0.0 3.75 2.0 0.0 3.75 2.0 0.0 3.75 2.0 0.0
$node getPoint ?-constrained constrainedVar? ?index?
This action gets the position of a node.
index | This optional parameter is the integer index of the node point to get. If provided, index must be 1. The default is 1. |
-constrained constrainedVar | This optional parameter is the string name of a variable. If the grid point is database constrained, this variable is set to boolean true. If not constrained, it is set to false. |
This action returns a point giving the grid point position and this may be in the form “u v dbentity”.
This example shows how to get the point of a node grid point. $node is referencing an existing node.
Code
# these two actions are equivalent puts [$node getPoint] puts [$node getPoint 1] # these two actions are equivalent puts [$node getPoint -constrained isDb] puts "isDb=$isDb" puts [$node getPoint -constrained isDb 1] puts "isDb=$isDb"
Output
3.75 2.0 0.0 3.75 2.0 0.0 3.75 2.0 0.0 isDb=0 3.75 2.0 0.0 isDb=0
$node getConnectors
This action gets the connectors of this node.
none
This action returns a list of pw::Connector objects.
$node getDimensions
This action gets the dimensions of this node.
This action has no parameters.
This action always returns the integer 1.
This example shows how to get the dimension of a node. $node is referencing an existing node.
Code
$node getDimensions
Output
1
$node getPointCount ?-constrained constrainedVar?
This action gets the number of grid points in the node.
-constrained constrainedVar | This optional parameter is a string variable name to receive the number of node points that are constrained to a database entity. The number returned will be 0 or 1. |
This action returns 1.
This example shows how to find the point count in a node, as well as the point count that is constrained to database entities. $node is referencing an existing node.
Code
puts [$node getPointCount -constrained onDB] puts $onDB
Output
1 0
$node getName
This gets the system assigned node name.
This action has no parameters.
This action returns a unique node name string.
This action is provided to be consistent with the block, domain and connector getName actions. However, since a pw::Node object is not a grid entity, you cannot set the name of a node and you cannot use “pw::Grid getByName” to get a node.
This example shows how to get the name of a node. $node is referencing an existing node.
Code
puts [$node getName]
Output
Node_22
This action gets the XYZ location of this node.
$node getXYZ ?-grid? ?value?
This action gets the position of a node.
$node getPoint ?-constrained constrainedVar? ?index?
This action gets the connectors of this node.
$node getConnectors
This action gets the dimensions of this node.
$node getDimensions
This action gets the number of grid points in the node.
$node getPointCount ?-constrained constrainedVar?
This gets the system assigned node name.
$node getName
This action gets a node from a connector.
$con getNode < Begin | End | index >