MeshKit  1.0
mw_func.hpp
Go to the documentation of this file.
00001 #include <iostream>
00002 #include <sstream>
00003 #include <iomanip> // for setprecision
00004 #include <limits> // for min/max values
00005 #include <assert.h>
00006 #include <math.h>
00007 #include <time.h>
00008 #include <vector>
00009 
00010 #include "moab/Core.hpp"
00011 #include "MBTagConventions.hpp"
00012 #include "moab/Range.hpp"
00013 #include "moab/Skinner.hpp"
00014 #include "moab/GeomTopoTool.hpp"
00015 
00016 #include "gen.hpp"
00017 #include "arc.hpp"
00018 #include "zip.hpp"
00019 #include "cleanup.hpp"
00020 
00021 
00022 namespace mw_func {
00023 
00024 void moab_printer(moab::ErrorCode error_code);
00025 
00026 moab::ErrorCode delete_all_edges();
00027 
00030 moab::ErrorCode find_degenerate_tris();
00031 
00034 moab::ErrorCode prepare_curves(moab::Range &curve_sets, 
00035                            moab::Tag geom_tag, 
00036                            moab::Tag id_tag, 
00037                            moab::Tag merge_tag, 
00038                            const double FACET_TOL, 
00039                            const bool debug,
00040                            bool verbose = true );
00041 
00042 moab::ErrorCode create_arc_pair(  const double FACET_TOL,
00043                               const moab::EntityHandle surf_set,
00044                               std::vector<moab::EntityHandle> &skin_loop,
00045                               std::vector<moab::EntityHandle> &curve_sets,
00046                               const moab::EntityHandle front_endpt,
00047                               const bool debug,
00048                               moab::EntityHandle &curve_set,
00049                               bool &curve_is_reversed,
00050                               std::vector<moab::EntityHandle> &curve,
00051                               std::vector<moab::EntityHandle> &skin_arc );
00052 
00053 moab::ErrorCode seal_arc_pair( const bool debug,
00054                            const double FACET_TOL,
00055                            const moab::Tag normal_tag,
00056                            std::vector<moab::EntityHandle> &edge, /* in */
00057                            std::vector<moab::EntityHandle> &skin /* in/out */,
00058                            const int surf_id );
00059 
00060 moab::ErrorCode seal_loop( bool debug,
00061                        const double FACET_TOL,
00062                        const moab::Tag normal_tag,
00063                        const moab::Tag orig_curve_tag,
00064                        const moab::EntityHandle surf_set,
00065                        std::vector<moab::EntityHandle> &curve_sets,
00066                        std::vector<moab::EntityHandle> &skin_loop,
00067                        bool verbose = false );
00068 
00069 moab::ErrorCode prepare_surfaces(moab::Range &surface_sets,
00070                              moab::Tag geom_tag, 
00071                              moab::Tag id_tag, 
00072                              moab::Tag normal_tag, 
00073                              moab::Tag merge_tag,
00074                              moab::Tag orig_curve_tag,
00075                              const double SME_RESABS_TOL,
00076                              const double FACET_TOL, 
00077                              const bool debug,
00078                              bool verbose = true);
00079 
00081 moab::ErrorCode fix_normals(moab::Range surface_sets, 
00082                         moab::Tag id_tag, 
00083                         moab::Tag normal_tag,
00084                         const bool debug,
00085                         const bool verbose);
00086 
00087 moab::ErrorCode restore_moab_curve_representation( const moab::Range curve_sets );
00088 
00090 moab::ErrorCode get_geom_size_before_sealing( const moab::Range geom_sets[], 
00091                                           const moab::Tag geom_tag,
00092                                           const moab::Tag size_tag,
00093                                           bool debug,
00094                                           bool verbose);
00096 moab::ErrorCode get_geom_size_after_sealing( const moab::Range geom_sets[], 
00097                                          const moab::Tag geom_tag,
00098                                          const moab::Tag size_tag,
00099                                          const double FACET_TOL,
00100                                          bool debug,
00101                                          bool verbose );
00102 
00104 moab::ErrorCode delete_merged_curves(moab::Range &existing_curve_sets, moab::Tag merge_tag, bool debug = false);
00105 
00107 moab::ErrorCode delete_sealing_tags( moab::Tag normal_tag, moab::Tag merge_tag, moab::Tag size_tag, moab::Tag orig_curve_tag);
00108 
00110 moab::ErrorCode get_unmerged_curves( moab::EntityHandle surface, 
00111                                  std::vector<moab::EntityHandle> &curves, 
00112                                  std::vector<moab::EntityHandle> &unmerged_curves, 
00113                                  moab::Tag merge_tag, 
00114                                  bool verbose,
00115                                  bool debug);
00116 
00119 moab::ErrorCode create_skin_vert_loops( moab::Range &skin_edges, moab::Range tris, std::vector < std::vector <moab::EntityHandle> > &skin, int surf_id, bool &cont, bool debug);
00120 
00123 moab::ErrorCode merge_skin_verts ( moab::Range &skin_verts, moab::Range &skin_edges, double SME_RESABS_TOL, int surf_id, bool cont, bool debug);
00124 
00126 moab::ErrorCode seal_surface_loops ( moab::EntityHandle surf,
00127                                  moab::EntityHandle skin_loops[], 
00128                                  std::vector < std::vector<moab::EntityHandle> > skin, 
00129                                  std::vector<moab::EntityHandle> curves, 
00130                                  moab::Tag normal_tag, 
00131                                  moab::Tag orig_curve_tag, 
00132                                  double FACET_TOL, 
00133                                  int surf_id, 
00134                                  bool debug);
00135 
00137 moab::ErrorCode make_mesh_watertight(moab::EntityHandle input_set, double &facet_tol, bool verbose = true);
00138 
00139 
00140 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines