pw:: Node

Node type

Derives From

pw::Object

Summary
Node type
This action gets the XYZ location of this node.
This action gets the position of a node.
This action gets the connectors of this node.
This action gets the dimensions of this node.
This action gets the number of grid points in the node.
This 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 with the range [1, 1].  This is the default.
valueThis optional parameter is the value to get the position.  If provided, value must be 1.  The default is 1.

Returns

This action returns an XYZ vector.

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 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”.

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.

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

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
$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 string is an array of characters.
A point is a position either in model space or database parameter space.
Connector type