Przeglądaj źródła

修改json geometryfile相关部分

caizm 2 lat temu
rodzic
commit
4f9b8722c3

BIN
CAE_Solution/Libs/gmsh/win/gmsh-git-Windows64-sdk/bin/gmsh-4.11.dll


+ 28 - 7
CAE_Solution/src/acis/cmdmainprocess.cpp

@@ -35,10 +35,13 @@ cmdMainProcess::cmdMainProcess()
     szmp_iso_edge_t_ = nullptr;
     szmp_iso_point_t_ = nullptr;
     SampleUtils_ = NULL;//new DPMvolClass();
+    object = NULL;
 }
 
 cmdMainProcess::~cmdMainProcess()
 {
+    if(object)
+        object = NULL;
 }
 
 /**
@@ -73,6 +76,18 @@ void cmdMainProcess::closeACIS()
     exit_on_bad_outcome(api_terminate_3dpm_bridge());
     exit_on_bad_outcome(api_stop_modeller());//删除内部数据结构
 }
+
+/*
+ * @brief:set boostjsonobject into cmdmainprocess
+ * @param:[in]object
+ * @ret:void
+ * @birth:created by czm in 20230831
+ */
+void cmdMainProcess::setJsonObject(boostJsonObject *object)
+{
+    this->object = object;
+}
+
 /**
 * @brief CreateProcess Geometry
 *
@@ -239,6 +254,7 @@ bool cmdMainProcess::CreateProcess_(string pathGeo)
 */
 bool cmdMainProcess::CreateProcess_(string pathGeo, string pathParam)
 {
+    Q_UNUSED(pathParam);
     // Note that 3DPM-Hexa does not respect the input surface mesh //3dpm-hexa不遵循曲面网格
     // If USE_HEXA is set to 1,
     // then both APPLY_PERIODICITY and USE_LOCAL_PHYSICAL_SIZE are set to 0
@@ -373,8 +389,13 @@ bool cmdMainProcess::CreateProcess_(string pathGeo, string pathParam)
     printf("path:%s\n",dDir.toLatin1().data());
     ADIParam_.useDefaultParam();
     CRWriteFile* crw = new CRWriteFile();
-    if (!crw->ReadXmlParamFile(ADIParam_, pathParam.c_str()))
+
+    //if (!crw->ReadXmlParamFile(ADIParam_, pathParam.c_str()))
+        //return false;
+
+    if (!crw->ReadXmlParam(ADIParam_,object))//0831append
         return false;
+
     //3.--create surf.0
     Createcadsurf(ents, cadsurf_);
     //4.--Set parameters and create mesh
@@ -436,16 +457,16 @@ bool cmdMainProcess::CreateProcess_(string pathGeo, string pathParam)
     }
 
     //8.start show
-    QProcess *process = new QProcess;
+    //QProcess *process = new QProcess;
 
     //process->setWorkingDirectory("..\\");
 
     //process->setWorkingDirectory("E:\\QY_Case\\MainWndTest\\case01\\trunk\\x64\\Release202010\\Release\\gmsh-4.3.0-Windows64");
-    QStringList strLName;
-    strLName << QString(appPath+strName);
+    //QStringList strLName;
+    //strLName << QString(appPath+strName);
 #ifdef _WIN32
     //process->start("E:\\QY_Case\\MainWndTest\\case01\\trunk\\x64\\Release202010\\Release\\gmsh-4.3.0-Windows64\\gmsh.exe", strLName);
-    process->start("..\\..\\Libs\\gmsh\\win\\gmsh-git-Windows64-sdk\\bin\\gmsh.exe",strLName);
+    //process->start("..\\..\\Libs\\gmsh\\win\\gmsh-git-Windows64-sdk\\bin\\gmsh.exe",strLName);
 #else
 
 #endif
@@ -1181,10 +1202,10 @@ void cmdMainProcess::createVol(int istyle,ENTITY_LIST &cells)
     //-----
     //7.start show for qy --only for self show
     QProcess *process = new QProcess;
-    process->setWorkingDirectory("E:\\QY_Case\\MainWndTest\\case01\\trunk\\x64\\Release202010\\Release\\gmsh-4.3.0-Windows64");
+    process->setWorkingDirectory("F:\\czm\\qt_demo\\build-test_hoops-Desktop_Qt_5_12_0_MSVC2015_64bit-Debug\\debug\\gmsh");
     QStringList strLName;
     strLName << QString(appPath + strName);
-    process->start("E:\\QY_Case\\MainWndTest\\case01\\trunk\\x64\\Release202010\\Release\\gmsh-4.3.0-Windows64\\gmsh.exe", strLName);
+    process->start("F:\\czm\\qt_demo\\build-test_hoops-Desktop_Qt_5_12_0_MSVC2015_64bit-Debug\\debug\\gmsh\\win\\gmsh-git-Windows64-sdk\\bin\\gmsh.exe", strLName);
     if(crw!=NULL){
         delete crw;
         crw = NULL;

+ 3 - 0
CAE_Solution/src/acis/cmdmainprocess.h

@@ -61,6 +61,8 @@ private:
     meshgems_sizemap_t* szmp_iso_point_t_;
 
     DPMvolClass *SampleUtils_;
+
+    boostJsonObject *object;//0831 append
 private:
     Spa3dpm::Parameters setADIParamTo3dpm(const DPM_ADIParam &p);
     bool Createcadsurf(const ENTITY_LIST &inEnts, Spa3dpm::CadSurfSession &surf);
@@ -75,6 +77,7 @@ private:
     void closeACIS();
     //some
     //static meshgems_status_t size_iso_edge(meshgems_integer edge_id, meshgems_real t, meshgems_real *size, void *user_data);
+    void setJsonObject(boostJsonObject* object);
 };
 
 #endif // CMDMAINPROCESS_H

+ 135 - 26
CAE_Solution/src/acis/rwritefile.cpp

@@ -89,10 +89,10 @@ void CRWriteFile::WriteNeuFoamFile(const Spa3dpm::Mesh &sub, const char *fileNam
 
 
     int cell_list_total_cnt = Tri_cell_list_total_cnt + \
-        Quad_cell_list_total_cnt + \
-        Tetra_cell_list_total_cnt + \
-        hexa_cell_list_total_cnt + \
-        Prism_cell_list_total_cnt;
+            Quad_cell_list_total_cnt + \
+            Tetra_cell_list_total_cnt + \
+            hexa_cell_list_total_cnt + \
+            Prism_cell_list_total_cnt;
 
     int idIndex = 1;
     if (cells_count != 0)
@@ -109,7 +109,7 @@ void CRWriteFile::WriteNeuFoamFile(const Spa3dpm::Mesh &sub, const char *fileNam
             int dd[8];
             sub.HexahedronVertices(kk, dd);
             os << QString("%1 4 8 %2 %3 %4 %5 %6 %7 %8").arg(idIndex).arg(dd[0]).arg(dd[4]).arg(dd[1]).arg(dd[5])\
-                .arg(dd[3]).arg(dd[7]).arg(dd[2])<< endl;
+                    .arg(dd[3]).arg(dd[7]).arg(dd[2])<< endl;
             os<<QString("%1").arg(dd[6]) << endl;
         }
         for (int kk = 1; kk <= PrismCount; ++kk, idIndex++)
@@ -117,14 +117,14 @@ void CRWriteFile::WriteNeuFoamFile(const Spa3dpm::Mesh &sub, const char *fileNam
             int dd[6];
             sub.PrismVertices(kk, dd);
             os << QString("%1 5 6 %2 %3 %4 %5 %6 %7").arg(idIndex).arg(dd[0]).arg(dd[2]).arg(dd[1]).arg(dd[3] )\
-                .arg(dd[5]).arg(dd[4]) << endl;
+                    .arg(dd[5]).arg(dd[4]) << endl;
         }
         for (int kk = 1; kk <= pyCount; ++kk, idIndex++)
         {
             int dd[5];
             sub.PyramidVertices(kk, dd);
             os << QString("%1 7 5 %2 %3 %4 %5 %6").arg(idIndex).arg(dd[0]).arg(dd[1]).arg(dd[3]).arg(dd[2])\
-                .arg(dd[4]) << endl;
+                    .arg(dd[4]) << endl;
         }
 
         os << "ENDOFSECTION" << endl;
@@ -190,10 +190,10 @@ void CRWriteFile::WirteVtkFoamFile(const Spa3dpm::Mesh &sub, const char *fileNam
 
     int cells_count = TriangleCount + QuadCount + TetraCount + hexaCount + PrismCount;
     int cell_list_total_cnt = Tri_cell_list_total_cnt + \
-        Quad_cell_list_total_cnt + \
-        Tetra_cell_list_total_cnt + \
-        hexa_cell_list_total_cnt + \
-        Prism_cell_list_total_cnt;
+            Quad_cell_list_total_cnt + \
+            Tetra_cell_list_total_cnt + \
+            hexa_cell_list_total_cnt + \
+            Prism_cell_list_total_cnt;
     if (cells_count != 0)
     {
         os << QString("CELLS %1 %2").arg(cells_count).arg(cell_list_total_cnt) << endl;
@@ -220,14 +220,14 @@ void CRWriteFile::WirteVtkFoamFile(const Spa3dpm::Mesh &sub, const char *fileNam
             int dd[8];
             sub.HexahedronVertices(kk, dd);
             os << QString("8 %1 %2 %3 %4 %5 %6 %7 %8").arg(dd[0] - 1).arg(dd[1] - 1).arg(dd[2] - 1).arg(dd[3] - 1)\
-                .arg(dd[4] - 1).arg(dd[5] - 1).arg(dd[6] - 1).arg(dd[7] - 1) << endl;
+                    .arg(dd[4] - 1).arg(dd[5] - 1).arg(dd[6] - 1).arg(dd[7] - 1) << endl;
         }
         for (int kk = 1; kk <= PrismCount; ++kk)
         {
             int dd[6];
             sub.PrismVertices(kk, dd);
             os << QString("6 %1 %2 %3 %4 %5 %6").arg(dd[0] - 1).arg(dd[1] - 1).arg(dd[2] - 1).arg(dd[3] - 1)\
-                .arg(dd[4] - 1).arg(dd[5] - 1) << endl;
+                    .arg(dd[4] - 1).arg(dd[5] - 1) << endl;
         }
 
         os << QString("CELL_TYPES %1").arg(cells_count) << endl;
@@ -317,10 +317,10 @@ void CRWriteFile::WirteBDFFoamFile(const Spa3dpm::Mesh &sub, const char *fileNam
 
     int cells_count = TriangleCount + QuadCount + TetraCount + hexaCount + PrismCount;
     int cell_list_total_cnt = Tri_cell_list_total_cnt + \
-        Quad_cell_list_total_cnt + \
-        Tetra_cell_list_total_cnt + \
-        hexa_cell_list_total_cnt + \
-        Prism_cell_list_total_cnt;
+            Quad_cell_list_total_cnt + \
+            Tetra_cell_list_total_cnt + \
+            hexa_cell_list_total_cnt + \
+            Prism_cell_list_total_cnt;
 
     os << "$ Pset: will be imported as: " << endl;
 
@@ -588,21 +588,21 @@ void CRWriteFile::WirteUgridFoamFile(const Spa3dpm::Mesh &sub, const char *fileN
         int dd[5];
         sub.PyramidVertices(kk, dd);
         os << QString("%1 %2 %3 %4 %5").arg(dd[0]).arg(dd[1]).arg(dd[2]).arg(dd[3])\
-            .arg(dd[4]) << endl;
+                .arg(dd[4]) << endl;
     }
     for (int kk = 1; kk <= PrismCount; ++kk)
     {
         int dd[6];
         sub.PrismVertices(kk, dd);
         os << QString("%1 %2 %3 %4 %5 %6").arg(dd[0]).arg(dd[1]).arg(dd[2]).arg(dd[3])\
-            .arg(dd[4]).arg(dd[5]) << endl;
+                .arg(dd[4]).arg(dd[5]) << endl;
     }
     for (int kk = 1; kk <= hexaCount; ++kk)
     {
         int dd[8];
         sub.HexahedronVertices(kk, dd);
         os << QString("%1 %2 %3 %4 %5 %6 %7 %8").arg(dd[0]).arg(dd[1]).arg(dd[2]).arg(dd[3])\
-            .arg(dd[4]).arg(dd[5]).arg(dd[6]).arg(dd[7]) << endl;
+                .arg(dd[4]).arg(dd[5]).arg(dd[6]).arg(dd[7]) << endl;
     }
     os << endl;
     file.close();
@@ -665,10 +665,10 @@ bool CRWriteFile::ReadXmlParamFile(DPM_ADIParam &ADIParam, const char*fileName)
                 //读取结果文件格式输出
                 if (titleParam == "ResultFormat") {
                     strParamTmp = m.attribute("Format");
-                if (!strParamTmp.isEmpty())
-                {
-                    ADIParam.strResultFormat = strParamTmp;
-                }
+                    if (!strParamTmp.isEmpty())
+                    {
+                        ADIParam.strResultFormat = strParamTmp;
+                    }
                 }
                 //参数读取--面网格
                 else if (titleParam == "surfParam")
@@ -814,7 +814,7 @@ bool CRWriteFile::ReadXmlParamFile(DPM_ADIParam &ADIParam, const char*fileName)
                                 QDomElement Physical_m0 = PhysicalNode0.toElement();
                                 QDomNodeList list0 = Physical_m0.childNodes();
                                 QString titlePhysicalParam0 = Physical_m0.tagName();//
-                                                                                    //PhysicalNode = PhysicalNode.nextSibling();//下一个兄弟节点
+                                //PhysicalNode = PhysicalNode.nextSibling();//下一个兄弟节点
                                 for (int ss = 0; ss < list0.count(); ++ss)
                                 {
                                     QDomNode PhysicalNode1 = list0.at(ss);
@@ -957,7 +957,7 @@ bool CRWriteFile::ReadXmlParamFile(DPM_ADIParam &ADIParam, const char*fileName)
 
                     }
                     printf("Read HexaParam Ok! \n");
-}
+                }
             }
             printf("nextSibling \n");
             nNode= docElem.nextSibling();//下一个兄弟节点
@@ -967,3 +967,112 @@ bool CRWriteFile::ReadXmlParamFile(DPM_ADIParam &ADIParam, const char*fileName)
 
     return true;
 }
+
+/*
+ * @brief: read adiparam from json
+ * @param: [out]adiparam [in] object
+ * @ret: bool
+ * @birth: created by czm in 20230829
+ */
+bool CRWriteFile::ReadXmlParam(DPM_ADIParam &ADIParam, boostJsonObject *object)
+{
+    if(!object)return false;
+    if(!object->da_struct->strResultFormat.empty())
+        ADIParam.strResultFormat = QString::fromStdString(object->da_struct->strResultFormat);
+    if(object->da_struct->surfParam0){
+        ADIParam.surfParam.max_size = QString::fromStdString(object->da_struct->surfParam->max_size);
+        ADIParam.surfParam.min_size = QString::fromStdString(object->da_struct->surfParam->min_size);
+        ADIParam.surfParam.SurfStyle = QString::fromStdString(object->da_struct->surfParam->SurfStyle);
+        ADIParam.surfParam.Global_physical_size = QString::fromStdString(object->da_struct->surfParam->Global_physical_size);
+    }
+    //surfparam1
+    if(object->da_struct->surfParam1){
+        ADIParam.surfParam.gradation = QString::fromStdString(object->da_struct->surfParam->gradation);
+        ADIParam.surfParam.anisotropic_ratio = QString::fromStdString(object->da_struct->surfParam->anisotropic_ratio);
+        ADIParam.surfParam.chordal_error = QString::fromStdString(object->da_struct->surfParam->chordal_error);
+        ADIParam.surfParam.geometric_approximation_angle = QString::fromStdString(object->da_struct->surfParam->geometric_approximation_angle);
+        ADIParam.surfParam.debug = QString::fromStdString(object->da_struct->surfParam->Debug);
+        ADIParam.surfParam.closed_geometry = QString::fromStdString(object->da_struct->surfParam->closed_geometry);
+        ADIParam.surfParam.enforce_cad_edge_sizes = QString::fromStdString(object->da_struct->surfParam->enforce_cad_edge_sizes);
+        ADIParam.surfParam.force_bad_surface_element_removal = QString::fromStdString(object->da_struct->surfParam->force_bad_surface_element_removal);
+        ADIParam.surfParam.discard_input_topology = QString::fromStdString(object->da_struct->surfParam->discard_input_topology);
+        ADIParam.surfParam.create_tag_on_collision = QString::fromStdString(object->da_struct->surfParam->create_tag_on_collision);
+    }
+    //surfparam2
+    if(object->da_struct->surfParam2){
+        ADIParam.surfParam.element_order = QString::fromStdString(object->da_struct->surfParam->element_order);
+        ADIParam.surfParam.remove_duplicate_cad_faces = QString::fromStdString(object->da_struct->surfParam->remove_duplicate_cad_faces);
+        ADIParam.surfParam.scaled_jacobian_threshold_value = QString::fromStdString(object->da_struct->surfParam->scaled_jacobian_threshold_value);
+        ADIParam.surfParam.optimisation = QString::fromStdString(object->da_struct->surfParam->optimisation);
+        ADIParam.surfParam.correct_surface_intersections = QString::fromStdString(object->da_struct->surfParam->correct_surface_intersections);
+    }
+#if 0
+    //mgPhysical
+    if(object->da_struct->mgPhysical_){
+        if(object->da_struct->mgPhysical_type == "physical"){
+            ADIParam.surfParam.physical_size_mode = QString::fromStdString(object->da_struct->surfParam->physical_size_mode);
+            if(ADIParam.surfParam.physical_size_mode == "local"){
+                ADIParam.surfParam.physicalSizeFaceId = QString::fromStdString(object->da_struct->surfParam->physicalSizeFaceId);
+                ADIParam.surfParam.physicalSizeEdgeId = QString::fromStdString(object->da_struct->surfParam->physicalSizeEdgeId);
+                ADIParam.surfParam.physicalSizePointId = QString::fromStdString(object->da_struct->surfParam->physicalSizePointId);
+            }
+        }else if(object->da_struct->mgPhysical_type == "param"){
+            ADIParam.surfParam.physicalSizeFaceId = QString::fromStdString(object->da_struct->surfParam->physicalSizeFaceId);
+            ADIParam.surfParam.physicalSizeEdgeId = QString::fromStdString(object->da_struct->surfParam->physicalSizeEdgeId);
+            ADIParam.surfParam.physicalSizePointId = QString::fromStdString(object->da_struct->surfParam->physicalSizePointId);
+        }
+    }
+    //mgGeometry
+    if(object->da_struct->mgGeometry_){
+        if(object->da_struct->mgGeometry_type == "Geometry"){
+            ADIParam.surfParam.geometric_size_mode = QString::fromStdString(object->da_struct->surfParam->geometric_size_mode);
+            if(ADIParam.surfParam.geometric_size_mode == "local"){
+                ADIParam.surfParam.geometricSizeFaceId = QString::fromStdString(object->da_struct->surfParam->geometricSizeFaceId);
+                ADIParam.surfParam.geometricSizeEdgeId = QString::fromStdString(object->da_struct->surfParam->geometricSizeEdgeId);
+                ADIParam.surfParam.geometricSizePointId = QString::fromStdString(object->da_struct->surfParam->geometricSizePointId);
+            }
+        }else if(object->da_struct->mgGeometry_type == "param")
+        {
+            ADIParam.surfParam.physicalSizeFaceId = QString::fromStdString(object->da_struct->surfParam->physicalSizeFaceId);
+            ADIParam.surfParam.physicalSizeEdgeId = QString::fromStdString(object->da_struct->surfParam->physicalSizeEdgeId);
+            ADIParam.surfParam.physicalSizePointId = QString::fromStdString(object->da_struct->surfParam->physicalSizePointId);
+        }
+    }
+#endif
+    //cleanerParam
+    if(object->da_struct->bCleanerSection){
+        ADIParam.bCleanerSection = object->da_struct->bCleanerSection;
+        ADIParam.clrParam.folding_angle = QString::fromStdString(object->da_struct->clrParam->folding_angle);
+        ADIParam.clrParam.min_hole_size = QString::fromStdString(object->da_struct->clrParam->min_hole_size);
+        ADIParam.clrParam.overlap_distance = QString::fromStdString(object->da_struct->clrParam->overlap_distance);
+        ADIParam.clrParam.use_default_settings_for = QString::fromStdString(object->da_struct->clrParam->use_default_settings_for);
+        ADIParam.clrParam.overlap_angle = QString::fromStdString(object->da_struct->clrParam->overlap_angle);
+        ADIParam.clrParam.resolution_length = QString::fromStdString(object->da_struct->clrParam->resolution_length);
+    }
+    //tetraparam
+    if(object->da_struct->TetraParam_){
+        ADIParam.tetraParam.components = QString::fromStdString(object->da_struct->tetraParam->components);
+        ADIParam.tetraParam.gradation = QString::fromStdString(object->da_struct->tetraParam->gradation);
+        ADIParam.tetraParam.min_size = QString::fromStdString(object->da_struct->tetraParam->min_size);
+        ADIParam.tetraParam.max_size = QString::fromStdString(object->da_struct->tetraParam->max_size);
+        //ADIParam.style = 1;
+    }
+
+    //hexaparam
+    if(object->da_struct->HexaParam_){
+        ADIParam.hexaParam.components = QString::fromStdString(object->da_struct->hexaParam->components);
+        ADIParam.hexaParam.min_size = QString::fromStdString(object->da_struct->hexaParam->min_size);
+    }
+
+    //hybrid
+    if(object->da_struct->HybridParaml_){
+        ADIParam.hybridParam.HybridStyle = QString::fromStdString(object->da_struct->hybridParam->HybridStyle);
+        //ADIParam.style = 3;
+        ADIParam.hybridParam.number_of_boundary_layers = QString::fromStdString(object->da_struct->hybridParam->number_of_boundary_layers);
+        ADIParam.hybridParam.normal_direction = QString::fromStdString(object->da_struct->hybridParam->normal_direction);
+        ADIParam.hybridParam.boundary_layer_global_initial_height = QString::fromStdString(object->da_struct->hybridParam->boundary_layer_global_initial_height);
+        ADIParam.hybridParam.boundary_layer_geometric_progression = QString::fromStdString(object->da_struct->hybridParam->boundary_layer_geometric_progression);
+    }
+    ADIParam.style = object->da_struct->style;
+    return true;
+}

