packingsolver: Invalid input shape in shape::remove_redundant_vertices with specific offset

Hello,

This instance.json throws the following error :

shape::remove_redundant_vertices: invalid input shape.

The shape (without offset) looks like :

Image

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (22 by maintainers)

Most upvoted comments

The fix seems to have change something. The previous problematic hole was

polygon (# edges 2)
LineSegment start (47.60863428896897, 47.6086343313799) end (47.60863433137983, 47.60863428896888)
LineSegment start (47.60863433137983, 47.60863428896888) end (47.60863428896897, 47.6086343313799)

Which were two very close points.

Now it is

polygon (# edges 2)
 LineSegment start (47.24409445879453, 47.24409450120547) end (36.10855461879453, 36.10855466120547)
 LineSegment start (36.10855461879453, 36.10855466120547) end (47.24409445879453, 47.24409450120547)

Which are not two very close points anymore

I have an idea why this is happening. These are two intersection points which are too close and should be considered as the same point, but the solver considers them as two different points. I need to think about of to fix this properly.