intersection_line_box_xy

compas.geometry.intersection_line_box_xy(line, box, tol=1e-06)[source]

Compute the intersection between a line and a box in the XY plane.

Parameters
  • line (list of 2 points or compas.geometry.Line)

  • box (list of 4 points)

  • tol (float, optional) – A tolerance value for point comparison. Default is 1e-6.

Returns

list – A list of at most two intersection points.