pw:: OversetNode

OGA Define

Derives From

pw::Object

Summary
OGA Define
This action gets the top-level node for the current overset assembler.
This action returns true if an input definition file exists.
This action returns the type names of the container elements for the current overset assembler.
This action returns the type name of the grid element for the current overset assembler.
This action gets a node by its display name.
This action returns a list of container nodes in the tree
This action gets the parent for this node.
This action adds a child node to the node hierarchy.
This action removes the specified node from the parent which causes the specified node to be deleted.
This action gets the number of children for this node.
This action gets the child at the given index or name.
This action gets the children for this node.
This action returns the list of possible children.
This action ensures that all children that are container nodes have unique display names.
This action returns the list of required or optional attributes for a node in the hierarchy.
This action returns the type of the attribute for a specified node.
This action gets the value of the given attribute.
This action sets the given attribute with the specified value
This action sets the grid entity linked to a node of the hierarchy.
This action gets the grid entity linked to a node of the hierarchy.
This action returns the object as an XML string.
This action saves the object to disk.
This action sets the contents of the node from an XML string or file.
This action returns a copy of the object.
This action checks whether a node is required by its parent node.
This action deletes the node and all its children.
This action deletes all children and resets all attributes of a node.
This action returns the base name for the element
This action returns the ‘display’ name for the element
This action returns the element ID
This action returns the documentation for the element
This action returns index for a value in a list of values
This action returns a list of nodes that have entity references
This action indicates if the node has body motion data assigned to it.
This action indicates if the node supports body motion data.
Set the initial location (XYZ) of the body inertial coordinate system wrt the parent inertial coordinate system
Get the initial location (XYZ) of the body inertial coordinate system wrt the parent inertial coordinate system
Set the initial rotation of the body inertial coordinate system with respect to the parent inertial coordinate system
Get the initial rotation of the body inertial coordinate system with respect to the parent inertial coordinate system
This action imports the translation, rotation, and time body motion data from a csv file.
This action clears the body motion data linked to a node of the hierarchy.
This action returns the local rotation specified for the body at the given time or position index.
This action sets the translational or rotational scale factor for the body motion data
This action gets the translational or rotational scale factor for the body motion data
This action returns the total transformation matrix corresponding to the body motion linked to a node of the hierarchy.
This action returns the local translation specified for the body at the given time or position index.
This action returns the local translation and rotation specified for the body at the given time or position index.
This action returns the number of predefined positions of the grid entities linked to a node of the hierarchy.
This action returns a list of the time stamps for each predefined position.

Static Actions

getTopLevel

pw::OversetNode getTopLevel

This action gets the top-level node for the current overset assembler.  The top-level node is created if it does not exist.

Parameters

None

Returns

This action returns the top-level pw::OversetNode object.

getDefinitionFileName

pw::OversetNode getDefinitionFileName

This action returns true if an input definition file exists.

Parameters

None.

Returns

This action returns a string representing the name of the input definition file for the current overset assembler.

getContainerNodeTypeNames

This action returns the type names of the container elements for the current overset assembler.  The container elements are used to build the hierarchical organization of component grids.

Parameters

None.

Returns

This action returns the type names <string list> of the container elements for the current overset assembler.

getGridNodeTypeName

pw::OversetNode getGridNodeTypeName

This action returns the type name of the grid element for the current overset assembler.  The grid element associates a component grid with a container element.

Parameters

None.

Returns

This action returns the type name string of the grid element for the current overset assembler.

getNodeByDisplayName

pw::OversetNode getNodeByDisplayName ?-body? displayName

This action gets a node by its display name.

Parameters

-bodyThis optional flag indicates that only body nodes should be considered.
displayNameThis parameter is a string with the display name.

Returns

This action returns a pw::OversetNode node.

Example

Code

pw::GlyphOversetNode getNodeByDisplayName ?-body?

displayName

getContainerNodes

pw::OversetNode getContainerNodes

This action returns a list of container nodes in the tree

Parameters

None.

Returns

This action returns a list of pw::OversetNode objects in the tree that are container nodes.

Instance Actions

getParent

$node getParent

This action gets the parent for this node.

Parameters

None.

Returns

This action returns a pw::OversetNode object.

addChild

$node addChild node_or_type

This action adds a child node to the node hierarchy.  The argument may be a valid type name or an existing pw::OversetNode.

Parameters

node_or_typeThis parameter is an existing pw::OversetNode object or a string specifying the new node’s element type.

Returns

This action returns the added pw::OversetNode object.

removeChild

$node removeChild child

This action removes the specified node from the parent which causes the specified node to be deleted.

Parameters

childThis parameter is an existing pw::OversetNode object (which is deleted as a result of being removed)

Returns

This action returns the parent pw::OversetNode object.

getChildCount

$node getChildCount

This action gets the number of children for this node.

Parameters

None.

Returns

This action returns the integer number of child nodes.

getChild

$node getChild ?< -index | -name >? value

This action gets the child at the given index or name.

Parameters

-indexThis optional parameter indicates that the value is the integer index of the child to be returned [1, number of child nodes].  This is the default.
-nameThis optional parameter indicates that the value is the string type name of the child to return.  If there is more than one child of the requested type, the first one will be returned.
valueThis parameter is the index or name of the child to be returned.

Returns

This action returns a pw::OversetNode object.

getChildren

$node getChildren

This action gets the children for this node.

Parameters

None.

Returns

This action returns a list pw::OversetNode of child nodes.

getUnusedChildNames

$node getUnusedChildNames

This action returns the list of possible children.  This can change as singleton nodes are added and removed from the list.

Parameters

None.

Returns

This action returns a string array of the possible child element names.

resetBodyNames

$node resetBodyNames

This action ensures that all children that are container nodes have unique display names.

Parameters

None.

Returns

This action returns nothing.

getAttributes

$node getAttributes ?< -required | -optional >?

This action returns the list of required or optional attributes for a node in the hierarchy.

Parameters

-requiredThis optional flag returns the required attributes.  This is the default.
-optionalThis optional flag returns the optional attributes.

Returns

This action returns a string array of the requested attributes.

getAttributeType

$node getAttributeType name

This action returns the type of the attribute for a specified node.

Parameters

nameattribute name

Returns

This action returns a string describing the attribute’s type.

getAttributeValue

$node getAttributeValue name

This action gets the value of the given attribute.  It may be empty.

Parameters

nameattribute name string

Returns

This action returns the value (possibly empty).  No indication is given if the attrribute is not an attribute of the element.  That should be determined by using the pw::OversetNode getAttributes call

setAttributeValue

$node setAttributeValue name value

This action sets the given attribute with the specified value

Parameters

nameattribute name
valuevalue to assign to attribute

Returns

This action returns the stored value if successfully set.

setEntity

$node setEntity entity

This action sets the grid entity linked to a node of the hierarchy.

Parameters

entityThe pw::GridEntity to link

Returns

This action returns true if successful.

getEntity

$node getEntity

This action gets the grid entity linked to a node of the hierarchy.

Parameters

None.

Returns

This action returns a pw::GridEntity object if a grid entity is associated with the node, otherwise an empty string is returned.

getXML

$node getXML

This action returns the object as an XML string.

Parameters

None.

Returns

This action returns the object as a well-formed XML string.

saveXML

$node saveXML file_name

This action saves the object to disk.

Parameters

file_nameThis parameter is a string representing the path name of the XML file to save

Returns

This action returns true if the file was saved.

setFromXML

$node setFromXML ?< -xml | -file >? xml_or_file

This action sets the contents of the node from an XML string or file.

Parameters

-xmlThis optional flag indicates that the value is a well-formed XML string.  This is the default.
-fileThis optional flag indicates that the value is a path to a file that contains well-formed XML
xml_or_fileThis parameter is a string containing XML or file path used to set the contents of the node

Returns

This action returns true if the object was updated from the XML string or file.

copy

$node copy

This action returns a copy of the object.

Parameters

None.

Returns

This action returns a copy of the node including children as new pw::OversetNode object.  The copied node does not have a parent node.

canDelete

$node canDelete

This action checks whether a node is required by its parent node.

Parameters

None.

Returns

This action returns a boolean indicating whether the node can be removed from its parent node.

delete

$node delete

This action deletes the node and all its children.

