MeshKit  1.0
mw_func Namespace Reference

Functions

void moab_printer (moab::ErrorCode error_code)
moab::ErrorCode delete_all_edges ()
moab::ErrorCode find_degenerate_tris ()
moab::ErrorCode prepare_curves (moab::Range &curve_sets, moab::Tag geom_tag, moab::Tag id_tag, moab::Tag merge_tag, const double FACET_TOL, const bool debug, bool verbose=true)
moab::ErrorCode create_arc_pair (const double FACET_TOL, const moab::EntityHandle surf_set, std::vector< moab::EntityHandle > &skin_loop, std::vector< moab::EntityHandle > &curve_sets, const moab::EntityHandle front_endpt, const bool debug, moab::EntityHandle &curve_set, bool &curve_is_reversed, std::vector< moab::EntityHandle > &curve, std::vector< moab::EntityHandle > &skin_arc)
moab::ErrorCode seal_arc_pair (const bool debug, const double FACET_TOL, const moab::Tag normal_tag, std::vector< moab::EntityHandle > &edge, std::vector< moab::EntityHandle > &skin, const int surf_id)
moab::ErrorCode seal_loop (bool debug, const double FACET_TOL, const moab::Tag normal_tag, const moab::Tag orig_curve_tag, const moab::EntityHandle surf_set, std::vector< moab::EntityHandle > &curve_sets, std::vector< moab::EntityHandle > &skin_loop, bool verbose=false)
moab::ErrorCode prepare_surfaces (moab::Range &surface_sets, moab::Tag geom_tag, moab::Tag id_tag, moab::Tag normal_tag, moab::Tag merge_tag, moab::Tag orig_curve_tag, const double SME_RESABS_TOL, const double FACET_TOL, const bool debug, bool verbose=true)
moab::ErrorCode fix_normals (moab::Range surface_sets, moab::Tag id_tag, moab::Tag normal_tag, const bool debug, const bool verbose)
 re-orients triangles with inverted normal vectors after being sealed
moab::ErrorCode restore_moab_curve_representation (const moab::Range curve_sets)
moab::ErrorCode get_geom_size_before_sealing (const moab::Range geom_sets[], const moab::Tag geom_tag, const moab::Tag size_tag, bool debug, bool verbose)
 prints the size of every entity in geom_sets
moab::ErrorCode get_geom_size_after_sealing (const moab::Range geom_sets[], const moab::Tag geom_tag, const moab::Tag size_tag, const double FACET_TOL, bool debug, bool verbose)
 prints changes in size to the mesh after sealing
moab::ErrorCode delete_merged_curves (moab::Range &existing_curve_sets, moab::Tag merge_tag, bool debug=false)
 deletes all curves with a merge_tag and removes them from the curve sets of the mesh
moab::ErrorCode delete_sealing_tags (moab::Tag normal_tag, moab::Tag merge_tag, moab::Tag size_tag, moab::Tag orig_curve_tag)
 deletes all tags created for use in sealing the model
moab::ErrorCode get_unmerged_curves (moab::EntityHandle surface, std::vector< moab::EntityHandle > &curves, std::vector< moab::EntityHandle > &unmerged_curves, moab::Tag merge_tag, bool verbose, bool debug)
 gets all curve sets an returns them in curves. Places any unmerged curves in unmerged_curves.
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)
moab::ErrorCode merge_skin_verts (moab::Range &skin_verts, moab::Range &skin_edges, double SME_RESABS_TOL, int surf_id, bool cont, bool debug)
moab::ErrorCode seal_surface_loops (moab::EntityHandle surf, moab::EntityHandle skin_loops[], std::vector< std::vector< moab::EntityHandle > > skin, std::vector< moab::EntityHandle > curves, moab::Tag normal_tag, moab::Tag orig_curve_tag, double FACET_TOL, int surf_id, bool debug)
 runs the make_watertight algorithm on each set of skin_loops for the surface, surf.
moab::ErrorCode make_mesh_watertight (moab::EntityHandle input_set, double &facet_tol, bool verbose=true)
 takes the mesh in input_set and makes it watertight
