MeshKit  1.0
QslimMesher.cpp
Go to the documentation of this file.
00001 #include "meshkit/QslimMesher.hpp"
00002 #include "meshkit/QslimOptions.hpp"
00003 #include "QslimDecimation.hpp"
00004 #include "meshkit/MKCore.hpp"
00005 #include "meshkit/ModelEnt.hpp"
00006 #include "meshkit/RegisterMeshOp.hpp"
00007 #include "moab/ReadUtilIface.hpp"
00008 #include <vector>
00009 #include <math.h>
00010 
00011 namespace MeshKit
00012 {
00013 
00014 //---------------------------------------------------------------------------//
00015 //Entity Type initialization for edge meshing
00016 moab::EntityType QslimMesher_tps[] = {moab::MBVERTEX, moab::MBEDGE, moab::MBMAXTYPE};
00017 const moab::EntityType* QslimMesher::output_types()
00018   { return QslimMesher_tps; }
00019 
00020 //---------------------------------------------------------------------------//
00021 // Construction Function for Qslim Mesher
00022 QslimMesher::QslimMesher(MKCore *mk_core, const MEntVector &me_vec)
00023         : MeshScheme(mk_core, me_vec)
00024 {
00025 
00026 }
00027 //---------------------------------------------------------------------------//
00028 // setup function: set up the number of intervals for edge meshing through the 
00029 // sizing function
00030 void QslimMesher::setup_this()
00031 {
00032 
00033   // make decimate mesher
00034   // will take only one input, a set from ModelEnts ?
00035   ModelEnt * me = mentSelection.begin()->first;
00036   moab::EntityHandle set=me->mesh_handle(); // this is the initial set
00037   _worker = new MeshKit::QslimDecimation(mk_core()->moab_instance(), set);
00038 }
00039 
00040 //---------------------------------------------------------------------------//
00041 // execute function: Generate the mesh for decimation
00042 void QslimMesher::execute_this()
00043 {
00044   // put the result in the range, eventually
00045         _worker->decimate(_opts, mentSelection.begin()->second);
00046         // this will modify the initialSet !!
00047 }
00048 
00049 //---------------------------------------------------------------------------//
00050 // Deconstruction function
00051 QslimMesher::~QslimMesher()
00052 {
00053   delete _worker;
00054 }
00055 
00056 
00057 } // MeshKit namespace
00058 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines