diff --git a/export_dagmc_cmd/DAGMCExportCommand.cpp b/export_dagmc_cmd/DAGMCExportCommand.cpp index baf0c0dec..24cedb878 100644 --- a/export_dagmc_cmd/DAGMCExportCommand.cpp +++ b/export_dagmc_cmd/DAGMCExportCommand.cpp @@ -53,6 +53,8 @@ DAGMCExportCommand::DAGMCExportCommand() : load_message <<"Loaded DAGMC export plugin." << std::endl; CubitInterface::get_cubit_message_handler()->print_error(load_message.str().c_str()); } + + progTool = new TtyProgressTool(); } DAGMCExportCommand::~DAGMCExportCommand() @@ -598,6 +600,9 @@ moab::ErrorCode DAGMCExportCommand::create_curve_facets(refentity_handle_map& cu // Map iterator refentity_handle_map_itor ci; + + progTool->clear_all(); + progTool->start(0,curve_map.size(),"FACETING CURVES"); // Create geometry for all curves GMem data; @@ -705,7 +710,10 @@ moab::ErrorCode DAGMCExportCommand::create_curve_facets(refentity_handle_map& cu rval = mdbImpl->add_entities(ci->second, &edges[0], edges.size()); if (moab::MB_SUCCESS != rval) return moab::MB_FAILURE; + + progTool->step(); } + progTool->end(); if (!verbose_warnings && curve_warnings < 0) { message << "Suppressed " << -curve_warnings @@ -727,6 +735,9 @@ moab::ErrorCode DAGMCExportCommand::create_surface_facets(refentity_handle_map& DLIList me_list; + progTool->clear_all(); + progTool->start(0,surface_map.size(),"FACETING_SURFACES"); + GMem data; // Create geometry for all surfaces for (ci = surface_map.begin(); ci != surface_map.end(); ++ci) { @@ -836,8 +847,12 @@ moab::ErrorCode DAGMCExportCommand::create_surface_facets(refentity_handle_map& rval = mdbImpl->add_entities(ci->second, facets); if (moab::MB_SUCCESS != rval) return moab::MB_FAILURE; + + progTool->step(); } + progTool->end(); + return moab::MB_SUCCESS; } diff --git a/export_dagmc_cmd/DAGMCExportCommand.hpp b/export_dagmc_cmd/DAGMCExportCommand.hpp index 9d1e2abbe..53e58ffd0 100644 --- a/export_dagmc_cmd/DAGMCExportCommand.hpp +++ b/export_dagmc_cmd/DAGMCExportCommand.hpp @@ -3,6 +3,7 @@ #include "CubitCommandInterface.hpp" #include "CubitMessageHandler.hpp" +#include "TtyProgressTool.hpp" // CGM includes #include "RefEntity.hpp" @@ -30,6 +31,7 @@ class DAGMCExportCommand: public CubitCommand bool execute(CubitCommandData &data); protected: + TtyProgressTool* progTool; moab::ErrorCode create_tags(); moab::ErrorCode parse_options(CubitCommandData &data, moab::EntityHandle* file_set = 0);