ErrorCode prepare_curves (Range &curve_sets, Tag geom_tag, Tag id_tag, Tag merge_tag, const double FACET_TOL, const bool debug, bool verbose)
ErrorCode create_arc_pair (const double FACET_TOL, const EntityHandle surf_set, std::vector< EntityHandle > &skin_loop, std::vector< EntityHandle > &curve_sets, const EntityHandle front_endpt, const bool debug, EntityHandle &curve_set, bool &curve_is_reversed, std::vector< EntityHandle > &curve, std::vector< EntityHandle > &skin_arc)
ErrorCode seal_arc_pair (const bool debug, const double FACET_TOL, const Tag normal_tag, std::vector< EntityHandle > &edge, std::vector< EntityHandle > &skin, const int surf_id)
ErrorCode seal_loop (bool debug, const double FACET_TOL, const Tag normal_tag, const Tag orig_curve_tag, const EntityHandle surf_set, std::vector< EntityHandle > &curve_sets, std::vector< EntityHandle > &skin_loop, bool verbose)
 seals the skin_loop to the closest curves in curve sets in a watertight fashion
ErrorCode prepare_surfaces (Range &surface_sets, Tag geom_tag, Tag id_tag, Tag normal_tag, Tag merge_tag, Tag orig_curve_tag, const double SME_RESABS_TOL, const double FACET_TOL, const bool debug, bool verbose)
ErrorCode fix_normals (Range surface_sets, Tag id_tag, Tag normal_tag, const bool debug, const bool verbose)
ErrorCode restore_moab_curve_representation (const Range curve_sets)
ErrorCode get_geom_size_before_sealing (const Range geom_sets[], const Tag geom_tag, const Tag size_tag, bool debug, bool verbose)
ErrorCode get_geom_size_after_sealing (const Range geom_sets[], const Tag geom_tag, const Tag size_tag, const double FACET_TOL, bool debug, bool verbose)
ErrorCode delete_merged_curves (Range &existing_curve_sets, Tag merge_tag, bool debug)
ErrorCode delete_sealing_tags (Tag normal_tag, Tag merge_tag, Tag size_tag, Tag orig_curve_tag)
ErrorCode get_unmerged_curves (EntityHandle surface, std::vector< EntityHandle > &curves, std::vector< EntityHandle > &unmerged_curves, Tag merge_tag, bool verbose, bool debug)
ErrorCode create_skin_vert_loops (Range &skin_edges, Range tris, std::vector< std::vector< EntityHandle > > &skin, int surf_id, bool &cont, bool debug)
ErrorCode merge_skin_verts (Range &skin_verts, Range &skin_edges, double SME_RESABS_TOL, int surf_id, bool cont, bool debug)
ErrorCode seal_surface_loops (EntityHandle surf, EntityHandle skin_loops[], std::vector< std::vector< EntityHandle > > skin, std::vector< EntityHandle > curves, Tag normal_tag, Tag orig_curve_tag, double FACET_TOL, int surf_id, bool debug)
ErrorCode make_mesh_watertight (EntityHandle input_set, double &facet_tol, bool verbose)

Function Documentation

moab::ErrorCode mw_func::create_arc_pair ( const double  FACET_TOL,
const moab::EntityHandle  surf_set,
std::vector< moab::EntityHandle > &  skin_loop,
std::vector< moab::EntityHandle > &  curve_sets,
const moab::EntityHandle  front_endpt,
const bool  debug,
moab::EntityHandle &  curve_set,
bool &  curve_is_reversed,
std::vector< moab::EntityHandle > &  curve,
std::vector< moab::EntityHandle > &  skin_arc 
)
ErrorCode mw_func::create_arc_pair ( const double  FACET_TOL,
const EntityHandle  surf_set,
std::vector< EntityHandle > &  skin_loop,
std::vector< EntityHandle > &  curve_sets,
const EntityHandle  front_endpt,
const bool  debug,
EntityHandle &  curve_set,
bool &  curve_is_reversed,
std::vector< EntityHandle > &  curve,
std::vector< EntityHandle > &  skin_arc 
)

Cut an arc out of the skin. Return a corresponding curve, the curve's set, and is the curve has ben reversed. The returned skin has the arc cut away. The returned vector of curve sets has the curve removed.

Definition at line 207 of file mw_func.cpp.

moab::ErrorCode mw_func::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 
)

takes the skin_edges from the moab skinner and creates loops of vertices between the facets and geometric curves. The vertex loops are returned in the vector array, skin.

ErrorCode mw_func::create_skin_vert_loops ( Range &  skin_edges,
Range  tris,
std::vector< std::vector< EntityHandle > > &  skin,
int  surf_id,
bool &  cont,
bool  debug 
)

Definition at line 1553 of file mw_func.cpp.

ErrorCode delete_all_edges ( )

Definition at line 41 of file mw_func.cpp.

moab::ErrorCode mw_func::delete_merged_curves ( moab::Range &  existing_curve_sets,
moab::Tag  merge_tag,
bool  debug = false 
)

deletes all curves with a merge_tag and removes them from the curve sets of the mesh

ErrorCode mw_func::delete_merged_curves ( Range &  existing_curve_sets,
Tag  merge_tag,
bool  debug 
)

Definition at line 1442 of file mw_func.cpp.

moab::ErrorCode mw_func::delete_sealing_tags ( moab::Tag  normal_tag,
moab::Tag  merge_tag,
moab::Tag  size_tag,
moab::Tag  orig_curve_tag 
)

deletes all tags created for use in sealing the model

ErrorCode mw_func::delete_sealing_tags ( Tag  normal_tag,
Tag  merge_tag,
Tag  size_tag,
Tag  orig_curve_tag 
)

Definition at line 1482 of file mw_func.cpp.

ErrorCode find_degenerate_tris ( )

gets all triangles from the mesh set and checks them for degeneracy. if any degenerate triangles are found, the program will exit

Definition at line 55 of file mw_func.cpp.

moab::ErrorCode mw_func::fix_normals ( moab::Range  surface_sets,
moab::Tag  id_tag,
moab::Tag  normal_tag,
const bool  debug,
const bool  verbose 
)

re-orients triangles with inverted normal vectors after being sealed

ErrorCode mw_func::fix_normals ( Range  surface_sets,
Tag  id_tag,
Tag  normal_tag,
const bool  debug,
const bool  verbose 
)

Definition at line 1108 of file mw_func.cpp.

moab::ErrorCode mw_func::get_geom_size_after_sealing ( const moab::Range  geom_sets[],
const moab::Tag  geom_tag,
const moab::Tag  size_tag,
const double  FACET_TOL,
bool  debug,
bool  verbose 
)

prints changes in size to the mesh after sealing

ErrorCode mw_func::get_geom_size_after_sealing ( const Range  geom_sets[],
const Tag  geom_tag,
const Tag  size_tag,
const double  FACET_TOL,
bool  debug,
bool  verbose 
)

Definition at line 1308 of file mw_func.cpp.

moab::ErrorCode mw_func::get_geom_size_before_sealing ( const moab::Range  geom_sets[],
const moab::Tag  geom_tag,
const moab::Tag  size_tag,
bool  debug,
bool  verbose 
)

prints the size of every entity in geom_sets

ErrorCode mw_func::get_geom_size_before_sealing ( const Range  geom_sets[],
const Tag  geom_tag,
const Tag  size_tag,
bool  debug,
bool  verbose 
)

Definition at line 1272 of file mw_func.cpp.

moab::ErrorCode mw_func::get_unmerged_curves ( moab::EntityHandle  surface,
std::vector< moab::EntityHandle > &  curves,
std::vector< moab::EntityHandle > &  unmerged_curves,
moab::Tag  merge_tag,
bool  verbose,
bool  debug 
)

gets all curve sets an returns them in curves. Places any unmerged curves in unmerged_curves.

ErrorCode mw_func::get_unmerged_curves ( EntityHandle  surface,
std::vector< EntityHandle > &  curves,
std::vector< EntityHandle > &  unmerged_curves,
Tag  merge_tag,
bool  verbose,
bool  debug 
)

Definition at line 1498 of file mw_func.cpp.

moab::ErrorCode mw_func::make_mesh_watertight ( moab::EntityHandle  input_set,
double &  facet_tol,
bool  verbose = true 
)

takes the mesh in input_set and makes it watertight

ErrorCode mw_func::make_mesh_watertight ( EntityHandle  input_set,
double &  facet_tol,
bool  verbose 
)

Definition at line 1720 of file mw_func.cpp.

moab::ErrorCode mw_func::merge_skin_verts ( moab::Range &  skin_verts,
moab::Range &  skin_edges,
double  SME_RESABS_TOL,
int  surf_id,
bool  cont,
bool  debug 
)

merges any skin vertices closer in proximity than the SME_RESABS_TOL. It then checks the skins for any degenerate edges resultant of vertex merging.