Parameters

None.

Returns

This action returns nothing.

clear

$node clear

This action deletes all children and resets all attributes of a node.

Parameters

None.

Returns

This action returns nothing.

getBaseName

$node getBaseName

This action returns the base name for the element

Parameters

None.

Returns

This action returns the display name

getDisplayName

$node getDisplayName

This action returns the ‘display’ name for the element

Parameters

None.

Returns

This action returns the display name

getElementId

$node getElementId

This action returns the element ID

Parameters

None.

Returns

The element ID

getDocumentation

$node getDocumentation

This action returns the documentation for the element

Parameters

None.

Returns

This action returns any documentation for the element

getAttributeValueIndex

$node getAttributeValueIndex name value

This action returns index for a value in a list of values

Parameters

nameThis parameter is the string attribute name
valueThis parameter is the string attribute value

Returns

This action returns the index of the given value in the list of values defined for this attribute

getEntityNodes

$node getEntityNodes

This action returns a list of nodes that have entity references

Parameters

None.

Returns

This action returns a list of pw::OversetNode nodes.

Body Motion Actions

hasBodyMotionData

$node hasBodyMotionData

This action indicates if the node has body motion data assigned to it.

Parameters

None.

Returns

This action returns a boolean where true if the node has body motion data assigned to it, false if it doesn’t.

Example

Code

$node hasBodyMotionData

supportsBodyMotionData

This action indicates if the node supports body motion data.

Parameters

None.

Returns

This action returns a boolean where true if the node supports body motion data, false if it doesn’t.

Example

Code

$node supportsBodyMotionData

setBodyInertialSystemOrigin

$node setBodyInertialSystemOrigin bodySysOrigin

Set the initial location (XYZ) of the body inertial coordinate system wrt the parent inertial coordinate system

Parameters

bodyOriginThis parameter is an xyz vector indicating the location of the body origin with respect to the parent inertial coordinate system.

Returns

This action returns nothing.

Example

Code

$node setBodySystemOrigin bodySysOrigin

getBodyInertialSystemOrigin

$node getBodyInertialSystemOrigin

Get the initial location (XYZ) of the body inertial coordinate system wrt the parent inertial coordinate system

Parameters

There are no parameters.

Returns

This action returns an xyz vector.

Example

Code

$node getBodyInertialSystemOriginn

setBodyInertialSystemRotation

$node setBodyInertialSystemRotation bodySysRotation

Set the initial rotation of the body inertial coordinate system with respect to the parent inertial coordinate system

Parameters

bodyRotationThis parameter is a xyz vector indicating the rotation of the body inertial coordinate system with respect to the parent inertial coordinate system in degrees.

Returns

This action returns nothing.

Example

Code

$node setBodyInertialSystemRotation bodySysRotation

getBodyInertialSystemRotation

$node getBodyInertialSystemRotation

Get the initial rotation of the body inertial coordinate system with respect to the parent inertial coordinate system

Parameters

There are no parameters.

Returns

This action returns an xyz vector.

Example

Code

$node getBodyInertialSystemRotation

importBodyMotionData

$node importBodyMotionData fileName

This action imports the translation, rotation, and time body motion data from a csv file.

Parameters

fileNameA string with the input file name

Returns

This action returns nothing.

Example

Code

$node importBodyMotionData fileName

clearBodyMotionData

$node clearBodyMotionData

This action clears the body motion data linked to a node of the hierarchy.

Parameters

There are no parameters.

Returns

This action returns a boolean where true if body motion was deleted and false otherwise.

Example

Code

$node clearBodyMotionData

getBodyMotionRotation

$node getBodyMotionRotation ?-scaleFactor? < -index positionIndex | -time time >

This action returns the local rotation specified for the body at the given time or position index.  The value is obtained directly from the specified body motion data for the node via importBodyMotionData and does not include motion data from parent nodes.

Parameters

-scaleFactorFlag indicating if the retrieved data should be affected by its scale factor.  If true, the data will be multiplied by the rotation scale factor, otherwise it will not.
-index positionIndexThis parameter is an integer indicating the position index.
-time timeThis parameter is a float indicating the position time.

Returns

This action returns a vector representing the rotation about the X-, Y-, and Z-axes.