+ 3 - 0
CAE_Solution/src/acis/rwritefile.h

@@ -9,6 +9,8 @@
 #include "dataClass.h"
 #include "SPA3dPm.hxx"
 
+#include "../threadPool_and_statemachine/dealWith/boostjsonobject.h"
+
 class CRWriteFile
 {
 public:
@@ -24,6 +26,7 @@ public:
         void WirteUgridFoamFile(const Spa3dpm::Mesh & sub, const char * fileName);
         void WirteVtkFoamFile(const Spa3dpm::Mesh & sub, const char * fileName);
         bool ReadXmlParamFile(DPM_ADIParam &ADIParam, const char*fileName);
+        bool ReadXmlParam(DPM_ADIParam &ADIParam,boostJsonObject* object);
 };
 
 #endif // RWRITEFILE_H

+ 165 - 8
CAE_Solution/src/threadPool_and_statemachine/dealWith/boostjsonobject.cpp

@@ -15,7 +15,8 @@ boostJsonObject::boostJsonObject()
     sd_struct = NULL;
     sm_struct = NULL;
     ci_struct = NULL;
-    ai_struct = NULL;
+    ag_struct = NULL;
+    da_struct = NULL;
     usrId.clear();
     solverConfigid.clear();
     proId.clear();
@@ -65,9 +66,13 @@ boostJsonObject::~boostJsonObject()
     }
     qDeleteAll(vec_sd_struct);
 
-    if(ai_struct){
-        delete ai_struct;
-        ai_struct = NULL;
+    if(ag_struct){
+        delete ag_struct;
+        ag_struct = NULL;
+    }
+    if(da_struct){
+        delete da_struct;
+        da_struct = NULL;
     }
 }
 
@@ -145,7 +150,13 @@ boostJsonObject *boostJsonObject::operator=(boostJsonObject *object)
     this->vec_sd_struct = object->vec_sd_struct;
     this->sm_struct = object->sm_struct;
     this->ci_struct = object->ci_struct;
