test_self_intersection_xld — 测试 XLD 轮廓或多边形的自相交。
test_self_intersection_xld(XLD : : CloseXLD : DoesIntersect)
test_self_intersection_xld tests whether the input contours
or polygons in XLD intersect or touch themselves. The output array
DoesIntersect contains a 1 if the corresponding
input contour or polygon intersects or touches itself and 0
otherwise.
If the input parameter CloseXLD is set to '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.
XLD (输入对象) xld(-array) → object
Input contours or polygons.
CloseXLD (输入控制) string → (string)
Should the input contours or polygons be closed first?
默认值: 'true'
值列表: 'false', 'true'
DoesIntersect (输出控制) number(-array) → (integer)
1 for contours or polygons with self intersection and 0 otherwise.
基础