Example

Code

$node getBodyMotionRotation -scaleFactor -time 2.0

setBodyMotionScaleFactor

$node setBodyMotionScaleFactor < -translation | -rotation > scaleFactor

This action sets the translational or rotational scale factor for the body motion data

Parameters

scaleFactorThis parameter is a <real> indicating the scale factor.
-translationThis optional flag indicates that the scale factor is to be applied to translational motion.
-rotationThis optional flag indicates that the scale factor is to be applied to rotational motion.

Returns

This action returns nothing.

Example

Code

$node setBodyMotionScaleFactor < -translation | -rotation >

scaleFactor

getBodyMotionScaleFactor

$node getBodyMotionScaleFactor < -translation | -rotation >

This action gets the translational or rotational scale factor for the body motion data

Parameters

-translationThis optional flag indicates that the scale factor is to be applied to translational motion.
-rotationThis optional flag indicates that the scale factor is to be applied to rotational motion.

Returns

This action returns the <real> scale factor.

Example

Code

$node getBodyMotionScaleFactor < -translation | -rotation >

getBodyMotionTransformMatrix

$node getBodyMotionTransformMatrix < -index positionIndex | -time time > ?topNode?

This action returns the total transformation matrix corresponding to the body motion linked to a node of the hierarchy.

Parameters

-index positionIndexThis parameter is an integer indicating the position index.
-time timeThis parameter is a float indicating the position time.
topNodeThis optional parameter is a string indicating the display name of a parent body.  The transformation matrix will be calculated relative to the inertial frame of the parent body.  If not specified, the transformation will be calculated relative to the global inertial frame of reference.

Returns

This action returns a <xformmatrix>.

Example

Code

$node getBodyMotionTransformMatrix -index 2 $ogaParent

getBodyMotionTranslation

$node getBodyMotionTranslation ?-scaleFactor? < -index positionIndex | -time time >

This action returns the local translation specified for the body at the given time or position index.  The value is obtained directly from the specified body motion data for the node via importBodyMotionData and does not include motion data from parent nodes.

Parameters

-scaleFactorFlag indicating if the retrieved data should be affected by its scale factor.  If true, the data will be multiplied by the translation scale factor, otherwise it will not.
-index positionIndexThis parameter is an integer indicating the position index.
-time timeThis parameter is a float indicating the position time.

Returns

This action returns a vector representing the translation X-, Y-, and Z-components.

Example

Code

$node getBodyMotionTranslation -scaleFactor -time 2.0

getBodyMotionData

$node getBodyMotionData ?-scaleFactor? < -index positionIndex | -time time | -all >

This action returns the local translation and rotation specified for the body at the given time or position index.  The value is obtained directly from the specified body motion data for the node via importBodyMotionData and does not include motion data from parent nodes.  If the -all flag is specified, this function returns an array of arrays with the all the translation, rotation, and time body motion data.

Parameters

-scaleFactorFlag indicating if the retrieved data should be affected by their respective scale factors.  If true, the data will be multiplied by the scale factors, otherwise it will not.
-index positionIndexThis parameter is an integer indicating the position index.  -time time- This parameter is a float indicating the position time.
-allFlag indicating that all the body motion data is required.

Returns

This action returns a list consisting of three elements.  The forst two elements are a list of xyz vectors indicating the specified body translation and rotation respectively, the third element is a list of <real> values indicating the specified motion times.

Example

Code

$node getBodyMotionData -scaleFactor -time 2.0

getBodyMotionStepsCount

$node getBodyMotionStepsCount

This action returns the number of predefined positions of the grid entities linked to a node of the hierarchy.

Parameters

There are no parameters.

Returns

This action returns an integer.

Example

Code

$node getBodyMotionStepsCount

getBodyMotionTimes

$node getBodyMotionTimes

This action returns a list of the time stamps for each predefined position.

Parameters

There are no parameters.

Returns

This action returns a list of <real> values.

Example

Code

