X-Git-Url: http://git.salome-platform.org/gitweb/?p=plugins%2Fnetgenplugin.git;a=blobdiff_plain;f=src%2FNETGENPlugin%2FNETGENPlugin_Runner_main.cxx;fp=src%2FNETGENPlugin%2FNETGENPlugin_Runner_main.cxx;h=97037e779b55d9cf94b00008481b1ee2a527a067;hp=b31235bf95bf3dbc699280cd91ab7be7d9cef8a7;hb=ccecac5e15a24f8da73b0ed44cfbbbb20b15b0db;hpb=3af617de2150a1f2aace89182033d20e6fc0b237 diff --git a/src/NETGENPlugin/NETGENPlugin_Runner_main.cxx b/src/NETGENPlugin/NETGENPlugin_Runner_main.cxx index b31235b..97037e7 100644 --- a/src/NETGENPlugin/NETGENPlugin_Runner_main.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Runner_main.cxx @@ -25,7 +25,9 @@ // Module : NETGEN // +#include "NETGENPlugin_NETGEN_2D_SA.hxx" #include "NETGENPlugin_NETGEN_3D_SA.hxx" +#include "NETGENPlugin_NETGEN_1D2D3D_SA.hxx" #include #include @@ -78,18 +80,46 @@ int main(int argc, char *argv[]){ element_orientation_file = ""; if (new_element_file == "NONE") new_element_file = ""; - + int ret = 0; if (mesher=="NETGEN3D"){ NETGENPlugin_NETGEN_3D_SA myplugin; - myplugin.run(input_mesh_file, + ret = myplugin.run(input_mesh_file, shape_file, hypo_file, element_orientation_file, new_element_file, - output_mesh_file); - } else { + output_mesh_file ); + } + else if ( mesher=="NETGEN1D" || + mesher=="NETGEN1D2D" || + mesher=="NETGEN1D2D3D" ) + { + NETGENPlugin_NETGEN_1D2D3D_SA myplugin; + NETGENPlugin_Mesher::DIM DIM = mesher=="NETGEN1D" ? NETGENPlugin_Mesher::D1 + : ( mesher=="NETGEN1D2D" ? NETGENPlugin_Mesher::D2 + : NETGENPlugin_Mesher::D3 ); + + ret = myplugin.run(input_mesh_file, + shape_file, + hypo_file, + element_orientation_file, + new_element_file, + output_mesh_file, + DIM ); + } + else if ( mesher=="NETGEN2D" ) + { + NETGENPlugin_NETGEN_2D_SA myplugin; + ret = myplugin.run(input_mesh_file, + shape_file, + hypo_file, + element_orientation_file, + new_element_file, + output_mesh_file ); + } + else { std::cerr << "Unknown mesher:" << mesher << std::endl; return 1; } - return 0; + return ret; }