Patent ID: 11954120
Assignee: nan
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 5:
6. The method of to claim 5, the step for merging polygons further comprising:
S11. testing whether two polygons A and B to be merged have common edges; when a result of said test is affirmative, obtaining zigzag line segments composed of all common edges between said polygons A and B, providing endpoints of said zigzag line segments are (e1, f1), (e2, f2), . . . , (ew, fw) respectively, wherein said zigzag line segments share no common endpoints;
S12. for each of said zigzag line segments (ej, fj), performing following steps; a merged polygon consists of all non-empty loops remaining in said polygons A and B after all of said steps are completed:
S121. when said endpoint ej or fj is not an endpoint of a directional border that said endpoint is on, replacing said directional border with sub-borders in a loop containing said directional border repeatedly until each of said endpoint ej and fj is an endpoint of a directional border in said loop;
S122. when said zigzag line segment (ej, fj) appears in two different loops Q and R, merging said loops Q and R into a loop equivalent to a loop W, the method to generate said loop W comprising:
rearranging all directional borders of said loop Q and said loop R respectively in their original circular orders except for directional borders in said zigzag line segment (ej, fj) to form two new lists of directional borders, such that for each of said two new lists a starting point of first directional border and an ending point of last direction border are endpoints of said zigzag line segment (ej, fj); concatenating said two new lists of directional borders to form a concatenated list, said new loop W consists of said concatenated list of directional borders; and
S123. when said zigzag line segment (ej, fj) appears twice in a loop W, splitting said loop W into two new loops equivalent to loops W1 and W2, wherein said loop W1 and said loop W2 respectively comprise of directional borders of said loop W in their original cyclic order between said appearances of said zigzag line segment (ej, fj).