Botffy / polyskel

Straight skeleton implementation in Python
GNU Lesser General Public License v3.0
79 stars 21 forks source link

Extra edge for a t-shape #21

Open vvoovv opened 4 years ago

vvoovv commented 4 years ago

demo.py t-shape_extra_edge.txt image

vvoovv commented 4 years ago

Also for a polygon with a hole: demo.py t-shape_hole_extra_edge.txt image

Botffy commented 4 years ago

This is still extant. I'm not sure if this can be solved without introducing the "multi-events" (see #16 )

Many thanks for the reports and the example files, by the way!

vvoovv commented 4 years ago

We are trying to solve that through postprocessing of the skeleton in our port of the library: https://github.com/prochitecture/bpypolyskel/issues/5#issuecomment-706172626

Botffy commented 4 years ago

Wow, that picture of those buildings is pretty awesome, I love it!

I'll link to your port in the Readme :)

As for the erroneous edge in the T-shaped polygon: I don't actually think it's an extra edge, I'm pretty sure it should be there, except it should be horizontal. I understand this isn't ideal for your application, but it must be there, otherwise it wouldn't be a tree. Yeah, it can be eliminated in postprocessing, I guess, though the underlying problem bothers me anyhow.

vvoovv commented 4 years ago

I'll link to your port in the Readme :)

That would be nice. Here is the description of our port:

A port of Botffy/polyskel library for Blender that outputs polygons formed by a straight skeleton. 'pip install mathutils' to use it as a general purpose library independent of Blender.