Problem with Tesselation

Dear all,
I am having some problems with Jogl tesselation, I have been using it for a long time, but sometimes, the tesselation doesn’t give me the correct result.
For instance, if I want to get a contour (a union of two contours) with the rules glu.gluTessProperty(tessObj,GLU.GLU_TESS_WINDING_RULE,GLU.GLU_TESS_WINDING_NONZERO);
glu.gluTessProperty(tessObj, GLU.GLU_TESS_BOUNDARY_ONLY, GLU.GLU_TRUE);

[[Vec3: 11.0, 0.0, 0.0
, Vec3: 0.0, 0.0, 0.0
, Vec3: 0.0, 0.0, 2.0
, Vec3: 11.0, 0.0, 2
], [Vec3: 11.0, 0.0, 6.0
, Vec3: 11.0, 0.0, 2
, Vec3: 1.0, 0.0, 2
, Vec3: 1, 0.0, 6
]]
I will have the correct result that is :
[[Vec3: 11.0, 0.0, 2.0
, Vec3: 11.0, 0.0, 0.0
, Vec3: 0.0, 0.0, 0.0
, Vec3: 0.0, 0.0, 2.0
, Vec3: 1.0, 0.0, 2.0
, Vec3: 1.0, 0.0, 6.0
, Vec3: 11.0, 0.0, 6.0
]]

BUT if I have the following contours :
[[Vec3: 11.0, 0.0, 0.0
, Vec3: 0.0, 0.0, 0.0
, Vec3: 0.0, 0.0, 2.0
, Vec3: 11.0, 0.0, 1.9999999999999991
], [Vec3: 11.0, 0.0, 6.0
, Vec3: 11.0, 0.0, 1.9999999999999991
, Vec3: 1.0, 0.0, 1.999
, Vec3: 1.0000000149011612, 0.0, 6.000000149011612
]]
I will have this WRONG result :
[[Vec3: 11.0, 0.0, 1.9999999999999991
, Vec3: 11.0, 0.0, 0.0
, Vec3: 0.0, 0.0, 0.0
, Vec3: 0.0, 0.0, 2.0
, Vec3: 1.0000000149011612, 0.0, 6.000000149011612

, Vec3: 11.0, 0.0, 6.0
]]

I do not understand why opengl doesn’t give me the correct contour. It seems that problems occur when I have values such as 1.9999999999999991 or 6.000000149011612 and everything is ok when values are 2.0 and 6.0.
Does OpenGL prefer int numbers to double? I don’t think so, but really don’t understand how Opengl can give me a so wrong result.

If you have an idea on this problem, or if you know what is wrong, I would appreciate. Or perhaps there are some known problems with tesselation with Jogl? Or perhaps some bugs?

Thank you.

Do you have a small test case reproducing this behavior?

No, I unfortunately don’t have a test case reproducing this behaviour, but I found a solution that is : we shouldn’t use number with too many figures after the comma. All my problems are solved when I round my Vec3 with 7 figures after the comma. When there are too many figures after the comma, the tesselation doesn’t give the correct result. It is strange, but by rounding the Vec3 using :
x = (Math.round(xMath.pow(10,7)) )/ (Math.pow(10,7));
y = (Math.round(y
Math.pow(10,7)) )/ (Math.pow(10,7));
z = (Math.round(z*Math.pow(10,7)) )/ (Math.pow(10,7));
I have correct results from the tesselation.

I don’t know untill how many figures after the comma the tesselation runs correctly, but what is sure is that it doesn’t run correctly with 1.9999999999999991 so it gives a bad result with 16 figures after the comma.