set i 1
puts "Predefined times:"
foreach t [$node getBodyMotionTimes] {
puts " $i: $t"
incr i
}
pw::OversetNode getTopLevel
This action gets the top-level node for the current overset assembler.
pw::OversetNode getDefinitionFileName
This action returns true if an input definition file exists.
pw::OversetNode getGridNodeTypeName
This action returns the type name of the grid element for the current overset assembler.
pw::OversetNode getNodeByDisplayName ?-body? displayName
This action gets a node by its display name.
pw::OversetNode getContainerNodes
This action returns a list of container nodes in the tree
$node getParent
This action gets the parent for this node.
$node addChild node_or_type
This action adds a child node to the node hierarchy.
$node removeChild child
This action removes the specified node from the parent which causes the specified node to be deleted.
$node getChildCount
This action gets the number of children for this node.
$node getChild ?< -index | -name >? value
This action gets the child at the given index or name.
$node getChildren
This action gets the children for this node.
$node getUnusedChildNames
This action returns the list of possible children.
$node resetBodyNames
This action ensures that all children that are container nodes have unique display names.
$node getAttributes ?< -required | -optional >?
This action returns the list of required or optional attributes for a node in the hierarchy.
$node getAttributeType name
This action returns the type of the attribute for a specified node.
$node getAttributeValue name
This action gets the value of the given attribute.
$node setAttributeValue name value
This action sets the given attribute with the specified value
$node setEntity entity
This action sets the grid entity linked to a node of the hierarchy.
$node getEntity
This action gets the grid entity linked to a node of the hierarchy.
$node getXML
This action returns the object as an XML string.
$node saveXML file_name
This action saves the object to disk.
$node setFromXML ?< -xml | -file >? xml_or_file
This action sets the contents of the node from an XML string or file.
A string is an array of characters.
$node copy
This action returns a copy of the object.
$node canDelete
This action checks whether a node is required by its parent node.
$node delete
This action deletes the node and all its children.
$node clear
This action deletes all children and resets all attributes of a node.
$node getBaseName
This action returns the base name for the element
$node getDisplayName
This action returns the ‘display’ name for the element
$node getElementId
This action returns the element ID
$node getDocumentation
This action returns the documentation for the element
$node getAttributeValueIndex name value
This action returns index for a value in a list of values
$node getEntityNodes
This action returns a list of nodes that have entity references
$node hasBodyMotionData
This action indicates if the node has body motion data assigned to it.
$node setBodyInertialSystemOrigin bodySysOrigin
Set the initial location (XYZ) of the body inertial coordinate system wrt the parent inertial coordinate system
$node getBodyInertialSystemOrigin
Get the initial location (XYZ) of the body inertial coordinate system wrt the parent inertial coordinate system
$node setBodyInertialSystemRotation bodySysRotation
Set the initial rotation of the body inertial coordinate system with respect to the parent inertial coordinate system
$node getBodyInertialSystemRotation
Get the initial rotation of the body inertial coordinate system with respect to the parent inertial coordinate system
$node importBodyMotionData fileName
This action imports the translation, rotation, and time body motion data from a csv file.
$node clearBodyMotionData
This action clears the body motion data linked to a node of the hierarchy.
$node getBodyMotionRotation ?-scaleFactor? < -index positionIndex | -time time >
This action returns the local rotation specified for the body at the given time or position index.
$node setBodyMotionScaleFactor < -translation | -rotation > scaleFactor
This action sets the translational or rotational scale factor for the body motion data
$node getBodyMotionScaleFactor < -translation | -rotation >
This action gets the translational or rotational scale factor for the body motion data
$node getBodyMotionTransformMatrix < -index positionIndex | -time time > ?topNode?
This action returns the total transformation matrix corresponding to the body motion linked to a node of the hierarchy.
$node getBodyMotionTranslation ?-scaleFactor? < -index positionIndex | -time time >
This action returns the local translation specified for the body at the given time or position index.
$node getBodyMotionData ?-scaleFactor? < -index positionIndex | -time time | -all >
This action returns the local translation and rotation specified for the body at the given time or position index.
$node getBodyMotionStepsCount
This action returns the number of predefined positions of the grid entities linked to a node of the hierarchy.
$node getBodyMotionTimes
This action returns a list of the time stamps for each predefined position.
Base type for all glyph types
OGA Define
An integer is a whole number.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
A vector is a list of float values.
A float is a fractional number.