private void writeBeams(PrintStream out, AmibeReader.SubMesh subMesh, int count) throws IOException { IntFileReader beams = subMesh.getBeams(); long nb = beams.size() / 2; for (int i = 0; i < nb; i++) { out.println(FORMAT_I10.format(count) + " 21 2 1 5 2"); out.println(" 0 1 1"); out.println(FORMAT_I10.format(beams.get() + 1) + FORMAT_I10.format(beams.get() + 1)); count++; } }
/** * @param out * @throws IOException */ private int writeTriangles(PrintStream out, AmibeReader.SubMesh subMesh) throws IOException { int count = 1; if (subMesh.getNumberOfTrias() > 0) { IntFileReader trias = subMesh.getTriangles(); long nb = trias.size() / 3; for (int i = 0; i < nb; i++) { int n1 = trias.get(); int n2 = trias.get(); int n3 = trias.get(); if (n1 >= 0) MeshExporter.UNV.writeSingleTriangle(out, count, n1 + 1, n2 + 1, n3 + 1); count++; } } logger.log(Level.INFO, "Total number of triangles: {0}", count - 1); return count; }