-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Managing polygon with holes #22
Comments
Hi! That's weird, I just tried it like this:
And it produces this: which is the expected skeleton. This with a Python 3.8.4. But what's your euclid version? This may be related to #17 Other than that, I don't know! (In the posted code you have an unmatched ), but I wouldn't think that would be it.) |
Wow, those are really weird errors. I'd expect some localized weirdness, but not something huge like these. I don't know, weird. Could you perhaps send me any of those polygons? (Also, incidentally, may I ask what are you using this for? :) I get a kick out seeing this thing in action.) |
Sure, here are the first 5 polygons circled in red in the previous picture. I found that sometimes the glitch disappears when inverting the coordinates along the Y-axis so I included both versions. Oddly enough, your library handles the following polygons without any errors when run inside Processing (Jython). However when computing their straight skeletons inside Rhino/Grasshopper (IronPython), things get weird (picture above). I truly don't understand why the results of the library changes depending on the environment...
I am working on permutations and try to analyze how polygons inside a set are related to each other (correlation, similarity), partly based on their Straight Skeleton. Ideally, I would have also used your library to compute separation lines between polygons (or sub-trees like below) but ended-up using another technique because I couldn't manage to make Polyskel handle polygons with holes inside Processing. All in all, Polyskel has been handy for various projects so far: coloring polygons, terrain generation, fake 3D effect,... unfortunately I don't have access to my main computer right now so all I can share is this image :) |
Upon further investigations I have come to think that it has to do with the way Jython and IronPython handle floats and treat them as doubles instead. I am not still sure about this but I have found that converting the floating coordinates to integers somehow makes possible to overcome the issue. I apologise for the inconvenience. |
Hi @Botffy ,
I have difficulties outputting the skeleton of a polygon with a hole using the
skeletonize
method.I have tried with your
holey
example:However the output looks like it is missing the
hole
information:Would you mind helping me figuring out what could be missing in the snippet above ?
The text was updated successfully, but these errors were encountered: