-
Notifications
You must be signed in to change notification settings - Fork 13
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
Intermittent "Invalid number of points in LinearRing" when using PGS_ShapeBoolean.subtract()
#22
Comments
The library assumed that PShapes with With the way you've coded the approach you're generating lots of group PShapes with nested components. These can all be seen when we translate them randomly. Another approach could be: for each layer, subtract from it the union of all its upper layers (however I haven't tested this). |
Thank you @micycle1 can't wait to try it out! |
Yeah, that's correct. The Jitpack version doesn't include dependencies. As it's a maven artifact, it's designed to be used with Maven which will download all dependencies automatically. I'll release a new version at some point -- now I'm working on some other features to be included in it. |
PGS_ShapeBoolean.subtract()
PGS_ShapeBoolean.subtract()
PGS_ShapeBoolean.subtract()
Hi @micycle1, I'm using PGS to do hidden line removal for my old Roland plotter. The idea is that because the plotter has no concept of .fill(), I'm progressively subtracting / merging shapes from each other.
It seems to work for the most part, but I intermittently get an illegal arg exception - Invalid number of points in LinearRing (found 2 - must be 0 or >= 4) when calling PGS_ShapeBoolean.subtract()
I've tried to mock this up in the below code - it will stop at the offending PShape and draw in pink. All the 'valid' PShapes above that one will be drawn in black.
Hoping for some pointers please, maybe I'm misusing the subtract / shape group ? Apologies in advance, I'm new to both Java & Processing!
The text was updated successfully, but these errors were encountered: