Forráskód Böngészése

0927 修改iop初始化

caizm 1 éve
szülő
commit
0d0d5b3216

+ 0 - 5
CAE_Solution/src/main.cpp

@@ -22,7 +22,6 @@ VTK_MODULE_INIT(vtkRenderingFreeType)
 #include "threadPool_and_statemachine/dealWith/handlepool.h"
 #include "threadPool_and_statemachine/dealWith/boostjsonobject.h"
 #include "VTK/Manager/ResultMeshManager.h"
-#include "manager_acis_modeller.h"
 
 int main(int argc, char *argv[])
 {
@@ -36,9 +35,6 @@ int main(int argc, char *argv[])
     QSurfaceFormat::setDefaultFormat(QVTKOpenGLNativeWidget::defaultFormat());//必需
     qRegisterMetaType<std::string>("std::string");
 
-    iniACIS();
-    initIop();
-
     QApplication a(argc, argv);
     Widget w;
 
@@ -62,6 +58,5 @@ int main(int argc, char *argv[])
     QObject::connect(handle,SIGNAL(sendImg_handlePoolToSendstate(std::string)),sendstate,SLOT(getImg_handlePoolToSendstate(std::string)));
     QObject::connect(recvstate,SIGNAL(sendmsg_recvstateTohandlePool(std::string)),handle,SLOT(getmsg_recvstateTohandlePool(std::string)));
 
-    //closeACIS();
     return a.exec();
 }

+ 10 - 5
CAE_Solution/src/threadPool_and_statemachine/dealWith/handlepool.cpp

@@ -9,6 +9,7 @@
 #include <vtkPolyDataMapper.h>
 #include <vtkActor.h>
 #include "../../acis/cmdmainprocess.h"
+#include "../../manager_acis_modeller.h"
 
 
 /*
@@ -33,6 +34,9 @@ handlePool::handlePool(QTabWidget *w)
     qmapResultmanager.clear();
     contour_sendrange_flag = false;
     line_sendrange_flag = false;
+
+    iniACIS();
+    cmdp = new cmdMainProcess();
 }
 
 
@@ -56,6 +60,7 @@ handlePool::~handlePool()
     contour_sendrange_flag = false;
     line_sendrange_flag = false;
     w = NULL;
+    closeACIS();
 }
 
 /*
@@ -776,18 +781,18 @@ bool handlePool::result_readIgsFile(boostJsonObject *object_, QVTKRenderer *rend
         //to do
     }
 
-    cmdMainProcess* cmdp = new cmdMainProcess();
+    //cmdMainProcess* cmdp = new cmdMainProcess();
     //cmdp->SetHandlePool(this);
     cmdp->setJsonObject(object_);
 
     try{
     if(cmdp->CreateProcess_(object_->da_struct->geoPath,"")){//unuse xmlpath
-        delete cmdp;
-        cmdp = NULL;
+//        delete cmdp;
+//        cmdp = NULL;
         return true;
     }else{
-        delete cmdp;
-        cmdp = NULL;
+//        delete cmdp;
+//        cmdp = NULL;
         return false;
     }
     }catch(myException &ex){

+ 3 - 1
CAE_Solution/src/threadPool_and_statemachine/dealWith/handlepool.h

@@ -39,7 +39,7 @@
 #include "boostjsonobject.h"
 #include "map_manager.h"
 #include "../../Rabbitmq/sendLogMsg/logmsg.h"
-
+#include "../../acis/cmdmainprocess.h"
 
 using namespace std;
 
@@ -113,6 +113,8 @@ private:
     bool line_sendrange_flag;
     map<string,set<double>> allscalarrange;
 
+    cmdMainProcess *cmdp;
+
 signals:
     void sendImg_handlePoolToSendstate(std::string);
     void sendWidget_handlePoolToWidget(QWidget*);