MeshKit
1.0
|
00001 #include <stdio.h> 00002 #include "meshkit/MeshOpTemplate.hpp" 00003 #include "meshkit/MKCore.hpp" 00004 #include "meshkit/SizingFunction.hpp" 00005 #include "meshkit/RegisterMeshOp.hpp" 00006 #include "meshkit/LocalSet.hpp" 00007 #include "meshkit/ModelEnt.hpp" 00008 00009 #include "iMesh_extensions.h" 00010 #include "MBCN.h" 00011 00012 00013 namespace MeshKit 00014 { 00015 // static registration of this mesh scheme 00016 moab::EntityType MeshOpTemplate_tps[] = { moab::MBVERTEX, 00017 moab::MBEDGE, 00018 moab::MBTRI, 00019 moab::MBHEX, 00020 moab::MBMAXTYPE}; 00021 const moab::EntityType* MeshOpTemplate::output_types() 00022 { return MeshOpTemplate_tps; } 00023 00024 MeshOpTemplate::MeshOpTemplate(MKCore *mkcore, const MEntVector &me_vec) 00025 : MeshScheme(mkcore, me_vec), 00026 igeomImpl(mkcore->igeom_instance()) 00027 { 00028 s_x[0] = 1.0; 00029 s_x[1] = 1.0; 00030 s_x[2] = 1.0; 00031 } 00032 00033 MeshOpTemplate::~MeshOpTemplate() 00034 {} 00035 00036 bool MeshOpTemplate::add_modelent(ModelEnt *model_ent) 00037 { 00038 return MeshOp::add_modelent(model_ent); 00039 } 00040 00041 void MeshOpTemplate::setup_this() 00042 { 00043 } 00044 00045 void MeshOpTemplate::execute_this() 00046 { 00047 iBase_EntityHandle_Private * argf = NULL; 00048 igeomImpl->createBrick(s_x[0], s_x[1], s_x[2], argf); 00049 printf("Made a brick!\n"); 00050 } 00051 00052 // set the size of the brick - s_x 00053 void MeshOpTemplate::set_size(const Vector<3> &dx) 00054 { 00055 s_x = dx; 00056 } 00057 00058 void MeshOpTemplate::tag_copied_sets(const char **tag_names, const char **tag_vals, 00059 const int num_tags) 00060 { 00061 // TODO: 00062 } 00063 00064 } // namespace MeshKit