pw::Node

A node is the zero-dimensional boundary of a one-dimensional pw::Connector.  A node cannot exist without a connector.

Derives From

pw::Object

Summary
pw::NodeA node is the zero-dimensional boundary of a one-dimensional pw::Connector.
Instance Actions
getXYZThis action gets the XYZ location of this node.
getPointThis action gets the position of a node.
getConnectorsThis action gets the connectors of this node.
getDimensionsThis action gets the dimensions of this node.
getPointCountThis action gets the number of grid points in the node.
getNameThis gets the system assigned node name.

Instance Actions

getXYZ

$node getXYZ ?-grid? ?value?

This action gets the XYZ location of this node.

Parameters

-gridThis 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.
valueThis optional parameter is the integer value to get the location.  If provided, value must be 1.  The default is 1.

Returns

This action returns an XYZ vector.

See Also

getPoint, pw::Connector.getNode

Example

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

getPoint

$node getPoint ?-constrained constrainedVar? ?index?

This action gets the position of a node.

Parameters

indexThis optional parameter is the integer index of the node point to get.  If provided, index must be 1.  The default is 1.
-constrained constrainedVarThis 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.

Returns

This action returns a point giving the grid point position and this may be in the form “u v dbentity”.

See Also

getXYZ, pw::Connector.getNode

Example

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

getConnectors

$node getConnectors

This action gets the connectors of this node.

Parameters

none

Returns

This action returns a list of pw::Connector objects.

getDimensions

$node getDimensions

This action gets the dimensions of this node.

Parameters

This action has no parameters.

Returns

This action always returns the integer 1.

See Also

pw::Connector.getNode

Example

This example shows how to get the dimension of a node.  $node is referencing an existing node.

Code

$node getDimensions

Output

1

getPointCount

$node getPointCount ?-constrained constrainedVar?

This action gets the number of grid points in the node.

Parameters

-constrained constrainedVarThis 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.

Returns

This action returns 1.

See Also

pw::Connector.getNode

Example

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

getName

$node getName

This gets the system assigned node name.

Parameters

This action has no parameters.

Returns

This action returns a unique node name string.

Information

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.

Example

This example shows how to get the name of a node.  $node is referencing an existing node.

Code

puts [$node getName]

Output

Node_22
A connector is a computationally one-dimensional grid entity, defined in the parameter space of one or more end-connected curve segments.
$node getXYZ ?-grid? ?value?
This action gets the XYZ location of this node.
$node getPoint ?-constrained constrainedVar? ?index?
This action gets the position of a node.
$node getConnectors
This action gets the connectors of this node.
$node getDimensions
This action gets the dimensions of this node.
$node getPointCount ?-constrained constrainedVar?
This action gets the number of grid points in the node.
$node getName
This gets the system assigned node name.
Base type for all glyph types
An integer is a whole number.
A vector is a list of float values.
$con getNode < Begin | End | index >
This action gets a node from a connector.
A string is an array of characters.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
A point is a position either in model space or database parameter space.
Close