Selaa lähdekoodia

场景obj模型转换为b3dm

lyhzzz 1 vuosi sitten
vanhempi
commit
701b55e5e4

+ 0 - 3
src/main/java/com/fdkankan/fusion/common/util/OBJToGLBUtil.java

@@ -37,9 +37,6 @@ public class OBJToGLBUtil {
 
     public static String objToB3dm(String objPath, String glbPath)  {
         log.info("obj转换b3dm开始,{}",objPath);
-        if(!checkObj(objPath)){
-            throw new BusinessException(-1,"obj文件错误");
-        }
         log.info("obj转换b3dm开始");
         String command = "Obj2Tiles --lods 8 --divisions 3 " + objPath + " " + glbPath;
         log.info("执行obj转换glb命令路径-{}", command);

+ 2 - 2
src/main/java/com/fdkankan/fusion/common/util/ShellUtil.java

@@ -58,7 +58,7 @@ public class ShellUtil {
                 String line = null;
                 try {
                     while((line = in.readLine()) != null) {
-                       log.debug("output: " + line);
+                       log.info("output: " + line);
                     }
                 }
                 catch (IOException e) {
@@ -81,7 +81,7 @@ public class ShellUtil {
                 String line = null;
                 try {
                     while((line = err.readLine()) != null) {
-                        log.debug("err: " + line);
+                        log.info("err: " + line);
                     }
                 }
                 catch (IOException e) {

+ 1 - 1
src/main/java/com/fdkankan/fusion/service/impl/ThreadService.java

@@ -218,7 +218,7 @@ public class ThreadService {
             if(file.isDirectory()){
                 toGlB(file,localGlbPath);
             }
-            if(file.getParent().contains("lod_") && file.getParent().contains("lod_0") ){
+            if(file.getPath().contains("lod_") && file.getPath().contains("lod_0") && file.getName().contains(".obj") ){
                 String glbPath =  OBJToGLBUtil.objToB3dm(file.getPath(),file.getParentFile().getPath()+"/b3dm");
                 localGlbPath.add(glbPath);
                 continue;