point_segment_distance#
- static GeometryOperators.point_segment_distance(p: list, a: list, b: list) float#
Calculate the distance between a point
pand a segment defined by two pointsaandb.- Parameters:
- p
List List of
[x, y, z]coordinates for the reference pointp.- a
List List of
[x, y, z]coordinates for the first point of the segment.- b
List List of
[x, y, z]coordinates for the second point of the segment.
- p
- Returns:
floatDistance 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])