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
Truetwo segments are considered intersecting also if just one end lies on the other segment. Default isTrue.
- Returns:
- bool
Trueif the segments are intersecting.Falseotherwise.
Examples
>>> from ansys.aedt.core.modeler.geometry_operators import GeometryOperators >>> obj = GeometryOperators() >>> obj.are_segments_intersecting(a1=["Box1"], a2=["Box1"], b1=["Box1"], b2=["Box1"])