are_segments_intersecting#

static GeometryOperators.are_segments_intersecting(a1: list, a2: list, b1: list, b2: list, include_collinear: bool = True) bool#

Determine if the two segments a and b are intersecting.

a1List

First point of segment a. List of [x, y] coordinates.

a2List

Second point of segment a. List of [x, y] coordinates.

b1List

First point of segment b. List of [x, y] coordinates.

b2List

Second point of segment b. List of [x, y] coordinates.

include_collinearbool

If True two segments are considered intersecting also if just one end lies on the other segment. Default is True.

Returns:
bool

True if the segments are intersecting. False otherwise.

Examples

>>> from ansys.aedt.core.modeler.geometry_operators import GeometryOperators
>>> obj = GeometryOperators()
>>> obj.are_segments_intersecting(a1=["Box1"], a2=["Box1"], b1=["Box1"], b2=["Box1"])