Hello, I have a problem using GeometryInfo. I use GeometryInfo to cut a hole in a polygon. With the following data I get the error message “java.lang.IllegalArgumentException: Sum of contourCounts must equal length of stripCounts array” But the sum of the contourcounts equals 8 (=4+4) what is exactly the number of the coords. (the first 4 coords are the polygon and the last 4 coords are from the hole inside). Who can tell me what im doing wrong.
With regards Aant van der Zee
coord: (-3.924, 2.7, -15.614) coord: (-3.924, 2.7, -4.064) coord: (-3.924, 0.0, -4.064) coord: (-3.924, 0.0, -15.614) coord: (-3.924, 0.6, -15.314) coord: (-3.924, 2.4, -15.314) coord: (-3.924, 2.4, -4.9640007) coord: (-3.924, 0.6, -4.9640007)
countorcounts[0] = 4 countorcounts[0] = 4
private GeometryArray createGeometryArray(Point3f[] coords, int[] contourCounts, Color3f[] colors) {
GeometryInfo gi = new GeometryInfo(GeometryInfo.POLYGON_ARRAY);
gi.setCoordinates(coords); if ( colors != null ) gi.setColors(colors);
int[] ii = { coords.length}; gi.setStripCounts(ii);
if ( contourCounts != null) { gi.setContourCounts(contourCounts); }
NormalGenerator ngi = new NormalGenerator(); ngi.generateNormals(gi);
Stripifier sti = new Stripifier(); sti.stripify(gi);
return gi.getGeometryArray(); }
|
- [JAVA3D] GeometryInfo Chris Fenton
- Re: [JAVA3D] GeometryInfo Michael Pfeiffer
- Re: [JAVA3D] GeometryInfo Michael Pfeiffer
- Re: [JAVA3D] GeometryInfo Chris Fenton
- Re: [JAVA3D] GeometryInfo Chris Fenton
- Re: [JAVA3D] GeometryInfo Paul Pantera
- Re: [JAVA3D] GeometryInfo Chris Fenton
- Re: [JAVA3D] GeometryInfo sikander hayat
- Re: [JAVA3D] GeometryInfo Todd J.
- Re: [JAVA3D] GeometryInfo / Blender Michael Pfeiffer
- [JAVA3D] Java3D on linux (RH9.0) aant
- [JAVA3D] Java3D on linux (RH9.0) Adnan Vora
- Re: [JAVA3D] Java3D on linux (RH9.0) Michael Pfeiffer
- Re: [JAVA3D] Java3D on linux (RH9.0) Adnan Vora
- Re: [JAVA3D] Java3D on linux (RH9.0) Michael Pfeiffer
- Re: [JAVA3D] Java3D on linux (RH9.0... Adnan Vora
- Re: [JAVA3D] GeometryInfo Matti Kannala