MeshKit  1.0
CopyGeom.hpp
Go to the documentation of this file.
00001 #ifndef MESHKIT_COPY_GEOM_HPP
00002 #define MESHKIT_COPY_GEOM_HPP
00003 
00004 #include <cassert>
00005 #include <string>
00006 #include <vector>
00007 #include <set>
00008 
00009 
00010 #include "meshkit/Types.hpp"
00011 #include "meshkit/Error.hpp"
00012 #include "meshkit/MeshScheme.hpp"
00013 #include "meshkit/ModelEnt.hpp"
00014 
00015 #include "CESets.hpp"
00016 #include "meshkit/LocalTag.hpp"
00017 #include "meshkit/Matrix.hpp"
00018 
00019 #include "meshkit/iMesh.hpp"
00020 #include "meshkit/iGeom.hpp"
00021 
00022 namespace MeshKit {
00023 
00024 class MKCore;
00025 
00026 class CopyGeom : public MeshScheme
00027 {
00028 public:
00029   /* \brief Constructor
00030    *
00031    * Create a new CopyGeom instance
00032    * \param impl the iGeom instance handle for the Geom
00033    */
00034   CopyGeom(MKCore *mkcore, const MEntVector &me_vec);
00035 
00036   /* \brief Destructor
00037    */
00038   virtual ~CopyGeom();
00039 
00041   static const char* name();
00042 
00047   static bool can_mesh(iBase_EntityType dim);
00048 
00055   static bool can_mesh(ModelEnt *me);
00056 
00060   static const moab::EntityType* output_types();
00061 
00065   virtual const moab::EntityType* mesh_types_arr() const;
00066 
00070   virtual bool add_modelent(ModelEnt *model_ent);
00071 
00073   virtual void setup_this();
00074 
00076   virtual void execute_this();
00077 
00078   /* \brief set location
00079    *
00080    * before copy moving
00081    * \param vector with x y z coords
00082    */
00083   void set_location(const Vector<3> &dx);
00084 
00085   void tag_copied_sets(const char **tag_names, const char **tag_vals,
00086                        const int num_tags);
00087 private:
00088   iGeom *igeomImpl;
00089   Vector<3> m_x;
00090 };
00091 
00092 inline const char* CopyGeom::name()
00093 {
00094   return "CopyGeom";
00095 }
00096 
00097 inline bool CopyGeom::can_mesh(iBase_EntityType)
00098 {
00099   // Given just a dimension, CopyGeom can't do anything since it doesn't know
00100   // what to copy.
00101   return false;
00102 }
00103 
00104 inline bool CopyGeom::can_mesh(ModelEnt *)
00105 {
00106   return true;
00107 }
00108 
00109 inline const moab::EntityType* CopyGeom::mesh_types_arr() const
00110 {
00111   return output_types();
00112 }
00113 
00114 } // namespace MeshKit
00115 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines