|
@@ -179,7 +179,7 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
|
throw new RuntimeException("建模失败!");
|
|
|
}
|
|
|
|
|
|
- Map<String, String> uploadFiles = getUploadFiles(path);
|
|
|
+ Map<String, String> uploadFiles = getUploadFiles(path,cameraType,fdageData);
|
|
|
|
|
|
//建模成功走以下逻辑
|
|
|
log.info("cameraType:{}",cameraType);
|
|
@@ -282,7 +282,7 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private Map<String, String> getUploadFiles(String path) throws Exception {
|
|
|
+ private Map<String, String> getUploadFiles(String path,Integer cameraType,JSONObject fdageData) throws Exception {
|
|
|
ScenePlus scenePlus = scenePlusService.getByFileId(path);
|
|
|
if (ObjectUtils.isEmpty(scenePlus)) {
|
|
|
throw new Exception("未找到场景信息:" + path);
|
|
@@ -355,9 +355,16 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- CreateObjUtil.convertTxtToDam(resultsPath + "tex" + File.separator + "modeldata.txt", resultsPath + ConstantFileName.modelUUID + "_50k.dam");
|
|
|
- CreateObjUtil.convertDamToLzma(resultsPath);
|
|
|
- CreateObjUtil.convertTxtToDam(resultsPath + "tex" + File.separator + "modeldata.txt", resultsPath + ConstantFileName.modelUUID + "_50k.dam");
|
|
|
+
|
|
|
+ if ((fdageData.containsKey("exportMeshObj") && fdageData.getIntValue("exportMeshObj") == 1)
|
|
|
+ || (!ObjectUtils.isEmpty(cameraType) && (!cameraType.equals(14)))) {
|
|
|
+ CreateObjUtil.convertTxtToDam(path + File.separator + "results" + File.separator + "tex" + File.separator + "modeldata.txt", path + File.separator + "results" + File.separator + ConstantFileName.modelUUID + "_50k.dam");
|
|
|
+ CreateObjUtil.convertDamToLzma(path + File.separator + "results");
|
|
|
+ CreateObjUtil.convertTxtToDam(path + File.separator + "results" + File.separator + "tex" + File.separator + "modeldata.txt", path + File.separator + "results" + File.separator + ConstantFileName.modelUUID + "_50k.dam");
|
|
|
+ map.put(path + File.separator + "results" + File.separator + ConstantFileName.modelUUID + "_50k.dam.lzma", "images/images" + projectNum + "/" + ConstantFileName.modelUUID + "_50k.dam.lzma");
|
|
|
+ map.put(path + File.separator + "results" + File.separator + ConstantFileName.modelUUID + "_50k.dam", "images/images" + projectNum + "/" + ConstantFileName.modelUUID + "_50k.dam");
|
|
|
+ }
|
|
|
+
|
|
|
CreateObjUtil.convertTxtToVisionmodeldata(resultsPath + "vision.txt", resultsPath + "vision.modeldata");
|
|
|
map.put(resultsPath + "vision.txt", imagesPath + "vision.txt");
|
|
|
map.put(resultsPath + "vision.modeldata", imagesPath + "vision.modeldata");
|