dengsixing 1 månad sedan
förälder
incheckning
8a2603d9b3

+ 17 - 120
src/main/java/com/fdkankan/scene/constant/CmdConstant.java

@@ -1,9 +1,8 @@
 package com.fdkankan.scene.constant;
 
 
-import jdk.nashorn.internal.ir.LexicalContext;
-
-import java.io.File;
+import cn.hutool.extra.spring.SpringUtil;
+import com.fdkankan.scene.config.FdkkLaserConfig;
 
 
 /**
@@ -11,14 +10,8 @@ import java.io.File;
  */
 public class CmdConstant {
 
+    private static final FdkkLaserConfig fdkkLaserConfig = SpringUtil.getBean(FdkkLaserConfig.class);
 
-    /**
-     * ossUtil上传目录
-     * ./ossutil cp -r localfolder/ oss://examplebucket/desfolder/
-     * opt/ossutil/ossutil64 cp -r /root/owen/720yun/vtour/ oss://oss-xiaoan/720yun_fd_manage/
-     *
-     */
-//    public final static String OSSUTIL_UPLOAD_DIR = "/opt/ossutil/ossutil64 cp -r /mnt/720yun_fd_manage_data/@sceneCode oss://oss-xiaoan/720yun_fd_manage/@sceneCode";
 
     /**
      * 用脚本的好处会自动结束线程, java直接跑命令容易出问题
@@ -30,51 +23,14 @@ public class CmdConstant {
      * @target oss目录名字
      * @mergeCode 合并的场景码
      */
-//    public final static String OSSUTIL_UPLOAD_DIR = "bash /opt/ossutil/ossupload.sh /mnt/720yun_fd_manage_data/@sceneCode 720yun_fd_manage/@sceneCode";
-//    public final static String OSSUTIL_UPLOAD_DIR_CHUNK = "bash /root/user/java/jar_run/ossupload.sh @uploadDir data/@sceneCode/data/chunk1/@target";
-    // 2021-08-26 - chunk1 -> 改场景码
-    public final static String OSSUTIL_UPLOAD_DIR_CHUNK = "bash /opt/ossutil/ossupload.sh @uploadDir @defaultFolder/@sceneCode/data/@mergeCode/@target";
-
-    public final static String OSSUTIL_UPLOAD_DIR = "bash /opt/ossutil/ossupload.sh @uploadDir @target";
+    public final static String OSSUTIL_UPLOAD_DIR = fdkkLaserConfig.buildCallPath + "ossupload.sh @uploadDir @target";
 
-    public final static String OSSUTIL_RM_DIR = "bash /root/user/java/jar_run/ossrm.sh @target";
+    public final static String OSSUTIL_RM_DIR = fdkkLaserConfig.buildCallPath + "ossrm.sh @target";
 
-
-    public final static String MINIO_OSSUTIL_UPLOAD_DIR_CHUNK = "bash /opt/ossutil/minioupload.sh @uploadDir @defaultFolder/@sceneCode/data/@mergeCode/";
     // MINIO 上传文件夹命令
-    public final static String MINIO_UTIL_UPLOAD_DIR = "bash /opt/ossutil/minioupload.sh @uploadDir/ @target";
-
-    public final static String MINIO_UTIL_RM_DIR = "bash /opt/ossutil/miniorm.sh  @target";
-
-    /**
-     * 2021-08-17
-     * 剪切模型命令, 这个需要在nas共享目录, 测试服务器,跟算法服务器是分开的
-     * bash /home/ubuntu/bin/PotreeConverter.sh /mnt/data/00001002/872819408496492544/74ee2a39e656_202108051135248650/results/laserData/laser.las
-     * /mnt/data/00001002/872819408496492544/74ee2a39e656_202108051135248650/results/laserData/indoor_cut.las
-     * /mnt/data/00001002/872819408496492544/74ee2a39e656_202108051135248650/results/laserData/cut_param.json
-     * bash /home/ubuntu/bin/PotreeConverter.sh inPath outPath inCutParam;
-     */
-    public final static String CUT_MODEL = "bash /home/ubuntu/bin/PotreeConverter.sh @inPath @outPath @cutParam";
+    public final static String MINIO_UTIL_UPLOAD_DIR = fdkkLaserConfig.buildCallPath + "minioupload.sh @uploadDir/ @target";
 
-
-    /**
-     * ossUtil下载目录
-     *
-     * @downloadDir oss需要下载的目录
-     * @target 服务器存放位置(会把当前目录也下载)
-     */
-    public final static String OSSUTIL_DOWNLOAD_DIR = "bash /root/user/java/jar_run/ossdownload.sh @downloadDir @target";
-
-    public final static String RM_Folder = "rm -rf @Folder";
-    public final static String RM_Folder_WIN = "rmdir @Folder /s";
-
-    public final static String MV_Folder = "mv -f @Folder @Target";
-
-    public final static String MV_Folder_WIN = "move /y @Folder @Target";
-
-
-    public final static String CP_Folder = "cp -r -f @Folder @Target";
-    public final static String CP_Folder_WIN = "xcopy /y /s /f /h  @Folder @Target";
+    public final static String MINIO_UTIL_RM_DIR = fdkkLaserConfig.buildCallPath + "miniorm.sh  @target";
 
     public final static String MK_LINK_DIR = "sudo ln -s /J  @Target @Link";
 
@@ -83,81 +39,22 @@ public class CmdConstant {
     public final static String MK_LINK_FILE = "sudo ln  @Target @Link";
     public final static String MK_LINK_FILE_WIN = "mklink /H @Link @Target";
 
-    public final static String OBJ_TO_GLB = "obj2gltf @inPath @outPath";
-    public final static String OBJ_TO_GLB_WIN = "objtoglb.exe @inPath @outPath";
-    /**
-     * zip merge_cut.zip merge_cut.las
-     **/
-    public final static String ZIP = "cd @path && zip -r @target @inPath";
-
-    /**
-     * 2021-09-23
-     * 英达:多数据集模型剪切
-     * bash /home/ubuntu/bin/PotreeConverter.sh "" xxx/xxx.las xxx/merge_cut_param.json"
-     * 三个参数,合并裁剪的,第一个参数为空字符串"", 第二个是输出.las路径,第三个是merge_cut_param.json文件路径
-     * outPath: 是输出.las路径
-     * inPath: merge_cut_param.json文件路径
-     */
-    public final static String MERGE_CUT_MODEL = "bash /home/ubuntu/bin/PotreeConverter.sh cut @outPath @inPath";
-    public final static String MERGE_CUT_MODEL_WIN = "PotreeConverter.bat cut @outPath @inPath";
-
-
-    /**
-     * 2022年3月26日15:58:37
-     * 英达:点云文件坐标转换
-     *
-     * @param json文件路径  @inPath 输入las模型路径 @outPath 输出las模型路径
-     */
-    public final static String CONVERTER_ADD_GEO = "bash /home/ubuntu/bin/PotreeConverter.sh @param @inPath @outPath ";
-
-    public final static String CONVERTER_ADD_GEO_WIN = "PotreeConverter.bat @param @inPath @outPath ";
-
-    //生成模型的命令
-    public static final String BUILD_MODEL_COMMAND = "bash /home/ubuntu/bin/Launcher.sh  @inPath";
-    public static final String BUILD_MODEL_COMMAND_WIN = "Launcher.bat @inPath";
-
-    public static final String BUILD_3DTILES_MODEL_COMMAND_WIN = "Obj2Tiles.bat @inPath";
 
     //生成模型的命令
-    public static final String KILL_BUILD_MODEL_COMMAND = "ps -ef | grep MainLoader.exe | grep -v grep | awk '{print $2}' | xargs kill -9";
-
-    public static final String KILL_BUILD_MODEL_COMMAND_WIN = "taskkill /f /im MainLoader.exe";
-
-    public static final String AUTH_LICENSE_WIN = "Launcher.bat @inPath";
-
-    /**
-     * 2021-09-24
-     * 世超: 平面图切图
-     * 需要参数:
-     * 工作目录
-     * data.json -> {"split_type":"SPLIT_V15","skybox_type":"SKYBOX_V5"}
-     * extras
-     * info.json
-     * xxx.png
-     * bash /home/ubuntu/bin/Launcher.sh ${工作路径}
-     */
-    public final static String TILED_MAP = "bash /home/ubuntu/bin/Laser-Launcher.sh @inPath";
-    public final static String TILED_MAP_WIN = "Launcher.bat @inPath";
+    public static final String BUILD_MODEL_COMMAND = fdkkLaserConfig.buildCallPath + "Launcher.sh  @inPath";
+    public static final String BUILD_MODEL_COMMAND_WIN = fdkkLaserConfig.buildCallPath + "Launcher.bat @inPath";
 
-    /**
-     * las to bin
-     * bash PotreeConverter_webcloud_bin.sh /mnt/data/00001050/933817767755251712/00001050_202201202011578010_laserData/cloud_extras/point.las
-     * /mnt/data/00001050/933817767755251712/00001050_202201202011578010_laserData/cloud_extras
-     */
-    public final static String LAS_TO_BIN = "bash  /home/ubuntu/bin/PotreeConverter.sh @inPath @outPath ''";
-    public final static String LAS_TO_BIN_WIN = "PotreeConverter.bat @inPath @outPath ''";
 
-    /***
-     * # 模型检查  check 路径 输出json  {"check_result":"0","model_path":"add_geo.las"}  0/1 模型正确是1,模型不正确是0
-     */
-    public final static String CHECK_LASER = "bash  /home/ubuntu/bin/PotreeConverter.sh check @inPath @outPath";
+    public final static String OBJ2_TILES = fdkkLaserConfig.buildCallPath + "Obj2Tiles.sh @inPath";
+    public final static String OBJ2_TILES_WIN = fdkkLaserConfig.buildCallPath + "Obj2Tiles.bat @inPath";
 
-    public final static String CHECK_LASER_WIN = "PotreeConverter.bat check @inPath @outPath";
 
-    public final static String OBJ2_TILES ="bash /home/ubuntu/bin/Obj2Tiles.sh @inPath";
-    public final static String OBJ2_TILES_WIN ="Obj2Tiles.bat @inPath";
+    public final static String POTREE_CONVERTER = fdkkLaserConfig.buildCallPath + "PotreeConverter.sh @param @inPath @outPath";
+    public final static String POTREE_CONVERTER_WIN = fdkkLaserConfig.buildCallPath + "PotreeConverter.bat @param @inPath @outPath";
 
-    public final static String LAYOUT_DETECT = "PotreeConverter.bat layout_detect @in @out";
-    public final static String PANO_DETECT = "PotreeConverter.bat pano_detect @in @out";
+//    public final static String Potree_Converter = fdkkLaserConfig.buildCallPath + "PotreeConverter.sh layout_detect @in @out";
+//    public final static String Potree_Converter_win = fdkkLaserConfig.buildCallPath + "PotreeConverter.bat layout_detect @in @out";
+//    public final static String PANO_DETECT = fdkkLaserConfig.buildCallPath + "PotreeConverter.bat pano_detect @in @out";
+//    public final static String PANO_DETECT_WIN = fdkkLaserConfig.buildCallPath + "PotreeConverter.bat pano_detect @in @out";
 
 }

+ 0 - 2
src/main/java/com/fdkankan/scene/oss/OssOptions.java

@@ -21,8 +21,6 @@ public interface OssOptions<T> {
 
     void uploadFileDirCmd(String uploadDir, String target);
 
-    void uploadFileChunkCmd(String defaultFolder, String sceneCode, String uploadDir, String targetDir, String mergeCode);
-
 
     String uploadFile(String bucket, String pathKey, String filePath);
 

+ 0 - 32
src/main/java/com/fdkankan/scene/oss/OssUtil.java

@@ -71,38 +71,6 @@ public class OssUtil {
     }
 
 
-    public void uploadFileChunkCmd(String prefix, String defaultFolder, String sceneCode, String uploadDir, String targetDir, String mergeCode, boolean isLink) {
-        if (FdkkLaserConfig.isBucket()) {
-            if (FdkkLaserConfig.isLocalization()) {
-                minioOssTemplate.uploadFileChunkCmd(defaultFolder, sceneCode, uploadDir, targetDir, mergeCode);
-            } else {
-                aliyunOssTemplate.uploadFileChunkCmd(defaultFolder, sceneCode, uploadDir, targetDir, mergeCode);
-            }
-        } else {
-            if (isLink) {
-                String path = FdkkLaserConfig.getProfile(prefix) + File.separator + defaultFolder + File.separator + sceneCode + File.separator + "data" + File.separator + mergeCode;
-                String targetPath = path + File.separator + targetDir;
-                if (!FileUtil.exist(path)) {
-                    FileUtil.mkdir(path);
-                }
-                if (FileUtil.exist(targetPath)) {
-                    FileUtil.del(targetPath);
-                }
-                CmdBuildUtil.MkLinkDir(targetPath, FileUtil.file(uploadDir).getAbsolutePath());
-            } else {
-                String path = FdkkLaserConfig.getProfile(prefix) + File.separator + defaultFolder + File.separator + sceneCode + File.separator + "data" + File.separator + mergeCode;
-                if (FileUtil.exist(FileUtil.file(uploadDir))) {
-                    FileUtil.copy(
-                            FileUtil.file(uploadDir),
-                            FileUtil.file(path),
-                            true);
-                }
-            }
-
-        }
-    }
-
-
     public void uploadFileDirCmd(String prefix, String uploadDir, String target, Boolean isLink) {
         if (FdkkLaserConfig.isBucket()) {
             if (FdkkLaserConfig.isLocalization()) {

+ 0 - 12
src/main/java/com/fdkankan/scene/oss/aliyun/AliyunOssTemplate.java

@@ -40,18 +40,6 @@ public class AliyunOssTemplate implements OssOptions<ObjectMetadata> {
     }
 
     @Override
-    public void uploadFileChunkCmd(String defaultFolder, String sceneCode, String uploadDir, String targetDir, String mergeCode) {
-        String cmd = CmdConstant.OSSUTIL_UPLOAD_DIR_CHUNK;
-        cmd = cmd.replaceAll("@defaultFolder", defaultFolder);
-        cmd = cmd.replaceAll("@sceneCode", sceneCode);
-        cmd = cmd.replaceAll("@mergeCode", mergeCode);
-        cmd = cmd.replaceAll("@uploadDir", uploadDir);
-        cmd = cmd.replaceAll("@target", targetDir);
-        CmdUtils.ossUploadDir(cmd);
-
-    }
-
-    @Override
     public void uploadFileDirCmd(String uploadDir, String target) {
         String cmd = CmdConstant.OSSUTIL_UPLOAD_DIR;
         cmd = cmd.replaceAll("@uploadDir", uploadDir);

+ 0 - 12
src/main/java/com/fdkankan/scene/oss/minio/MinioOssTemplate.java

@@ -41,18 +41,6 @@ public class MinioOssTemplate implements OssOptions<GetObjectResponse> {
     }
 
     @Override
-    public void uploadFileChunkCmd(String defaultFolder, String sceneCode, String uploadDir, String targetDir, String mergeCode) {
-        String cmd = CmdConstant.MINIO_OSSUTIL_UPLOAD_DIR_CHUNK;
-        cmd = cmd.replaceAll("@defaultFolder", defaultFolder);
-        cmd = cmd.replaceAll("@sceneCode", sceneCode);
-        cmd = cmd.replaceAll("@mergeCode", mergeCode);
-        cmd = cmd.replaceAll("@uploadDir", uploadDir);
-//        cmd = cmd.replaceAll("@target", targetDir);
-        CmdUtils.ossUploadDir(cmd);
-
-    }
-
-    @Override
     public void uploadFileDirCmd(String uploadDir, String target) {
         String cmd = CmdConstant.MINIO_UTIL_UPLOAD_DIR;
         cmd = cmd.replaceAll("@uploadDir", uploadDir);

+ 2 - 2
src/main/java/com/fdkankan/scene/service/impl/AiServiceImpl.java

@@ -17,6 +17,7 @@ import com.fdkankan.scene.entity.ScenePlusExt;
 import com.fdkankan.scene.entity.SceneShapeEnum;
 import com.fdkankan.scene.oss.OssUtil;
 import com.fdkankan.scene.service.*;
+import com.fdkankan.scene.util.CmdBuildUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -62,8 +63,7 @@ public class AiServiceImpl implements IAiService {
                     String outPath = aiWorkPath + prefix + File.separator;
                     FileUtil.mkdir(outPath);
                     String detectPath = outPath + "detect.json";
-                    String cmd = CmdConstant.PANO_DETECT.replace("@in",absolutePath).replace("@out", detectPath);
-                    CmdUtils.callLine(cmd, 50);
+                    CmdBuildUtil.potreeConverter("pano_detect", absolutePath, detectPath);
                 }catch (Exception e){
                     log.error("ai识别报错,inPath:{}", absolutePath, e);
                 }

+ 2 - 4
src/main/java/com/fdkankan/scene/service/impl/FloorplanAiServiceImpl.java

@@ -16,6 +16,7 @@ import com.fdkankan.scene.entity.SceneMarkShape;
 import com.fdkankan.scene.oss.OssUtil;
 import com.fdkankan.scene.service.FloorplanAiService;
 import com.fdkankan.scene.service.ISceneMarkShapeService;
+import com.fdkankan.scene.util.CmdBuildUtil;
 import com.fdkankan.scene.util.CmdUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -63,10 +64,7 @@ public class FloorplanAiServiceImpl implements FloorplanAiService {
             if(!FileUtil.exist(floorKeyPath)){
                 continue;
             }
-            String cmd = CmdConstant.LAYOUT_DETECT;
-            cmd = cmd.replace("@in", floorKeyPath);
-            cmd = cmd.replace("@out", detectPath);
-            CmdUtils.callLineWin(cmd, 50);
+            CmdBuildUtil.potreeConverter("layout_detect", floorKeyPath, detectPath);
             if (ComputerUtil.checkComputeCompleted(detectPath,5, 500)) {
                 result.put(subgroup, true);
             }

+ 15 - 194
src/main/java/com/fdkankan/scene/util/CmdBuildUtil.java

@@ -1,23 +1,12 @@
 package com.fdkankan.scene.util;
 
-import cn.hutool.core.io.FileUtil;
-import cn.hutool.core.util.StrUtil;
-import cn.hutool.core.util.XmlUtil;
-import cn.hutool.core.util.ZipUtil;
-import cn.hutool.extra.spring.SpringUtil;
 import cn.hutool.system.OsInfo;
 import cn.hutool.system.SystemUtil;
-import com.alibaba.fastjson.JSONObject;
-import com.fdkankan.common.util.FileUtils;
-import com.fdkankan.scene.config.FdkkLaserConfig;
 import com.fdkankan.scene.constant.CmdConstant;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
 
 import java.io.File;
-import java.io.IOException;
 
 /**
  * 判断是否是单机。然后调用bat或者shell
@@ -29,69 +18,8 @@ import java.io.IOException;
 @Component
 public class CmdBuildUtil {
 
+    private static final String BASH = "bash ";
     private static final OsInfo OS = SystemUtil.getOsInfo();
-    private static final FdkkLaserConfig fdkkLaserConfig = SpringUtil.getBean(FdkkLaserConfig.class);
-
-    public static void objTOGlb(String inPath, String outPath) {
-
-        String cp_folder = "";
-        if (CmdBuildUtil.OS.isLinux()) {
-            cp_folder = CmdConstant.OBJ_TO_GLB
-                    .replace("@inPath", inPath)
-                    .replace("@outPath", outPath);
-            CmdUtils.callLineSh(cp_folder);
-
-        } else {
-            cp_folder = CmdConstant.OBJ_TO_GLB_WIN
-                    .replace("@inPath", inPath)
-                    .replace("@outPath", outPath);
-            CmdUtils.callLine(cp_folder);
-        }
-    }
-
-    public static void DeleteFolder(String folder) {
-        String rm_folder = "";
-        if (CmdBuildUtil.OS.isLinux()) {
-            rm_folder = CmdConstant.RM_Folder.replace("@Folder", folder);
-            CmdUtils.callLineSh(rm_folder);
-
-        } else {
-            rm_folder = CmdConstant.RM_Folder_WIN.replace("@Folder", folder);
-            CmdUtils.callLine(rm_folder);
-        }
-    }
-
-    public static void MoveFolder(String folder, String target) {
-        String mv_folder = "";
-        if (CmdBuildUtil.OS.isLinux()) {
-            mv_folder = CmdConstant.MV_Folder
-                    .replace("@Folder", folder)
-                    .replace("@Target", target);
-            CmdUtils.callLineSh(mv_folder);
-
-        } else {
-            mv_folder = CmdConstant.MV_Folder_WIN
-                    .replace("@Folder", folder)
-                    .replace("@Target", target);
-            CmdUtils.callLine(mv_folder);
-        }
-    }
-
-    public static void CopyFolder(String folder, String target) {
-        String cp_folder = "";
-        if (CmdBuildUtil.OS.isLinux()) {
-            cp_folder = CmdConstant.CP_Folder
-                    .replace("@Folder", folder)
-                    .replace("@Target", target);
-            CmdUtils.callLineSh(cp_folder);
-
-        } else {
-            cp_folder = CmdConstant.CP_Folder_WIN
-                    .replace("@Folder", folder)
-                    .replace("@Target", target);
-            CmdUtils.callLine(cp_folder);
-        }
-    }
 
     public static void MkLinkDir(String Link, String target) {
         String cp_folder = "";
@@ -125,62 +53,10 @@ public class CmdBuildUtil {
         }
     }
 
-    public static void ZipFile(String path, String target, String inPath) {
-        String zipCmd = "";
-        if (CmdBuildUtil.OS.isLinux()) {
-            zipCmd = CmdConstant.ZIP
-                    .replace("@path", path)
-                    .replace("@target", target)
-                    .replace("@inPath", inPath);
-            if (StrUtil.isNotEmpty(zipCmd)) {
-                CmdUtils.callLineSh(zipCmd);
-            }
-        } else {
-            ZipUtil.zip(path + File.separator + inPath, target, false);
-        }
-    }
-
-    public static void MergeCutModel(String inPath, String outPath) {
-        String mergeCutModelCmd = "";
-        if (CmdBuildUtil.OS.isLinux()) {
-            mergeCutModelCmd = CmdConstant.MERGE_CUT_MODEL
-                    .replace("@inPath", inPath)
-                    .replace("@outPath", outPath);
-            CmdUtils.callLineSh(mergeCutModelCmd);
-
-        } else {
-            mergeCutModelCmd = CmdConstant.MERGE_CUT_MODEL_WIN
-                    .replace("@inPath", inPath)
-                    .replace("@outPath", outPath);
-            CmdUtils.callLine(mergeCutModelCmd);
-        }
-
-    }
-
-    public static void ConverterAddGeo(String param, String inPath, String outPath) {
-        String converterAddGeoCmd = "";
-        if (CmdBuildUtil.OS.isLinux()) {
-            converterAddGeoCmd = CmdConstant.CONVERTER_ADD_GEO
-                    .replace("@param", param)
-                    .replace("@inPath", inPath)
-                    .replace("@outPath", outPath);
-            CmdUtils.callLineSh(converterAddGeoCmd);
-
-        } else {
-            converterAddGeoCmd = CmdConstant.CONVERTER_ADD_GEO_WIN
-                    .replace("@param", param)
-                    .replace("@inPath", inPath)
-                    .replace("@outPath", outPath);
-            CmdUtils.callLine(converterAddGeoCmd);
-
-        }
-
-    }
-
     public static void BuildModelCommand(String buildCallPath, String inPath) {
         String buildModelCommandCmd = "";
         if (CmdBuildUtil.OS.isLinux()) {
-            buildModelCommandCmd = CmdConstant.BUILD_MODEL_COMMAND
+            buildModelCommandCmd = BASH + CmdConstant.BUILD_MODEL_COMMAND
                     .replace("@inPath", inPath);
             CmdUtils.callLineSh(buildModelCommandCmd);
 
@@ -192,77 +68,10 @@ public class CmdBuildUtil {
         }
     }
 
-    public static void Build3dtilesModel(String inPath) {
-        String buildModelCommandCmd = CmdConstant.BUILD_3DTILES_MODEL_COMMAND_WIN
-                .replace("@inPath", inPath);
-        CmdUtils.callLineWin(buildModelCommandCmd);
-    }
-
-    static void KillBuildModelCommand() {
-        String buildModelCommandCmd = "";
-        if (CmdBuildUtil.OS.isLinux()) {
-            buildModelCommandCmd = CmdConstant.KILL_BUILD_MODEL_COMMAND;
-            CmdUtils.callLineSh(buildModelCommandCmd);
-
-        } else {
-            buildModelCommandCmd = CmdConstant.KILL_BUILD_MODEL_COMMAND_WIN;
-            CmdUtils.callLine(buildModelCommandCmd);
-
-        }
-    }
-
-
-    public static void TiledMap(String inPath) {
-        String tiledMapCmd = "";
-        if (CmdBuildUtil.OS.isLinux()) {
-            tiledMapCmd = CmdConstant.TILED_MAP
-                    .replace("@inPath", inPath);
-            CmdUtils.callLineSh(tiledMapCmd);
-
-        } else {
-            tiledMapCmd = CmdConstant.TILED_MAP_WIN
-                    .replace("@inPath", inPath);
-            CmdUtils.callLine(tiledMapCmd);
-        }
-
-    }
-
-    public static void LasToBin(String inPath, String outPath) {
-        String lasToBinCmd = "";
-        if (CmdBuildUtil.OS.isLinux()) {
-            lasToBinCmd = CmdConstant.LAS_TO_BIN
-                    .replace("@inPath", inPath)
-                    .replace("@outPath", outPath);
-            CmdUtils.callLineSh(lasToBinCmd);
-
-        } else {
-            lasToBinCmd = CmdConstant.LAS_TO_BIN_WIN
-                    .replace("@inPath", inPath)
-                    .replace("@outPath", outPath);
-            CmdUtils.callLine(lasToBinCmd);
-        }
-    }
-
-    public static void CheckLaser(String inPath, String outPath) {
-        String checkLaserCmd = "";
-        if (CmdBuildUtil.OS.isLinux()) {
-            checkLaserCmd = CmdConstant.CHECK_LASER
-                    .replace("@inPath", inPath)
-                    .replace("@outPath", outPath);
-            CmdUtils.callLineSh(checkLaserCmd);
-        } else {
-            checkLaserCmd = CmdConstant.CHECK_LASER_WIN
-                    .replace("@inPath", inPath)
-                    .replace("@outPath", outPath);
-            CmdUtils.callLine(checkLaserCmd);
-
-        }
-
-    }
     public static void Obj2Tiles(String buildCallPath, String inPath) {
         String checkLaserCmd = "";
         if (CmdBuildUtil.OS.isLinux()) {
-            checkLaserCmd = CmdConstant.OBJ2_TILES
+            checkLaserCmd = BASH + CmdConstant.OBJ2_TILES
                     .replace("@inPath", inPath);
             CmdUtils.callLineSh(checkLaserCmd);
         } else {
@@ -271,6 +80,18 @@ public class CmdBuildUtil {
             CmdUtils.callLineWin(checkLaserCmd);
 
         }
+    }
 
+    public static void potreeConverter(String param, String inPath, String outPath) {
+        String potreeConverterCmd = "";
+        if (CmdBuildUtil.OS.isLinux()) {
+            potreeConverterCmd = BASH + CmdConstant.POTREE_CONVERTER.replace("@param", param)
+                    .replace("@inPath", inPath).replace("@outPath", outPath);
+            CmdUtils.callLineSh(potreeConverterCmd);
+        } else {
+            potreeConverterCmd = CmdConstant.OBJ2_TILES_WIN.replace("@param", param)
+                    .replace("@inPath", inPath).replace("@outPath", outPath);
+            CmdUtils.callLineWin(potreeConverterCmd);
+        }
     }
 }