MeshKit
1.0
|
00001 /* 00002 * TriangleMesher.h 00003 * 00004 * Created on: Sep 23, 2011 00005 * Author: iulian 00006 */ 00007 00008 #ifndef TRIANGLEMESHER_H_ 00009 #define TRIANGLEMESHER_H_ 00010 00011 00012 #include <string> 00013 #include "meshkit/MeshScheme.hpp" 00014 00015 namespace MeshKit { 00016 00017 class TriangleMesher: public MeshScheme 00018 { 00019 public: 00020 virtual ~TriangleMesher(); 00021 00022 //construction function for Triangle mesher 00023 TriangleMesher(MKCore *mk_core, const MEntVector &me_vec); 00024 00025 //set up the parameters for triangle meshing 00026 virtual void setup_this(); 00027 00028 // construct the mesh 00029 virtual void execute_this(); 00030 00032 static const char* name() 00033 { 00034 return "TriangleMesher"; 00035 } 00036 00037 // pass 00038 void set_options(char * opts, int direction, double fretting) 00039 { 00040 _opts = opts; 00041 _dir = direction; 00042 _fretting = fretting; 00043 } 00044 00045 static bool can_mesh(iBase_EntityType dim) 00046 { 00047 return iBase_FACE == dim; 00048 } 00049 00056 static bool can_mesh(ModelEnt *me) 00057 { 00058 return canmesh_face(me); 00059 } 00060 00064 static const moab::EntityType* output_types(); 00065 00069 virtual const moab::EntityType* mesh_types_arr() const 00070 { 00071 return output_types(); 00072 } 00073 00074 char * _opts; 00075 int _dir; // do it in x, y, z normal planes 00076 double _fretting; 00077 }; 00078 00079 } 00080 00081 #endif /* TRIANGLEMESHER_H_ */