|
@@ -2,6 +2,7 @@ package com.fdkankan.fusion.common.util;
|
|
|
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.fdkankan.fusion.common.FilePath;
|
|
|
import com.fdkankan.fusion.common.ResultCode;
|
|
|
import com.fdkankan.fusion.exception.BusinessException;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -107,13 +108,13 @@ public class OBJToGLBUtil {
|
|
|
}
|
|
|
|
|
|
public static File lasOrPlyToBin(File srcFile) throws IOException {
|
|
|
- String mntPath = srcFile.getPath().replace("home","mnt");
|
|
|
- String mntPathEmt = srcFile.getParent().replace("home","mnt")+"/res";
|
|
|
+ String mntPath = srcFile.getPath().replace(FilePath.LOCAL_BASE_PATH,FilePath.MNT_BASE_PATH);
|
|
|
+ String mntPathEmt = srcFile.getParent().replace(FilePath.LOCAL_BASE_PATH,FilePath.MNT_BASE_PATH)+"/res";
|
|
|
File file = new File(mntPathEmt);
|
|
|
if(!file.exists()){
|
|
|
file.mkdirs();
|
|
|
}
|
|
|
- FileUtil.copy(srcFile.getPath(),srcFile.getPath().replace("home","mnt"),true);
|
|
|
+ FileUtil.copy(srcFile.getPath(),mntPath,true);
|
|
|
String cmd = ShellUtil.LAS_TO_BIN;
|
|
|
cmd = cmd.replace("@inPath",mntPath);
|
|
|
cmd = cmd.replace("@outPath",mntPathEmt);
|
|
@@ -124,5 +125,4 @@ public class OBJToGLBUtil {
|
|
|
FileWriterUtil.writerJson(mntPathEmt +"/webcloud/","cloud.js",jsonObject.toJSONString());
|
|
|
return file;
|
|
|
}
|
|
|
-
|
|
|
}
|