miho / JCSG

Java implementation of BSP based CSG (Constructive Solid Geometry)
Other
177 stars 52 forks source link

Unit test to demonstrate #15 #29

Closed madhephaestus closed 7 years ago

madhephaestus commented 7 years ago

I wrote a stripped down unit test to demonstrate the issue i have been describing in #15 . This unit test will test to see that when the extrude function is called on convex polygons, that the triangulation function does not fall off the edge and begin placing triangles inside out.

madhephaestus commented 7 years ago

This will fail the travis build because it includes a unit test that demonstrated a fault and at this time is not passing.

miho commented 7 years ago

Thanks for preparing the test. I'll have a look at it.

miho commented 7 years ago

that the triangulation function does not fall off the edge and begin placing triangles inside out.

Your assumption in the test is wrong. The increased number of triangles does not come from bad orientation etc.

Just try this with regular primitives such as two spheres and it will fail as well if you don't enable optimization.

madhephaestus commented 7 years ago

How would i enable optimizations?

miho commented 7 years ago

See your unit test. I modified it to work properly. But I doubt that this is the root of your problem.

Dipl.-Math. Michael Hoffer

Twitter: @mihosoft Webpage: www.mihosoft.eu

Goethe-Zentrum für Wissenschaftliches Rechnen (G-CSC) Goethe-Universität Kettenhofweg 139 60325 Frankfurt am Main phone: +49 69 798 25254 info@michaelhoffer.de

2016-11-12 20:42 GMT+01:00 Kevin Harrington notifications@github.com:

How would i enable optimizations?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/miho/JCSG/pull/29#issuecomment-260143591, or mute the thread https://github.com/notifications/unsubscribe-auth/AANv8nzP3E4aDIJb4v5VMBZdhyX-gKURks5q9haOgaJpZM4KwdrA .

madhephaestus commented 7 years ago

Why is this mode not the default?

miho commented 7 years ago

Because it does not work 100% reliable. There are edge cases that I didn't test so far.