point_segment_distance#

static GeometryOperators.point_segment_distance(p: list, a: list, b: list) float#

Calculate the distance between a point p and a segment defined by two points a and b.

Parameters:
pList

List of [x, y, z] coordinates for the reference point p.

aList

List of [x, y, z] coordinates for the first point of the segment.

bList

List of [x, y, z] coordinates for the second point of the segment.

Returns:
float

Distance between the point and the segment.

Examples

>>> from ansys.aedt.core.modeler.geometry_operators import GeometryOperators
>>> obj = GeometryOperators()
>>> obj.point_segment_distance(p=[0, 0, 0], a=[1, 0, 0], b=[0, 1, 0])