MeshKit  1.0
test_make_watertight.cpp File Reference
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <set>
#include <algorithm>
#include "moab/Core.hpp"
#include "MBTagConventions.hpp"
#include "moab/Range.hpp"
#include "moab/Skinner.hpp"
#include "meshkit/mw_func.hpp"
#include "meshkit/cw_func.hpp"
#include "meshkit/gen.hpp"
#include "meshkit/arc.hpp"
#include "meshkit/zip.hpp"
#include "TestUtil.hpp"
Include dependency graph for test_make_watertight.cpp:

Go to the source code of this file.

Classes

struct  coords_and_id
 struct to hold coordinates of skin edge, it's surface id, and a matched flag More...

Functions

ErrorCode move_vert (EntityHandle vertex, double dx, double dy, double dz, bool verbose)
 takes an entity handle vertex, gets the original coordinates, changes and resets the vertex coordinates in the mesh
ErrorCode rand_vert_move (EntityHandle vertex, double tol, bool verbose=false)
ErrorCode move_vert_theta (EntityHandle vertex, double tolerance, bool verbose)
 moves a vertex along the rim of the cylinder in the theta direction a distance equal to the faceting_tolerance
ErrorCode move_vert_R (EntityHandle vertex, double tol, bool verbose)
 moves the vertex in R some distance less than tol
ErrorCode rand_adj_pair (Range verts, EntityHandle &vert1, EntityHandle &vert2)
ErrorCode write_mod_file (std::string filename)
 appends "_mod" to the original file name and writes to a new .h5m
ErrorCode reload_mesh (const char *filename, EntityHandle &meshset, bool debug=false)
ErrorCode single_vert_bump (Range verts, double bump_dist_x, double bump_dist_y, double bump_dist_z, bool verbose=false)
 bumps the last vertex in the model by the x,y,z values given to the problem
ErrorCode single_vert_bump_R (Range verts, double facet_tol, bool verbose=false)
 bumps the last vertex in the cylinder model in the R direction
ErrorCode locked_pair_bump (Range verts, double bump_dist_x, double bump_dist_y, double bump_dist_z, std::string root_name, bool verbose=false)
 moves the last two verticies in the model the same distance in x, y, and z
ErrorCode rand_locked_pair_bump_rand (Range verts, double facet_tol, std::string root_name, bool verbose=false)
 selects a random pair of verticies from verts and moves them in random directions some distance less than the faceting tolerance
ErrorCode rand_locked_pair_bump_theta (Range verts, double facet_tol, std::string root_name, bool verbose=false)
 selects a random pair of verticies and moves them along theta a distance less than the faceting tolerance
ErrorCode rand_locked_pair_bump (Range verts, double bump_dist_x, double bump_dist_y, double bump_dist_z, std::string root_name, bool verbose=false)
 selects a random pair of adjacent verticies and bumps them in x, y, and z
ErrorCode locked_pair_bump_rand (Range verts, double facet_tol, std::string root_name, bool verbose=false)
 moves the last two verticies in the model in the same direction some distance less than the faceting tolerance
ErrorCode rand_vert_bump (Range verts, double facet_tol, std::string root_name, bool verbose=false)
 moves the last vertex in the model in a random direction by a distance less than the faceting tolerance
ErrorCode theta_vert_bump (Range verts, double bump_dist_theta, double tolerance, std::string root_name, bool verbose=false)
 moves the last vertex in the model along the curve of the cylinder some distance bump distance theta
ErrorCode locked_pair_move_theta (Range verts, double tolerance, std::string root_name, bool verbose=false)
 moves two adjacent vertices along theta a distance equal to the faceting tolerance
ErrorCode adjplone_locked_pair_bump (Range verts, double bump_dist_x, double bump_dist_y, double bump_dist_z, std::string root_name, bool verbose=false)
 moves the third to last and the last vertices in the model the same distance in x, y, and z
ErrorCode adjplone_locked_pair_bump_theta (Range verts, double facet_tol, std::string root_name, bool verbose=false)
 moves the third to last and the last verticies in the model in theta the same distance along theta equal to the faceting tolerance
ErrorCode adjplone_locked_pair_bump_rand (Range verts, double facet_tol, std::string root_name, bool verbose=false)
 moves the third to last and the last verticies in the model in rand directions some distance less than the facet_tolerance
ErrorCode nonadj_locked_pair_bump (Range verts, double bump_dist_x, double bump_dist_y, double bump_dist_z, std::string root_name, bool verbose=false)
 selects a random pair of adjacent verticies and bumps them the same distance in x, y, and z
ErrorCode nonadj_locked_pair_bump_theta (Range verts, double facet_tol, std::string root_name, bool verbose=false)
 selects a random pair of adjacent verticies and bumps them along the theta direction a distance equal to the faceting tolerance
ErrorCode nonadj_locked_pair_bump_rand (Range verts, double facet_tol, std::string root_name, bool verbose=false)
 selects a random pair of adjacent verticies and bumps them along the theta direction a distance equal to the faceting tolerance
ErrorCode locked_pair_bump_R (Range verts, double facet_tol, std::string root_name, bool verbose=false)
ErrorCode rand_locked_pair_bump_R (Range verts, double facet_tol, std::string root_name, bool verbose=false)
 selects random verticies from verts and moves them in R a distance equal to the faceting tolerance
ErrorCode adjplone_locked_pair_bump_R (Range verts, double facet_tol, std::string root_name, bool verbose=false)
 selects a the last vertex and third to last vertex in the model and moves them in R a distance equal to the faceting tolerance
ErrorCode nonadj_locked_pair_bump_R (Range verts, double facet_tol, std::string root_name, bool verbose=false)
 moves the last vertex in the model and a randomly selected, non-adjacent vertex and moves them both in R a distance equal to the faceting tolerance
int main (int argc, char **argv)

Function Documentation

ErrorCode adjplone_locked_pair_bump ( Range  verts,
double  bump_dist_x,
double  bump_dist_y,
double  bump_dist_z,
std::string  root_name,
bool  verbose = false 
)

moves the third to last and the last vertices in the model the same distance in x, y, and z

Definition at line 484 of file test_make_watertight.cpp.

ErrorCode adjplone_locked_pair_bump_R ( Range  verts,
double  facet_tol,
std::string  root_name,
bool  verbose = false 
)

selects a the last vertex and third to last vertex in the model and moves them in R a distance equal to the faceting tolerance

Definition at line 648 of file test_make_watertight.cpp.

ErrorCode adjplone_locked_pair_bump_rand ( Range  verts,
double  facet_tol,
std::string  root_name,
bool  verbose = false 
)

moves the third to last and the last verticies in the model in rand directions some distance less than the facet_tolerance

Definition at line 520 of file test_make_watertight.cpp.

ErrorCode adjplone_locked_pair_bump_theta ( Range  verts,
double  facet_tol,
std::string  root_name,
bool  verbose = false 
)

moves the third to last and the last verticies in the model in theta the same distance along theta equal to the faceting tolerance

Definition at line 502 of file test_make_watertight.cpp.

ErrorCode locked_pair_bump ( Range  verts,
double  bump_dist_x,
double  bump_dist_y,
double  bump_dist_z,
std::string  root_name,
bool  verbose = false 
)

moves the last two verticies in the model the same distance in x, y, and z

Definition at line 307 of file test_make_watertight.cpp.

ErrorCode locked_pair_bump_R ( Range  verts,
double  facet_tol,
std::string  root_name,
bool  verbose = false 
)

Definition at line 610 of file test_make_watertight.cpp.

ErrorCode locked_pair_bump_rand ( Range  verts,
double  facet_tol,
std::string  root_name,
bool  verbose = false 
)

moves the last two verticies in the model in the same direction some distance less than the faceting tolerance

Definition at line 382 of file test_make_watertight.cpp.

ErrorCode locked_pair_move_theta ( Range  verts,
double  tolerance,
std::string  root_name,
bool  verbose = false 
)

moves two adjacent vertices along theta a distance equal to the faceting tolerance

Definition at line 467 of file test_make_watertight.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 707 of file test_make_watertight.cpp.

ErrorCode move_vert ( EntityHandle  vertex,
double  dx,
double  dy,
double  dz,
bool  verbose = false 
)

takes an entity handle vertex, gets the original coordinates, changes and resets the vertex coordinates in the mesh

Definition at line 53 of file test_make_watertight.cpp.

ErrorCode move_vert_R ( EntityHandle  vertex,
double  tol,
bool  verbose = false 
)

moves the vertex in R some distance less than tol

Definition at line 193 of file test_make_watertight.cpp.

ErrorCode move_vert_theta ( EntityHandle  vertex,
double  tolerance,
bool  verbose = false 
)

moves a vertex along the rim of the cylinder in the theta direction a distance equal to the faceting_tolerance

