private void saveComposition(string filename) { TopoModel model = new TopoModel(); foreach (PrintModel stl in ListObjects(false)) { stl.UpdateMatrix(); model.Merge(stl.ActiveModel, stl.trans); } if (filename.EndsWith(".obj") || filename.EndsWith(".OBJ")) { model.exportObj(filename, true); } else { model.exportSTL(filename, writeSTLBinary); } Slicer.lastBox.Clear(); Slicer.lastBox.Add(model.boundingBox); }