CadworkSceneObject.traverse

CadworkSceneObject.traverse(strategy='depthfirst', order='preorder')[source]

Traverse the tree from this node.

Parameters:
strategy{“depthfirst”, “breadthfirst”}, optional

The traversal strategy.

order{“preorder”, “postorder”}, optional

The traversal order. This parameter is only used for depth-first traversal.

Yields:
compas.datastructures.TreeNode

The next node in the traversal.

Raises:
ValueError

If the strategy is not "depthfirst" or "breadthfirst". If the order is not "preorder" or "postorder".