Definition at line 143 of file test_make_watertight.cpp.

ErrorCode nonadj_locked_pair_bump ( Range  verts,
double  bump_dist_x,
double  bump_dist_y,
double  bump_dist_z,
std::string  root_name,
bool  verbose = false 
)

selects a random pair of adjacent verticies and bumps them the same distance in x, y, and z

Definition at line 539 of file test_make_watertight.cpp.

ErrorCode nonadj_locked_pair_bump_R ( Range  verts,
double  facet_tol,
std::string  root_name,
bool  verbose = false 
)

moves the last vertex in the model and a randomly selected, non-adjacent vertex and moves them both in R a distance equal to the faceting tolerance

Definition at line 666 of file test_make_watertight.cpp.

ErrorCode nonadj_locked_pair_bump_rand ( Range  verts,
double  facet_tol,
std::string  root_name,
bool  verbose = false 
)

selects a random pair of adjacent verticies and bumps them along the theta direction a distance equal to the faceting tolerance

Definition at line 587 of file test_make_watertight.cpp.

ErrorCode nonadj_locked_pair_bump_theta ( Range  verts,
double  facet_tol,
std::string  root_name,
bool  verbose = false 
)

selects a random pair of adjacent verticies and bumps them along the theta direction a distance equal to the faceting tolerance

Definition at line 563 of file test_make_watertight.cpp.

ErrorCode rand_adj_pair ( Range  verts,
EntityHandle &  vert1,
EntityHandle &  vert2 
)

Definition at line 689 of file test_make_watertight.cpp.

ErrorCode rand_locked_pair_bump ( Range  verts,
double  bump_dist_x,
double  bump_dist_y,
double  bump_dist_z,
std::string  root_name,
bool  verbose = false 
)

selects a random pair of adjacent verticies and bumps them in x, y, and z

Definition at line 363 of file test_make_watertight.cpp.

ErrorCode rand_locked_pair_bump_R ( Range  verts,
double  facet_tol,
std::string  root_name,
bool  verbose = false 
)

selects random verticies from verts and moves them in R a distance equal to the faceting tolerance

Definition at line 628 of file test_make_watertight.cpp.

ErrorCode rand_locked_pair_bump_rand ( Range  verts,
double  facet_tol,
std::string  root_name,
bool  verbose = false 
)

selects a random pair of verticies from verts and moves them in random directions some distance less than the faceting tolerance

Definition at line 324 of file test_make_watertight.cpp.

ErrorCode rand_locked_pair_bump_theta ( Range  verts,
double  facet_tol,
std::string  root_name,
bool  verbose = false 
)

selects a random pair of verticies and moves them along theta a distance less than the faceting tolerance

Definition at line 344 of file test_make_watertight.cpp.

ErrorCode rand_vert_bump ( Range  verts,
double  facet_tol,
std::string  root_name,
bool  verbose = false 
)

moves the last vertex in the model in a random direction by a distance less than the faceting tolerance

Definition at line 400 of file test_make_watertight.cpp.

ErrorCode rand_vert_move ( EntityHandle  vertex,
double  tol,
bool  verbose 
)

takes an entity handle vertex, gets the original coordinates, changes and resets the vertex coordinates in the mesh setup to move the vert no further than the faceting tolerance

Definition at line 92 of file test_make_watertight.cpp.

ErrorCode reload_mesh ( const char *  filename,
EntityHandle &  meshset,
bool  debug = false 
)

Definition at line 250 of file test_make_watertight.cpp.

ErrorCode single_vert_bump ( Range  verts,
double  bump_dist_x,
double  bump_dist_y,
double  bump_dist_z,
bool  verbose = false 
)

bumps the last vertex in the model by the x,y,z values given to the problem

Definition at line 283 of file test_make_watertight.cpp.

ErrorCode single_vert_bump_R ( Range  verts,
double  facet_tol,
bool  verbose = false 
)

bumps the last vertex in the cylinder model in the R direction

Definition at line 295 of file test_make_watertight.cpp.

ErrorCode theta_vert_bump ( Range  verts,
double  bump_dist_theta,
double  tolerance,
std::string  root_name,
bool  verbose = false 
)

moves the last vertex in the model along the curve of the cylinder some distance bump distance theta

Definition at line 414 of file test_make_watertight.cpp.

ErrorCode write_mod_file ( std::string  filename)

appends "_mod" to the original file name and writes to a new .h5m

Definition at line 237 of file test_make_watertight.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines