Skip to content

test_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXldtest_self_intersection_xldtest_self_intersection_xld🔗

Short description🔗

test_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXldtest_self_intersection_xldtest_self_intersection_xld — Test XLD contours or polygons for self intersection.

Signature🔗

test_self_intersection_xld( xld XLD, string CloseXLD, out number DoesIntersect )void TestSelfIntersectionXld( const HObject& XLD, const HTuple& CloseXLD, HTuple* DoesIntersect )static void HOperatorSet.TestSelfIntersectionXld( HObject XLD, HTuple closeXLD, out HTuple doesIntersect )def test_self_intersection_xld( xld: HObject, close_xld: str ) -> Sequence[int]

def test_self_intersection_xld_s( xld: HObject, close_xld: str ) -> intHerror 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 )

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

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

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

HTuple HXLD.TestSelfIntersectionXld( string closeXLD )

Description🔗

test_self_intersection_xldTestSelfIntersectionXld tests whether the input contours or polygons in XLDXLDxld intersect or touch themselves. The output array DoesIntersectdoesIntersectdoes_intersect contains a 11 if the corresponding input contour or polygon intersects or touches itself and 00 otherwise.

If the input parameter CloseXLDcloseXLDclose_xld is set to '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.

Attention🔗

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🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

Parameters🔗

XLDXLDxld (input_object) xld(-array) → objectHObjectHXLDHObjectHobject

Input contours or polygons.

CloseXLDcloseXLDclose_xld (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Should the input contours or polygons be closed first?

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

DoesIntersectdoesIntersectdoes_intersect (output_control) number(-array) → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

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

Module🔗

Foundation