-    this->ai_struct = object->ai_struct;
+    this->ag_struct = object->ag_struct;
+    this->da_struct = object->da_struct;
+    this->da_struct->clrParam = object->da_struct->clrParam;
+    this->da_struct->hexaParam = object->da_struct->hexaParam;
+    this->da_struct->hybridParam = object->da_struct->hybridParam;
+    this->da_struct->surfParam = object->da_struct->surfParam;
+    this->da_struct->tetraParam = object->da_struct->tetraParam;
     return this;
 }
 
@@ -384,9 +395,155 @@ void boostJsonObject::FromParamJson(string param)
         ci_struct->isVolume = root.get<std::string>("isVolume");
     }else if(this->action == "readIgs")
     {
-        ai_struct = new acis_igs_struct();
-        ai_struct->igsPath = root.get<std::string>("igsPath");
-        ai_struct->xmlPath = root.get<std::string>("xmlPath");
+        ag_struct = new acis_geo_struct();
+        ag_struct->geoPath = root.get<std::string>("geometryFile");
+    }else if(this->action == "meshSplit"){
+        da_struct = new DPM_ADIParam_struct();
+        da_struct->clrParam = new CleanerParam_struct();
+        da_struct->hexaParam = new HexaParam_struct();
+        da_struct->hybridParam = new HybridParam_struct();
+        da_struct->surfParam = new surfParam_struct();
+        da_struct->tetraParam = new TetraParam_struct();
+        da_struct->strResultFormat = root.get<std::string>("strResultFormat");
+
+        try{
+            boost::property_tree::ptree sur_data = root.get_child("surfParam");
+            da_struct->surfParam0 = true;
+            da_struct->surfParam->max_size = sur_data.get<std::string>("max_size");
+            da_struct->surfParam->min_size = sur_data.get<std::string>("min_size");
+            da_struct->surfParam->SurfStyle = sur_data.get<std::string>("surfStyle");
+            da_struct->surfParam->Global_physical_size = sur_data.get<std::string>("global_physical_size");
+        }catch(exception ex){
+            std::cout<<"-----no surfParam-----"<<std::endl;
+            da_struct->surfParam0 = false;
+        }
+
+        try{
+            boost::property_tree::ptree sur1_data = root.get_child("surfParam1");
+            da_struct->surfParam1 = true;
+            da_struct->surfParam->gradation = sur1_data.get<std::string>("gradation");
+            da_struct->surfParam->anisotropic_ratio = sur1_data.get<std::string>("anisotropic_ratio");
+            da_struct->surfParam->chordal_error = sur1_data.get<std::string>("chordal_error");
+            da_struct->surfParam->geometric_approximation_angle = sur1_data.get<std::string>("geometric_approximation_angle");
+            da_struct->surfParam->Debug = sur1_data.get<std::string>("debug");
+            da_struct->surfParam->closed_geometry = sur1_data.get<std::string>("closed_geometry");
+            da_struct->surfParam->enforce_cad_edge_sizes = sur1_data.get<std::string>("enforce_cad_edge_sizes");
+            da_struct->surfParam->force_bad_surface_element_removal = sur1_data.get<std::string>("force_bad_surface_element_removal");
+            da_struct->surfParam->discard_input_topology = sur1_data.get<std::string>("discard_input_topology");
+            da_struct->surfParam->create_tag_on_collision = sur1_data.get<std::string>("create_tag_on_collision");
+        }catch(exception ex){
+            std::cout<<"-----no surfParam1-----"<<std::endl;
+            da_struct->surfParam1 = false;
+        }
+
+        try{
+            boost::property_tree::ptree sur2_data = root.get_child("surfParam2");
+            da_struct->surfParam2 = true;
+            da_struct->surfParam->element_order = sur2_data.get<std::string>("element_order");
+            da_struct->surfParam->remove_duplicate_cad_faces = sur2_data.get<std::string>("remove_duplicate_cad_faces");
+            da_struct->surfParam->scaled_jacobian_threshold_value = sur2_data.get<std::string>("scaled_jacobian_threshold_value");
+            da_struct->surfParam->optimisation = sur2_data.get<std::string>("optimisation");
+            da_struct->surfParam->correct_surface_intersections = sur2_data.get<std::string>("correct_surface_intersections");
+        }catch(exception ex){
+            std::cout<<"-----no surfParam2-----"<<std::endl;
+            da_struct->surfParam2 = false;
+        }
+#if 0
+        try{
+            boost::property_tree::ptree mg_data = root.get_child("mgPhysical");
+            da_struct->mgPhysical_type = mg_data.get<std::string>("type");
+            da_struct->mgPhysical_ = true;
+            if(da_struct->mgPhysical_type == "physical")
+            {
+                da_struct->surfParam->physical_size_mode = mg_data.get<std::string>("physical_size_mode");
+                if(da_struct->surfParam->physical_size_mode == "local"){
+                    da_struct->surfParam->physicalSizeFaceId = mg_data.get<std::string>("face_id");
+                    da_struct->surfParam->physicalSizeEdgeId = mg_data.get<std::string>("edge_id");
+                    da_struct->surfParam->physicalSizePointId = mg_data.get<std::string>("point_id");
+                }
+            }else if(da_struct->mgPhysical_type == "param"){
+                da_struct->surfParam->physicalSizeFaceId = mg_data.get<std::string>("face_id");
+                da_struct->surfParam->physicalSizeEdgeId = mg_data.get<std::string>("edge_id");
+                da_struct->surfParam->physicalSizePointId = mg_data.get<std::string>("point_id");
+            }
+        }catch(exception ex){
+            std::cout<<"-----no mgPhysical-----"<<std::endl;
+            da_struct->mgPhysical_ = false;
+        }
+
+        try{
+            boost::property_tree::ptree mgg_data = root.get_child("mgGeometry");
+            da_struct->mgGeometry_type = mgg_data.get<std::string>("type");
+            da_struct->mgGeometry_ = true;
+            if(da_struct->mgGeometry_type == "Geometry"){
+                da_struct->surfParam->geometric_size_mode = mgg_data.get<std::string>("geometric_size_mode");
+                if(da_struct->surfParam->geometric_size_mode == "local"){
+                    da_struct->surfParam->geometricSizeFaceId = mgg_data.get<std::string>("face_id");
+                    da_struct->surfParam->geometricSizeEdgeId = mgg_data.get<std::string>("edge_id");
+                    da_struct->surfParam->geometricSizePointId = mgg_data.get<std::string>("point_id");
+                }
+            }else if(da_struct->mgGeometry_type == "param"){
+                da_struct->surfParam->physicalSizeFaceId = mgg_data.get<std::string>("face_id");
+                da_struct->surfParam->physicalSizeEdgeId = mgg_data.get<std::string>("edge_id");
+                da_struct->surfParam->physicalSizePointId = mgg_data.get<std::string>("point_id");
+            }
+        }catch(exception ex){
+            std::cout<<"-----no mgGeometry-----"<<std::endl;
+            da_struct->mgGeometry_ = false;
+        }
+#endif
+        try{
+            boost::property_tree::ptree cleaner_data = root.get_child("cleanerParam");
+            da_struct->bCleanerSection = true;
+            da_struct->clrParam->folding_angle = cleaner_data.get<std::string>("folding_angle");
+            da_struct->clrParam->min_hole_size = cleaner_data.get<std::string>("min_hole_size");
+            da_struct->clrParam->overlap_distance = cleaner_data.get<std::string>("overlap_distance");
+            da_struct->clrParam->use_default_settings_for = cleaner_data.get<std::string>("use_default_settings_for");
+            da_struct->clrParam->overlap_angle = cleaner_data.get<std::string>("overlap_angle");
+            da_struct->clrParam->resolution_length = cleaner_data.get<std::string>("resolution_length");
+        }catch(exception ex){
+            std::cout<<"-----no cleanerParam-----"<<std::endl;
+            da_struct->bCleanerSection = false;
+        }
+
+        try{
+            boost::property_tree::ptree tetra_data = root.get_child("tetraParam");
+
+            da_struct->TetraParam_ = true;
+            da_struct->tetraParam->components = tetra_data.get<std::string>("components");
+            da_struct->tetraParam->gradation = tetra_data.get<std::string>("gradation");
+            da_struct->tetraParam->min_size = tetra_data.get<std::string>("min_size");
+            da_struct->tetraParam->max_size = tetra_data.get<std::string>("max_size");
+            da_struct->style = 1;
+
+        }catch(exception ex){
+            std::cout<<"-----no TetraParam-----"<<std::endl;
+            da_struct->TetraParam_ = false;
+        }
+
+        try{
+            boost::property_tree::ptree hexa_data = root.get_child("hexaParam");
+            da_struct->HexaParam_ = true;
+            da_struct->hexaParam->components = hexa_data.get<std::string>("components");
+            da_struct->style = 2;
+        }catch(exception ex){
+            std::cout<<"-----no HexaParam-----"<<std::endl;
+            da_struct->HexaParam_ = false;
+        }
+
+        try{
+            boost::property_tree::ptree hybrid_data = root.get_child("hybridParam");
+            da_struct->HybridParaml_ = true;
+            da_struct->hybridParam->HybridStyle = hybrid_data.get<std::string>("element_generation");
+            da_struct->style = 3;
+            da_struct->hybridParam->number_of_boundary_layers = hybrid_data.get<std::string>("number_of_boundary_layers");
+            da_struct->hybridParam->normal_direction = hybrid_data.get<std::string>("normal_direction");
+            da_struct->hybridParam->boundary_layer_global_initial_height = hybrid_data.get<std::string>("boundary_layer_global_initial_height");
+            da_struct->hybridParam->boundary_layer_geometric_progression = hybrid_data.get<std::string>("boundary_layer_geometric_progression");
+        }catch(exception ex){
+            std::cout<<"-----no HybridParam-----"<<std::endl;
+            da_struct->HybridParaml_ = false;
+        }
     }
 }
 

