GeometryTree#

class ansys.motorcad.core.geometry_tree.GeometryTree(mc=None, create_root_node=True)#

Class used to build geometry trees.

Methods

GeometryTree.clear()

GeometryTree.copy()

GeometryTree.create_region(region_type[, parent])

Create a region in the tree.

GeometryTree.fromkeys(iterable[, value])

Create a new dictionary with keys from iterable and values set to value.

GeometryTree.get(key[, default])

Return the value for key if key is in the dictionary, else default.

GeometryTree.get_region(region_name)

Get a region from the tree (case-insensitive).

GeometryTree.get_regions_of_type(region_type)

Return all regions in the tree of the supplied region type.

GeometryTree.get_subtree(region)

Get all GeometryTree consisting of all nodes descended from the supplied one.

GeometryTree.items()

GeometryTree.keys()

GeometryTree.pop(key[, default])

If the key is not found, return the default if given; otherwise, raise a KeyError.

GeometryTree.popitem(/)

Remove and return a (key, value) pair as a 2-tuple.

GeometryTree.remove_branch(node)

Remove Node and all descendants from tree.

GeometryTree.remove_region(node)

Remove Node from tree, attach children of removed region to parent.

GeometryTree.setdefault(key[, default])

Insert key with a value of default if key is not in the dictionary.

GeometryTree.update([E, ]**F)

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

GeometryTree.values()

Attributes

GeometryTree.lowercase_keys

Return a dict of lowercase keys and their corresponding real keys.

GeometryTree.root_node

Get the root node of the geometry tree.