Title: RE: [JAVA3D] Bug in triangulating polygons with multiple contours

Ok, thanks for the input from both of you. I have managed to isolate another case (from a shape of 840 polygons phewww...) where this happens again

and this time changing the sense of the hole doesn't work. If the sense of the hole polygons should agree with the outer contour then i think it would be reasonable that the javadoc of GeometryInfo state so, since usually this is not the case. I attached a code to generate the ugly shape.

So it is a bug or then i'm missing something here, the datas look ok, simple non-intersecting polygons.
Any comments from the intrepid Java3d team?
-tero

-----Original Message-----
From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]]On Behalf Of Florin Herinean
Sent: 10. tammikuuta 2003 18:49
To: [EMAIL PROTECTED]
Subject: [JAVA3D] AW: [JAVA3D] Bug in triangulating polygons with multiple contours


Well, it's more or less a bug. The GeometryInfo actualy is not really generating a "planar surface with a hole" but a sort of a mesh. If the "hole" coordinates are not in the same plane, it will create a 3d surface which is not in the plane, but looks more like a triangle strip generated from the two contours. Now what happens if you rotate the hole 180 degrees ? Of course the shape will be corrupted, from your human point of view, but not from the mathematical point. The example below just shows that behavior: the first polygon is facing the positive y axis while the hole is facing the negative y axis. What should the algorithm decide in this case ? It's a distorted shape or a real hole ? How can he decide ?

What does Java3D guys think ?

Cheers,

Florin
-----Urspr�ngliche Nachricht-----
Von: Dave Smith [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 10. Januar 2003 17:14
An: [EMAIL PROTECTED]
Betreff: Re: [JAVA3D] Bug in triangulating polygons with multiple contours


I'm surprised such a simple example doesn't work.  I even reduced
the noise and made everything planar. 

Looks like a bug to me.

-DaveS

ps.  Used same setup
pps.  Here is the modified data:

Point3d[] coordinates = {
                //outer bounds of the polygon
                new Point3d(2., 0.0, 0.0),
                new Point3d(2., 0.0, 1.3),
                new Point3d(0.0, 0.0, 1.3),
                new Point3d(0.0, 0.0, 0.0),

                //the hole
                new Point3d(1.93, 0.0, 0.07),
                new Point3d(0.07, 0.0, 0.07),
                new Point3d(0.07, 0.0, 1.13),
                new Point3d(1.93, 0.0, 1.13)
                };
----- Original Message -----
From: Tero Karhunen
To: [EMAIL PROTECTED]
Sent: Friday, January 10, 2003 8:33 AM
Subject: [JAVA3D] Bug in triangulating polygons with multiple contours


It seems that sometimes when i attempt to use GeometryInfo by specifying polygons with holes, the triangulated
results aren't correct. The test method attached can duplicate this, it only creates a Shape3D however, since even a minimal program to display and maybe rotate the view requires a bit of work. I hope you guys can plug it into something you already have to confirm this.

I have had these results with java3d v1.3 on win2000 platform.
-tero

Attachment: ContourTest.java
Description: JavaScript source

Reply via email to