MeshExporter.saveAsWaveFront(all); // pops up file dialog to save
}
private Ball addBallObject(Project project, double[][] data, String title) {
LayerSet layerset = project.getRootLayerSet();
Ball ball = new Ball(project, title, 0, 0);
// Ball is a ZDisplayable object, so gets added to a LayerSet:
layerset.add(ball);
for (int i=0; i<data.length; i++) {
// Get or create a layer for the Z
double z = data[i][2];
double thickness = 1;
Layer la = layerset.getLayer(z, thickness, true); // created new if not there already
// Insert the individual ball
double x = data[i][0];
double y = data[i][1];
double r = data[i][3];
ball.addBall(x, y, r, la.getId()); // no Z, but Layer id!