Пример #1
0
        /// <summary>
        /// Return a single intersection point of a line and a contour
        /// </summary>
        /// <param name="line"></param>
        /// <param name="contour"></param>
        /// <returns></returns>
        private Point LineContourIntersection(Line line, HObject contour)
        {
            HTuple x, y, _, contourLength;

            HalconScripts.LongestXLD(contour, out contour, out contourLength);
            HOperatorSet.IntersectionLineContourXld(contour, line.YStart, line.XStart, line.YEnd, line.XEnd, out y,
                                                    out x, out _);

            return(new Point(x.D, y.D));
        }