MeshKit  1.0
MBSplitOp.hpp
Go to the documentation of this file.
00001 /*
00002  * MBSplitOp.hpp
00003  *
00004  *  Created on: Oct 2, 2011
00005  *      Author: iulian
00006  */
00007 
00008 #ifndef MBSPLITOP_HPP_
00009 #define MBSPLITOP_HPP_
00010 
00011 #include "meshkit/MeshScheme.hpp"
00012 
00013 namespace MeshKit {
00014 
00015 class MBSplitOp: public MeshKit::MeshScheme
00016 {
00017 public:
00018   MBSplitOp(MKCore *mk_core, const MEntVector &me_vec);
00019   virtual ~MBSplitOp();
00020 
00021   // set options polyline[3*nPoints], closed (1 or 0, closed loop or open polyline,
00022   //                                           intersect  the boundary)
00023   //  globalId: to identify / single out the gface to be split
00024   // the gface will be found among gfaces in the mentSelection
00025   void set_options(int globalId,
00026       double dirx, double diry, double dirz, int closed, double min_dot);
00027 
00028   void add_points(double x, double y, double z);
00029   //set up the splitting of a gface, with a polyline or loop
00030   virtual void setup_this();
00031 
00032   // construct the mesh
00033   virtual void execute_this();
00034 
00036   static const char* name()
00037   {
00038     return "MBSplitOp";
00039   }
00040 
00041   static bool can_mesh(iBase_EntityType dim)
00042   {
00043     return false;
00044   }
00045 
00052   static bool can_mesh(ModelEnt *me)
00053   {
00054     return false;// this is not used for meshing, but for geometry creation
00055   }
00056 
00060   static const moab::EntityType* output_types();
00061 
00065   virtual const moab::EntityType* mesh_types_arr() const
00066   {
00067     return output_types();
00068   }
00069 
00070 private:
00071   int _globalId;
00072   std::vector<double>_polyline;
00073   double _direction[3];
00074   int _closed;
00075   double _min_dot;
00076 };
00077 
00078 }
00079 
00080 #endif /* MBSPLITOP_HPP_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines