@Test public void testAddAFewWindCoordinates() { Mesh3D mesh = reader.readGlobe(GlobeType.Full); Collection<Face> allFaces = mesh.getFaces(); int oldCount = allFaces.size(); TriangleMesh newMesh = new TriangleMesh(); newMesh.addMesh(mesh); // TriangleMesh offers easier access to the faces, // unfortunately it is also significantly slower when adding faces for (int i = 0; i < 100; i++) { Face face = newMesh.faces.get(i); Vec3D cloudPoint = face.getCentroid(); cloudPoint.x += 7; cloudPoint.y += 7; cloudPoint.z += 7; mesh.addFace(cloudPoint, face.a, face.b); mesh.addFace(cloudPoint, face.b, face.c); mesh.addFace(cloudPoint, face.c, face.a); } mesh.computeFaceNormals(); int newCount = mesh.getNumFaces(); assertFalse(oldCount == newCount); String path = getClass().getResource(".").getFile(); File file = new File(path, "manipulated.stl"); TriangleMesh meshforWriting = new TriangleMesh(); meshforWriting.addMesh(mesh); writer.write(file, meshforWriting); }