GeometryTree#
- class ansys.motorcad.core.geometry_tree.GeometryTree(mc=None, create_root_node=True)#
Class used to build geometry trees.
Methods
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.pop(key[, default])If the key is not found, return the default if given; otherwise, raise a KeyError.
Remove and return a (key, value) pair as a 2-tuple.
Remove Node and all descendants from tree.
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]
Attributes
Return a dict of lowercase keys and their corresponding real keys.
Get the root node of the geometry tree.