RTree#

class ansys.edb.core.geometry.r_tree.RTree(msg)#

Provides the base RTree class.

Methods

RTree.connected_geometry(rtree_obj, ...)

Find the connected geometries.

RTree.create([tolerance])

Create an RTree.

RTree.delete(rtree_obj)

Delete the RTree from a given RTree object.

RTree.empty()

Determine if the RTree is emppty (contains no geometry).

RTree.increment_visit()

Increment the visit count, effectively marking all items in the tree as unvisited.

RTree.insert(rtree_obj)

Insert an RTree object from a given RTree object.

RTree.is_visited(rtree_obj)

Determine whether an RTree object has been visited.

RTree.nearest_neighbor(rtree_obj)

Find the nearest neighbor of a given RTree object.

RTree.search(box, bb_search)

Search all objects intersecting a given box.

RTree.touching_geometry(rtree_obj, ...)

Find all geometries touching an RTree object.

RTree.visit(rtree_obj)

Increment the count of a given RTree object.

Attributes

RTree.connected_geometry_sets

list of list of RTreeObj: Connected geometry sets of an RTree in this form: (ids, sizes).

RTree.extent

tuple of [:class:.PointData, :class:.PointData]: Bounding box for the contents of the RTree.

RTree.get_visit

int: Visit count for the R-tree.

RTree.id

int: Unique ID of the EDB object.

RTree.is_null

bool: Flag indicating if the object exists in the database.

RTree.msg

EDBObjMessage: Protobuf message that represents the object's ID.