CreativeInquiry / PEmbroider

Embroidery Library for Processing
Other
443 stars 28 forks source link

Unexpected error when using culling in PEmbroider_bitmap_image_2 #91

Closed golanlevin closed 3 years ago

golanlevin commented 3 years ago

Running PEmbroider_bitmap_image_2 produces a new error, ArrayIndexOutOfBounds exception (-1) in between a beginCull() and endCull().

LingDong- commented 3 years ago

Hi @golanlevin

Now fixed: 15ddc87d2041f1a260c4d2dc1e74a751c49703ee

It's due to a polyline having 0 vertices, hence one of the algorithms which involves finding the last vertex produces this error. Special case added.