Cog3DCoordinateSpaceTree AddTree Method Cognex VisionPro 9.7
Add a tree of coordinate spaces to the given parentSpaceName of this tree using the supplied parentFromTreeRoot transform. The tree is added by reference, so any changes to it will be visible to clients of both trees.

Namespace: Cognex.VisionPro3D
Assembly: Cognex.VisionPro3D.Core (in Cognex.VisionPro3D.Core.dll) Version: 73.0.0.0
Syntax

public void AddTree(
	string parentSpaceName,
	Cog3DCoordinateSpaceTree treeToAdd,
	ICog3DTransform parentFromTreeRoot,
	CogAddSpaceConstants duplicateHandling
)

Parameters

parentSpaceName
Type: System String

A valid nonqualified or fully-qualified space name that indicates the parent space.

treeToAdd
Type: Cognex.VisionPro3D Cog3DCoordinateSpaceTree

The coordinate space tree to add to the given parentSpaceName.

parentFromTreeRoot
Type: Cognex.VisionPro3D ICog3DTransform

A 3D transformation that transforms points from the root of the space tree you are adding to the parent space.

duplicateHandling
Type: Cognex.VisionPro CogAddSpaceConstants

A CogAddSpaceConstants value that specifies what do if the parent coordinate space already contains an immediate child with the same name as the root of treeToAdd. The options are to return an error, replace the named child with the given tree, or do nothing.

Events

Exceptions

ExceptionCondition
ArgumentNullException

treeToAdd or parentFromTreeRoot is null.

ArgumentOutOfRangeException

The duplicateHandling value is not a member of CogAddSpaceConstants.

CogSpaceTreeDuplicateChildNameException

The root name of treeToAdd is already a child of parentSpaceName and the duplicateHandling argument is DuplicateIsError .

CogSpaceTreeInvalidNameSyntaxException

parentSpaceName is not a legal space name.

CogSpaceTreeNameNotUniqueException

parentSpaceName is a nonqualified space name and more than one instance of it exists in this tree.

CogSpaceTreeNameNotInTreeException

parentSpaceName does not exist in this tree.

Remarks

Adds a tree of coordinate spaces to the given parent space name of this tree. You must also supply a transformation that defines the relationship between the parent space and the root of the new spaces.

Trees are added by-reference. If you copy the parent tree, the copy contains an additional reference to the supplied tree. You must avoid creating new trees that contain circular references to other coordinate space trees.

See Also