PrepareTools#

class ansys.geometry.core.tools.prepare_tools.PrepareTools(grpc_client: ansys.geometry.core.connection.GrpcClient)#

Prepare tools for PyAnsys Geometry.

Parameters:
grpc_clientGrpcClient

Active supporting geometry service instance for design modeling.

Overview#

extract_volume_from_faces

Extract a volume from input faces.

extract_volume_from_edge_loops

Extract a volume from input edge loops.

share_topology

Share topology between the chosen bodies.

Import detail#

from ansys.geometry.core.tools.prepare_tools import PrepareTools

Method detail#

PrepareTools.extract_volume_from_faces(sealing_faces: list[ansys.geometry.core.designer.face.Face], inside_faces: list[ansys.geometry.core.designer.face.Face]) list[ansys.geometry.core.designer.body.Body]#

Extract a volume from input faces.

Creates a volume (typically a flow volume) from a list of faces that seal the volume and one or more faces that define the wetted surface (inside faces of the solid).

Parameters:
sealing_faceslist[Face]

List of faces that seal the volume.

inside_faceslist[Face]

List of faces that define the interior of the solid.

Returns:
list[Body]

List of created bodies.

PrepareTools.extract_volume_from_edge_loops(sealing_edges: list[ansys.geometry.core.designer.edge.Edge], inside_faces: list[ansys.geometry.core.designer.face.Face]) list[ansys.geometry.core.designer.body.Body]#

Extract a volume from input edge loops.

Creates a volume (typically a flow volume) from a list of edge loops that seal the volume. and one or more faces that define the wetted surface (inside faces of the solid).

Parameters:
sealing_edgeslist[Edge]

List of faces that seal the volume.

inside_faceslist[Face]

List of faces that define the interior of the solid (Not always necessary).

Returns:
list[Body]

List of created bodies.

PrepareTools.share_topology(bodies: list[ansys.geometry.core.designer.body.Body], tol: ansys.geometry.core.typing.Real = 0.0, preserve_instances: bool = False) bool#

Share topology between the chosen bodies.

Parameters:
bodieslist[Body]

List of bodies to share topology between.

tolReal

Maximum distance between bodies.

preserve_instancesbool

Whether instances are preserved.

Returns:
bool

True if successful, False if failed.