'Polygon' object does not support indexing

Issue #152 resolved
Juan Pablo Caram repo owner created an issue

Error thrown by MultiPolygon(poly_buffer) in camlib.Gerber.parse_lines().

I tried MultiPolygon(poly_buffer[0:200]) and worked and MultiPolygon(poly_buffer[0:201]) and failed.

Comments (5)

  1. Juan Pablo Caram reporter

    Workaround by:

    if not geo.is_empty: poly_buffer.append(geo)
    

    instead of doing

    poly_buffer.append(geo)
    
  2. Juan Pablo Caram reporter

    The workaround should not cause any problems. The original cause seems to be a bug in Shapely.

  3. Log in to comment