test_self_intersection_xldtest_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXldtest_self_intersection_xld (Operator)


test_self_intersection_xldtest_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXldtest_self_intersection_xld — Test XLD contours or polygons for self intersection.


test_self_intersection_xld(XLD : : CloseXLD : DoesIntersect)

Herror test_self_intersection_xld(const Hobject XLD, const char* CloseXLD, Hlong* DoesIntersect)

Herror T_test_self_intersection_xld(const Hobject XLD, const Htuple CloseXLD, Htuple* DoesIntersect)

void TestSelfIntersectionXld(const HObject& XLD, const HTuple& CloseXLD, HTuple* DoesIntersect)

HTuple HXLD::TestSelfIntersectionXld(const HString& CloseXLD) const

HTuple HXLD::TestSelfIntersectionXld(const char* CloseXLD) const

HTuple HXLD::TestSelfIntersectionXld(const wchar_t* CloseXLD) const   (Windows only)

static void HOperatorSet.TestSelfIntersectionXld(HObject XLD, HTuple closeXLD, out HTuple doesIntersect)

HTuple HXLD.TestSelfIntersectionXld(string closeXLD)

def test_self_intersection_xld(xld: HObject, close_xld: str) -> Sequence[int]

def test_self_intersection_xld_s(xld: HObject, close_xld: str) -> int


test_self_intersection_xldtest_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXldTestSelfIntersectionXldtest_self_intersection_xld tests whether the input contours or polygons in XLDXLDXLDXLDXLDxld intersect or touch themselves. The output array DoesIntersectDoesIntersectDoesIntersectDoesIntersectdoesIntersectdoes_intersect contains a 1 if the corresponding input contour or polygon intersects or touches itself and 0 otherwise.

If the input parameter CloseXLDCloseXLDCloseXLDCloseXLDcloseXLDclose_xld is set to 'true'"true""true""true""true""true", open contours or polygons are closed before the check is performed by simply connecting the first and the last contour or polygon point with a line segment.


A contour or polygon touches itself if a contour or polygon point lies exactly on a contour or polygon segment. However, whether a point lies exactly on a contour or polygon segment or not can practically not be decided because of numerical reasons.

Execution Information


XLDXLDXLDXLDXLDxld (input_object)  xld(-array) objectHXLDHObjectHXLDHobject

Input contours or polygons.

CloseXLDCloseXLDCloseXLDCloseXLDcloseXLDclose_xld (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Should the input contours or polygons be closed first?

Default value: 'true' "true" "true" "true" "true" "true"

List of values: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

DoesIntersectDoesIntersectDoesIntersectDoesIntersectdoesIntersectdoes_intersect (output_control)  number(-array) HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

1 for contours or polygons with self intersection and 0 otherwise.