MeshKit  1.0
example_assygen.cpp
Go to the documentation of this file.
00001 
00018 #include "meshkit/MKCore.hpp"
00019 #include "meshkit/MeshOp.hpp"
00020 #include "meshkit/ModelEnt.hpp"
00021 #include "meshkit/AssyGen.hpp"
00022 #include "meshkit/CopyGeom.hpp"
00023 
00024 using namespace MeshKit;
00025 
00026 MKCore *mk;
00027 bool save_mesh = true;
00028 
00029 int main(int argc, char *argv[])
00030 {
00031   mk = new MKCore();
00032   // create a model entity vector for construting AssyGen meshop, note that NO model entities are required for AssyGen meshop.
00033   MEntVector volso;
00034 
00035   // construct the meshop and set name
00036   AssyGen *ag = (AssyGen*) mk->construct_meshop("AssyGen", volso);
00037   ag->set_name("AssyGen");
00038 
00039   // setup input/output AssyGen files for creating the 'Reactor Assembly' geometry
00040   ag->PrepareIO(argc, argv, MESH_DIR);
00041   mk->setup_and_execute();
00042 
00043   // AssyGen MeshOp internally saves the resulting geometry with the name specified in input file
00044 
00045   delete mk;
00046   return 0;
00047 }
00048 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines