pymead.core.constraint_equations.measure_point_line_distance_signed#

measure_point_line_distance_signed(x1: float, y1: float, x2: float, y2: float, x3: float, y3: float)[source]#

Measures the signed distance from a point \((x_3, y_3)\) to a line defined by two points: \((x_1, y_1)\) and \((x_2, y_2)\). This signed version is used in the point-line symmetry constraint because a perpendicular constraint does not necessarily prevent the GCS from moving the symmetric point to the same side of the line as the target point.

Parameters:
  • x1 (float) – x-coordinate of the line’s start point

  • y1 (float) – y-coordinate of the line’s start point

  • x2 (float) – x-coordinate of the line’s end point

  • y2 (float) – y-coordinate of the line’s end point

  • x3 (float) – x-coordinate of the target point

  • y3 (float) – y-coordinate of the target point

Returns:

Distance from the target point to the line

Return type:

float