WIP / debug view: #shapely union is generating some "bad polygons" maybe subdivided edges with extra vertices?) I have to figure out how to fix them.
Find the sketch-a-day archives and tip jar at: https://abav.lugaralgum.com/sketch-a-day
Code for this sketch at: https://github.com/villares/sketch-a-day/tree/main/2026/sketch_2026_02_24 #Processing #Python #py5 #CreativeCoding
@villares shapely objects have an `is_valid` attribute and there is a `make_valid()` function available to repair invalid shapes. Sometimes shapely unions are unhappy if multiple shapes share vertices or edges. Usually the `make_valid()` function fixes things nicely

@py5coding good idea!
Sadly I've just checked it now and it didn't help... I'll try a few ideas and I'll get back to this...

On a side note, working on the REPL while the sketch is executing is so nice...

Getting rid of points between 'vertices' of polygons that simplify() doesn't always remove (possible alternative?) · Issue #1046 · shapely/shapely

This is kind of related to issue #939 that was previously marked invalid. And I wanted to highlight it a bit more with example pictures and also ask if there is any interest in having a similar fea...

GitHub
@py5coding some time ago I had my own code for removing collinear vertices I have to find it...