i><strong>Build Contour</strong>: Starting from the leftmost node, the algorithm traverses connected segments to form contours, marking each segment as visited to prevent duplication.</li>
<li><strong>Define Contour</strong>: Determines whether a contour is outer or inner based on its orientation and position.</li>
<li><strong>Matching Contours</strong>: Associates inner contours with their corresponding outer contours by analyzing spatial relationships.</li>
</ol>
<hr />
<div style="break-before: page; pag