|
@@ -194,9 +194,9 @@ public class ThreadService {
|
|
List<String> localGlbPaths = new ArrayList<>();
|
|
List<String> localGlbPaths = new ArrayList<>();
|
|
List<String> ossGlbPaths = new ArrayList<>();
|
|
List<String> ossGlbPaths = new ArrayList<>();
|
|
File localFile = new File(objPath);
|
|
File localFile = new File(objPath);
|
|
- String size = FileWriterUtil.setFileSize(localFile.length());
|
|
|
|
|
|
|
|
- this.toGlB(localFile,localGlbPaths);
|
|
|
|
|
|
+ Long sizeL = this.toGlB(localFile, localGlbPaths);
|
|
|
|
+ String size = FileWriterUtil.setFileSize(sizeL);
|
|
if(!localGlbPaths.isEmpty()){
|
|
if(!localGlbPaths.isEmpty()){
|
|
for (String localGlbPath : localGlbPaths) {
|
|
for (String localGlbPath : localGlbPaths) {
|
|
String ossPath = localGlbPath.replace("/mnt/","");
|
|
String ossPath = localGlbPath.replace("/mnt/","");
|
|
@@ -218,7 +218,8 @@ public class ThreadService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- private void toGlB(File localFile, List<String> localGlbPath) {
|
|
|
|
|
|
+ private Long toGlB(File localFile, List<String> localGlbPath) {
|
|
|
|
+ Long size = 0L;
|
|
File[] files = localFile.listFiles();
|
|
File[] files = localFile.listFiles();
|
|
for (File file : files) {
|
|
for (File file : files) {
|
|
if(file.isDirectory()){
|
|
if(file.isDirectory()){
|
|
@@ -227,6 +228,7 @@ public class ThreadService {
|
|
if(file.getPath().contains("lod_") ){
|
|
if(file.getPath().contains("lod_") ){
|
|
if(file.getPath().contains("lod_0") && file.getName().contains(".obj")){
|
|
if(file.getPath().contains("lod_0") && file.getName().contains(".obj")){
|
|
String glbPath = OBJToGLBUtil.objToB3dm(file.getPath(),file.getParentFile().getPath()+"/b3dm");
|
|
String glbPath = OBJToGLBUtil.objToB3dm(file.getPath(),file.getParentFile().getPath()+"/b3dm");
|
|
|
|
+ size += file.length();
|
|
localGlbPath.add(glbPath);
|
|
localGlbPath.add(glbPath);
|
|
}
|
|
}
|
|
continue;
|
|
continue;
|
|
@@ -234,9 +236,11 @@ public class ThreadService {
|
|
|
|
|
|
if(file.getName().contains(".obj")){
|
|
if(file.getName().contains(".obj")){
|
|
String glbPath = OBJToGLBUtil.objToB3dm(file.getPath(),file.getParentFile().getPath()+"/b3dm");
|
|
String glbPath = OBJToGLBUtil.objToB3dm(file.getPath(),file.getParentFile().getPath()+"/b3dm");
|
|
|
|
+ size += file.length();
|
|
localGlbPath.add(glbPath);
|
|
localGlbPath.add(glbPath);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ return size;
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|