ErrorCode mw_func::merge_skin_verts ( Range &  skin_verts,
Range &  skin_edges,
double  SME_RESABS_TOL,
int  surf_id,
bool  cont,
bool  debug 
)

Definition at line 1640 of file mw_func.cpp.

void mw_func::moab_printer ( moab::ErrorCode  error_code)
moab::ErrorCode mw_func::prepare_curves ( moab::Range &  curve_sets,
moab::Tag  geom_tag,
moab::Tag  id_tag,
moab::Tag  merge_tag,
const double  FACET_TOL,
const bool  debug,
bool  verbose = true 
)

prepares all curves for the make_watertight algorithm. Merges curves that are coincident and deletes curves that are smallerthan the faceting tolerance

ErrorCode mw_func::prepare_curves ( Range &  curve_sets,
Tag  geom_tag,
Tag  id_tag,
Tag  merge_tag,
const double  FACET_TOL,
const bool  debug,
bool  verbose 
)

Definition at line 81 of file mw_func.cpp.

moab::ErrorCode mw_func::prepare_surfaces ( moab::Range &  surface_sets,
moab::Tag  geom_tag,
moab::Tag  id_tag,
moab::Tag  normal_tag,
moab::Tag  merge_tag,
moab::Tag  orig_curve_tag,
const double  SME_RESABS_TOL,
const double  FACET_TOL,
const bool  debug,
bool  verbose = true 
)
ErrorCode mw_func::prepare_surfaces ( Range &  surface_sets,
Tag  geom_tag,
Tag  id_tag,
Tag  normal_tag,
Tag  merge_tag,
Tag  orig_curve_tag,
const double  SME_RESABS_TOL,
const double  FACET_TOL,
const bool  debug,
bool  verbose 
)

Definition at line 970 of file mw_func.cpp.

moab::ErrorCode mw_func::restore_moab_curve_representation ( const moab::Range  curve_sets)
ErrorCode mw_func::restore_moab_curve_representation ( const Range  curve_sets)

Definition at line 1172 of file mw_func.cpp.

moab::ErrorCode mw_func::seal_arc_pair ( const bool  debug,
const double  FACET_TOL,
const moab::Tag  normal_tag,
std::vector< moab::EntityHandle > &  edge,
std::vector< moab::EntityHandle > &  skin,
const int  surf_id 
)
ErrorCode mw_func::seal_arc_pair ( const bool  debug,
const double  FACET_TOL,
const Tag  normal_tag,
std::vector< EntityHandle > &  edge,
std::vector< EntityHandle > &  skin,
const int  surf_id 
)

Runs the make_watertight algorithm on the edge (curve) and skin (arc). See PHD Thesis of Brandon Smith University of Wisconsin - Madison 2011 for details

Definition at line 402 of file mw_func.cpp.

moab::ErrorCode mw_func::seal_loop ( bool  debug,
const double  FACET_TOL,
const moab::Tag  normal_tag,
const moab::Tag  orig_curve_tag,
const moab::EntityHandle  surf_set,
std::vector< moab::EntityHandle > &  curve_sets,
std::vector< moab::EntityHandle > &  skin_loop,
bool  verbose = false 
)
ErrorCode mw_func::seal_loop ( bool  debug,
const double  FACET_TOL,
const Tag  normal_tag,
const Tag  orig_curve_tag,
const EntityHandle  surf_set,
std::vector< EntityHandle > &  curve_sets,
std::vector< EntityHandle > &  skin_loop,
bool  verbose 
)

seals the skin_loop to the closest curves in curve sets in a watertight fashion

Definition at line 723 of file mw_func.cpp.

moab::ErrorCode mw_func::seal_surface_loops ( moab::EntityHandle  surf,
moab::EntityHandle  skin_loops[],
std::vector< std::vector< moab::EntityHandle > >  skin,
std::vector< moab::EntityHandle >  curves,
moab::Tag  normal_tag,
moab::Tag  orig_curve_tag,
double  FACET_TOL,
int  surf_id,
bool  debug 
)

runs the make_watertight algorithm on each set of skin_loops for the surface, surf.

ErrorCode mw_func::seal_surface_loops ( EntityHandle  surf,
EntityHandle  skin_loops[],
std::vector< std::vector< EntityHandle > >  skin,
std::vector< EntityHandle >  curves,
Tag  normal_tag,
Tag  orig_curve_tag,
double  FACET_TOL,
int  surf_id,
bool  debug 
)

Definition at line 1676 of file mw_func.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines