JCSG icon indicating copy to clipboard operation
JCSG copied to clipboard

Plane splitPolygon running into loop / StackOverflowError

Open udatny opened this issue 5 years ago • 2 comments

i runned several times into the stackoverflow issue (which also people reported https://github.com/miho/JCSG/issues/48 ) and i am still not sure what it is causing. fact is, that under certain circumstances the Plane.splitPolygon could end in a loop. somehow it does not recognize polygons as coplanar.

it is reproducable with the AppleTest i added. (simply run mvn test -Dtest=eu.mihosoft.jcsg.AppleTest in the root folder)

a possible fix is also there but in my opinion it is not addressing the root cause....it just works around the issue.

maybe you find time to analyze.

udatny avatar Mar 11 '19 22:03 udatny

I have a StackOverflowError when performing the intersect method on two objects. I have tried your code and it does get rid of the StackOverflowError on the intersect method, however it does not produce the correct output for the difference method.

In addition, it produces many lines of "our plane is not spanning and not coplannar but it should be 1.0"

Any ideas? PS Thanks for the work to get rid of the stackoverflow!

jimbok8 avatar Apr 24 '19 15:04 jimbok8

I think you may be working around the issue i fixed in #64 @jimbok8 Give it a shot?

madhephaestus avatar Mar 25 '21 21:03 madhephaestus