MeshKit  1.0
example_meshoptemplate.cpp
Go to the documentation of this file.
00001 
00021 #include "meshkit/MKCore.hpp"
00022 #include "meshkit/MeshOp.hpp"
00023 #include "meshkit/MeshOpTemplate.hpp"
00024 #include "meshkit/TFIMapping.hpp"
00025 #include "meshkit/OneToOneSwept.hpp"
00026 #include "meshkit/EdgeMesher.hpp"
00027 #include <algorithm>
00028 
00029 //#include "meshkit/EBMesher.hpp"
00030 //#include "meshkit/ModelEnt.hpp"
00031 //#include "meshkit/VertexMesher.hpp"
00032 //#include "meshkit/EdgeMesher.hpp"
00033 //#include "meshkit/SizingFunctionVar.hpp"
00034 //#include "meshkit/CAMALPaver.hpp"
00035 
00036 using namespace MeshKit;
00037 
00038 
00039 
00040 MKCore *mk;
00041 
00042 bool save_mesh = false;
00043 void test_mesh_op_template();
00044 
00045 int main(int argc, char **argv)
00046 {
00047   mk = new MKCore();
00048   int num_fail = 0;
00049 
00050   test_mesh_op_template();
00051 
00052   delete mk;
00053   return num_fail;
00054 }
00055 
00056 void test_mesh_op_template()
00057 {
00058   // Make the brick!                                                           // v Don't need this
00059   MeshOpTemplate *mot = (MeshOpTemplate*) mk->construct_meshop("MeshOpTemplate", MEntVector());
00060   mot->set_name("MeshOpTemplate");
00061 
00062   // Do work!
00063   mk->setup();
00064   mk->execute();
00065   mk->clear_graph();
00066 
00067   if(save_mesh) {
00068     #ifdef HAVE_ACIS
00069       mk->save_geometry("un_meshed_brick.sat");
00070       mk->save_mesh("meshed_brick.exo");
00071     #elif defined(HAVE_OCC)
00072       mk->save_geometry("un_meshed_brick.stp");
00073       mk->save_mesh("meshed_brick.exo");
00074     #endif
00075   }
00076 
00077   return;
00078 }
00079 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines