Manifold Geometry // Многообразная Геометрия

True Shape Nesting 05: containment test

/ Просмотров: 121

The algorithm by E. Burke et al. [1] provides containment test to check if a part to be nested is entirely enclosed by another part. It is clear that in such cases, our Intf intersection logic would not detect any hits. This case requires another resolution strategy as there are no intersecting primitives.

To check if a polygon A is inside a polygon B we can do the following:

  • Check if the polygons have any intersecting edges.

  • If not, check if all poles of the polygon A fall inside the polygon B, e.g., using one of the algorithms by Eric Haines.

Simple, stupid.

References

  1. Burke, Edmund; Hellier, Robert; Kendall, Graham; Whitwell, Glenn (2006). A New Bottom-Left-Fill Heuristic Algorithm for the Two-Dimensional Irregular Packing Problem. Operations Research, 54(3), 587–601. doi:10.1287/opre.1060.0293 (full text).

Want to discuss this? Jump in to our forum.