+ 2 - 1
CAE_Solution/src/threadPool_and_statemachine/dealWith/boostjsonobject.h

@@ -42,7 +42,8 @@ public:
     streamDisplay_struct* sm_struct;//stream
     contourinimationw_struct* ci_struct;//contourinimation;
 
-    acis_igs_struct* ai_struct;
+    acis_geo_struct* ag_struct;
+    DPM_ADIParam_struct* da_struct;
 };
 
 #endif // BOOSTJSONOBJECT_H

+ 131 - 6
CAE_Solution/src/threadPool_and_statemachine/dealWith/display_struct.h

@@ -101,14 +101,139 @@ public:
     string isVolume;
 };
 
-//igs
-class acis_igs_struct
+//geometry
+class acis_geo_struct
 {
 public:
-    acis_igs_struct(){}
-    ~acis_igs_struct(){}
-    string igsPath;
-    string xmlPath;
+    acis_geo_struct(){}
+    ~acis_geo_struct(){}
+    string geoPath;
+};
+
+class surfParam_struct
+{
+public:
+    surfParam_struct(){}
+    ~surfParam_struct(){}
+    string max_size;
+    string min_size;
+    string SurfStyle;
+    string Global_physical_size;
+    string gradation;
+    string anisotropic_ratio;
+    string chordal_error;
+    string geometric_approximation_angle;
+    string Debug;
+    string closed_geometry;
+    string enforce_cad_edge_sizes;
+    string force_bad_surface_element_removal;
+    string discard_input_topology;
+    string create_tag_on_collision;
+    string element_order;
+    string remove_duplicate_cad_faces;
+    string scaled_jacobian_threshold_value;
+    string optimisation;
+    string correct_surface_intersections;
+    string physical_size_mode;
+    string physicalSizeFaceId;
+    string physicalSizeEdgeId;
+    string physicalSizePointId;
+    string geometric_size_mode;
+    string geometricSizeFaceId;
+    string geometricSizeEdgeId;
+    string geometricSizePointId;
+};
+
+class CleanerParam_struct{
+public:
+    CleanerParam_struct(){}
+    ~CleanerParam_struct(){}
+    string folding_angle;
+    string min_hole_size;
+    string overlap_distance;
+    string use_default_settings_for;
+    string overlap_angle;
+    string resolution_length;
+};
+
+class TetraParam_struct{
+public:
+    TetraParam_struct(){}
+    ~TetraParam_struct(){}
+    string components;
+    string gradation;
+    string min_size;
+    string max_size;
+};
+
+class HybridParam_struct{
+public:
+    HybridParam_struct(){}
+    ~HybridParam_struct(){}
+    string HybridStyle;
+    string number_of_boundary_layers;
+    string normal_direction;
+    string boundary_layer_global_initial_height;
+    string boundary_layer_geometric_progression;
+};
+
+class HexaParam_struct{
+public:
+    HexaParam_struct(){}
+    ~HexaParam_struct(){}
+    string components;
+    string min_size;
+};
+
+class DPM_ADIParam_struct
+{
+public:
+    DPM_ADIParam_struct(){
+        surfParam = NULL;
+        clrParam = NULL;
+        tetraParam = NULL;
+        hybridParam = NULL;
+        hexaParam = NULL;
+    }
+    ~DPM_ADIParam_struct(){
+        if(surfParam){
+            delete surfParam;
+            surfParam = NULL;
+        }
+        if(clrParam){
+            delete clrParam;
+            clrParam = NULL;
+        }
+        if(tetraParam){
+            delete tetraParam;
+            tetraParam = NULL;
+        }
+        if(hybridParam){
+            delete hybridParam;
+            hybridParam = NULL;
+        }
+        if(hexaParam){
+            delete hexaParam;
+            hexaParam = NULL;
+        }
+    }
+
+    string strResultFormat;
+    surfParam_struct* surfParam;
+    int style;
+    CleanerParam_struct* clrParam;
+    TetraParam_struct* tetraParam;
+    HybridParam_struct* hybridParam;
+    HexaParam_struct* hexaParam;
+
+    string mgPhysical_type;
+    string mgGeometry_type;
+    //string tetra_type;
+    //string hexa_type;
+    //string hybrid_type;
+    bool bCleanerSection;
+    bool surfParam0,surfParam1,surfParam2;
+    bool mgPhysical_,mgGeometry_,TetraParam_,HexaParam_,HybridParaml_;
 };
 
 #endif // DISPLAY_STRUCT_H

+ 2 - 1
CAE_Solution/src/threadPool_and_statemachine/dealWith/handlepool.cpp

@@ -763,9 +763,10 @@ bool handlePool::result_contourinimationdisplay(boostJsonObject *object_, QVTKRe
  */
 bool handlePool::result_readIgsFile(boostJsonObject *object_, QVTKRenderer *render_)
 {
+    Q_UNUSED(render_);
     cmdMainProcess* cmdp = new cmdMainProcess();
     try{
-    if(cmdp->CreateProcess_(object_->ai_struct->igsPath,object_->ai_struct->xmlPath)){
+    if(cmdp->CreateProcess_(object_->ag_struct->geoPath,"")){
         return true;
     }else{
         return false;