MeasurementTools#

class ansys.geometry.core.tools.measurement_tools.MeasurementTools(grpc_client: ansys.geometry.core.connection.GrpcClient, _internal_use: bool = False)#

Measurement tools for PyAnsys Geometry.

Parameters:
grpc_clientGrpcClient

gRPC client to use for the measurement tools.

_internal_usebool, optional

Internal flag to prevent direct instantiation by users. This parameter is for internal use only.

Raises:
GeometryRuntimeError

If the class is instantiated directly by users instead of through the modeler.

Notes

This class should not be instantiated directly. Use modeler.measurement_tools instead.

Overview#

min_distance_between_objects

Find the gap between two bodies.

Import detail#

from ansys.geometry.core.tools.measurement_tools import MeasurementTools

Method detail#

MeasurementTools.min_distance_between_objects(object1: ansys.geometry.core.designer.body.Body | ansys.geometry.core.designer.face.Face | ansys.geometry.core.designer.edge.Edge, object2: ansys.geometry.core.designer.body.Body | ansys.geometry.core.designer.face.Face | ansys.geometry.core.designer.edge.Edge) Gap#

Find the gap between two bodies.

Parameters:
object1Union[Body, Face, Edge]

First object to measure the gap.

object2Union[Body, Face, Edge]

Second object to measure the gap.

Returns:
Gap

Gap between two bodies.

Warning

This method is only available starting on Ansys release 24R2. Also, using Face and Edge objects as inputs requires a minimum Ansys release of 25R2.