Cmm2Mesh
A function to turn mesh data from hnf to a wireframe representation
|
Funktionen | |
void | print_Vector (std::vector< MyMesh::VertexHandle > vector) |
utility function for printing vectors. Mehr ... | |
void | print_Vector (std::vector< double > vector) |
utility function for printing vectors. Mehr ... | |
void | print_2D_Vector (std::vector< std::vector< MyMesh::VertexHandle > > vector) |
A utility function for printing 2D vectors. Mehr ... | |
bool | isSubset (std::vector< MyMesh::VertexHandle > superset, std::vector< MyMesh::VertexHandle > subset) |
A utility function for checking whether or not a set is a subset of another set. Mehr ... | |
void | remove_duplicates_from_Vector (std::vector< MyMesh::VertexHandle > &vector) |
A utility function for removing duplicates form vectors. Orders the vector. Mehr ... | |
std::vector< std::vector< MyMesh::VertexHandle > > | remove_unused_from_allowed (const MyMesh &mesh, std::vector< std::vector< MyMesh::VertexHandle >> allowed_in_planes, std::vector< MyMesh::VertexHandle > used_vertecies, int plane_nr) |
Removes those vertecies that weren't used from the "allowed" vector. Mehr ... | |
std::vector< std::vector< MyMesh::VertexHandle > > | add_piece_to_mandatory (const MyMesh &mesh, std::vector< std::vector< MyMesh::VertexHandle >> mandatory_in_planes, std::vector< MyMesh::VertexHandle > piece, int plane_nr) |
Add a piece to the vector of vertecies that are mandatory in future. Mehr ... | |
void | findFace (const MyMesh &mesh, std::vector< std::vector< std::vector< MyMesh::VertexHandle >>> &allPlanes_allLoops, std::vector< std::vector< MyMesh::VertexHandle >> mandatory_in_planes, std::vector< std::vector< MyMesh::VertexHandle >> allowed_in_planes, unsigned int plane_nr, int &done, std::vector< std::vector< MyMesh::VertexHandle >> &result, bool verbose=false) |
The main loop, finding valid pieces for a given side. Mehr ... | |
void | unravelLoops (MyMesh mesh, std::vector< std::vector< std::vector< MyMesh::VertexHandle > > > allPlanes_allLoops, std::vector< std::unordered_multimap< int, int >> mymultimap_allFlaws, bool verbose=false) |
unravelLoops Restoring all loops, including those filtered for duplicate mappings Mehr ... | |
MyMesh | cleanMesh (MyMesh &mesh, MyMesh &mesh_hnf) |
cleanMesh Creates a new, 'clean' mesh, without the unnecessary data amassed during creation Mehr ... | |
std::vector< std::vector< MyMesh::VertexHandle > > | verticesByPlane (MyMesh &mesh, int planes) |
extracts all vertices belonging to a given plane Mehr ... | |
std::vector< std::vector< MyMesh::VertexHandle > > | getValidNeighbors (MyMesh &mesh, int currentPlane, std::vector< MyMesh::VertexHandle > &vhCurrentPlane) |
getValidNeighbors Mehr ... | |
bool | areParallel (MyMesh &mesh, std::vector< int > currentPath) |
bool | areParallel (MyMesh &mesh, std::vector< int > currentPath, int next) |
bool | no_U_turn (MyMesh &mesh, int currentVH, int nextVH) |
std::vector< std::pair< int, int > > | growPaths (std::vector< std::vector< int > > &paths, std::unordered_multimap< int, int > &mymultimap, MyMesh &mesh) |
void | appendPaths (std::vector< std::pair< int, int > > &growth, std::vector< std::vector< int > > &paths) |
std::vector< std::vector< int > > | loopsAtVertex (MyMesh::VertexHandle vh, std::unordered_multimap< int, int > &mymultimap, MyMesh &mesh) |
std::vector< std::vector< MyMesh::VertexHandle > > | loopsPerPlane (std::vector< MyMesh::VertexHandle > &vhCurrentPlane, std::unordered_multimap< int, int > &mymultimap, MyMesh &mesh, bool verbose=false) |
void | unify_multimap (std::vector< MyMesh::VertexHandle > vhInPlane, std::unordered_multimap< int, int > &mymultimap, bool verbose=false) |
void | resolve_duplicateMappings (std::vector< MyMesh::VertexHandle > keys, std::unordered_multimap< int, int > &mymultimap_toFix, std::unordered_multimap< int, int > mymultimap_knownFlaws) |
void | remove_duplicatesFromMap (std::vector< MyMesh::VertexHandle > keys, std::unordered_multimap< int, int > &mymultimap_toFix, std::unordered_multimap< int, int > &mymultimap_knownFlaws) |
void | print_multimap (std::vector< MyMesh::VertexHandle > keys, std::unordered_multimap< int, int > mymultimap) |
void | create_multimaps (MyMesh &mesh, std::vector< MyMesh::VertexHandle > vhCurrentPlane, int plane, std::unordered_multimap< int, int > &mymultimap, std::unordered_multimap< int, int > &mymultimap_flaws, double minLength=1.0, bool verbose=false) |
int | crossingsMultiplyTest (std::vector< Eigen::Vector2d > &polygon, Eigen::Vector2d cmm=Eigen::Vector2d(0, 0)) |
std::vector<std::vector<MyMesh::VertexHandle> > ilato::add_piece_to_mandatory | ( | const MyMesh & | mesh, |
std::vector< std::vector< MyMesh::VertexHandle >> | mandatory_in_planes, | ||
std::vector< MyMesh::VertexHandle > | piece, | ||
int | plane_nr | ||
) |
Add a piece to the vector of vertecies that are mandatory in future.
mesh | the mesh to work on |
mandatory_in_planes | the vector to store the mandatories in |
piece | the piece itself |
plane_nr | the number of the plane used |
void ilato::appendPaths | ( | std::vector< std::pair< int, int > > & | growth, |
std::vector< std::vector< int > > & | paths | ||
) |
bool ilato::areParallel | ( | MyMesh & | mesh, |
std::vector< int > | currentPath | ||
) |
bool ilato::areParallel | ( | MyMesh & | mesh, |
std::vector< int > | currentPath, | ||
int | next | ||
) |
MyMesh ilato::cleanMesh | ( | MyMesh & | mesh, |
MyMesh & | mesh_hnf | ||
) |
cleanMesh Creates a new, 'clean' mesh, without the unnecessary data amassed during creation
mesh | the mesh |
mesh_hnf | the original hmf version of the mesh |
void ilato::create_multimaps | ( | MyMesh & | mesh, |
std::vector< MyMesh::VertexHandle > | vhCurrentPlane, | ||
int | plane, | ||
std::unordered_multimap< int, int > & | mymultimap, | ||
std::unordered_multimap< int, int > & | mymultimap_flaws, | ||
double | minLength = 1.0 , |
||
bool | verbose = false |
||
) |
int ilato::crossingsMultiplyTest | ( | std::vector< Eigen::Vector2d > & | polygon, |
Eigen::Vector2d | cmm = Eigen::Vector2d(0,0) |
||
) |
void ilato::findFace | ( | const MyMesh & | mesh, |
std::vector< std::vector< std::vector< MyMesh::VertexHandle >>> & | allPlanes_allLoops, | ||
std::vector< std::vector< MyMesh::VertexHandle >> | mandatory_in_planes, | ||
std::vector< std::vector< MyMesh::VertexHandle >> | allowed_in_planes, | ||
unsigned int | plane_nr, | ||
int & | done, | ||
std::vector< std::vector< MyMesh::VertexHandle >> & | result, | ||
bool | verbose = false |
||
) |
The main loop, finding valid pieces for a given side.
mesh | the mesh to work on |
allPlanes_allLoops | a vector consisting of all calculated loops per plane |
mandatory_in_planes | the vertecies mandatory per plane |
allowed_in_planes | the vertecues allowed per plane |
plane_nr | the number of the plane used |
done | are we done? set by function |
result | container for result |
verbose | Set true for debug info |
std::vector<std::vector<MyMesh::VertexHandle> > ilato::getValidNeighbors | ( | MyMesh & | mesh, |
int | currentPlane, | ||
std::vector< MyMesh::VertexHandle > & | vhCurrentPlane | ||
) |
getValidNeighbors
mesh | intersection points of all CMM planes |
currentPlane | |
vhCurrentPlane | vertexhandles of current planes' intersection points |
std::vector<std::pair<int,int> > ilato::growPaths | ( | std::vector< std::vector< int > > & | paths, |
std::unordered_multimap< int, int > & | mymultimap, | ||
MyMesh & | mesh | ||
) |
bool ilato::isSubset | ( | std::vector< MyMesh::VertexHandle > | superset, |
std::vector< MyMesh::VertexHandle > | subset | ||
) |
A utility function for checking whether or not a set is a subset of another set.
superset | The set to be checked for being a superset. |
subset | The set to be checked for being a subset. |
std::vector<std::vector<int> > ilato::loopsAtVertex | ( | MyMesh::VertexHandle | vh, |
std::unordered_multimap< int, int > & | mymultimap, | ||
MyMesh & | mesh | ||
) |
std::vector<std::vector<MyMesh::VertexHandle> > ilato::loopsPerPlane | ( | std::vector< MyMesh::VertexHandle > & | vhCurrentPlane, |
std::unordered_multimap< int, int > & | mymultimap, | ||
MyMesh & | mesh, | ||
bool | verbose = false |
||
) |
bool ilato::no_U_turn | ( | MyMesh & | mesh, |
int | currentVH, | ||
int | nextVH | ||
) |
void ilato::print_2D_Vector | ( | std::vector< std::vector< MyMesh::VertexHandle > > | vector | ) |
A utility function for printing 2D vectors.
vector | The vector to be printed. |
void ilato::print_multimap | ( | std::vector< MyMesh::VertexHandle > | keys, |
std::unordered_multimap< int, int > | mymultimap | ||
) |
void ilato::print_Vector | ( | std::vector< MyMesh::VertexHandle > | vector | ) |
utility function for printing vectors.
vector | The vector to be printed. |
void ilato::print_Vector | ( | std::vector< double > | vector | ) |
utility function for printing vectors.
vector | The vector to be printed. |
void ilato::remove_duplicates_from_Vector | ( | std::vector< MyMesh::VertexHandle > & | vector | ) |
A utility function for removing duplicates form vectors. Orders the vector.
vector | The vector to be cleaned. |
void ilato::remove_duplicatesFromMap | ( | std::vector< MyMesh::VertexHandle > | keys, |
std::unordered_multimap< int, int > & | mymultimap_toFix, | ||
std::unordered_multimap< int, int > & | mymultimap_knownFlaws | ||
) |
std::vector<std::vector<MyMesh::VertexHandle> > ilato::remove_unused_from_allowed | ( | const MyMesh & | mesh, |
std::vector< std::vector< MyMesh::VertexHandle >> | allowed_in_planes, | ||
std::vector< MyMesh::VertexHandle > | used_vertecies, | ||
int | plane_nr | ||
) |
Removes those vertecies that weren't used from the "allowed" vector.
mesh | the mesh to work on |
allowed_in_planes | the vertecies in each planes that are still allowed to be used |
used_vertecies | the vertecies that been used in this iteration |
plane_nr | the number of the plane used |
void ilato::resolve_duplicateMappings | ( | std::vector< MyMesh::VertexHandle > | keys, |
std::unordered_multimap< int, int > & | mymultimap_toFix, | ||
std::unordered_multimap< int, int > | mymultimap_knownFlaws | ||
) |
void ilato::unify_multimap | ( | std::vector< MyMesh::VertexHandle > | vhInPlane, |
std::unordered_multimap< int, int > & | mymultimap, | ||
bool | verbose = false |
||
) |
void ilato::unravelLoops | ( | MyMesh | mesh, |
std::vector< std::vector< std::vector< MyMesh::VertexHandle > > > | allPlanes_allLoops, | ||
std::vector< std::unordered_multimap< int, int >> | mymultimap_allFlaws, | ||
bool | verbose = false |
||
) |
unravelLoops Restoring all loops, including those filtered for duplicate mappings
mesh | the mesh to work on |
allPlanes_allLoops | a vector consisting of all calculated loops per plane |
mymultimap_allFlaws | the vector of all the Flaw-dictionaries per planes |
verbose | set true for debug info |
std::vector<std::vector<MyMesh::VertexHandle> > ilato::verticesByPlane | ( | MyMesh & | mesh, |
int | planes | ||
) |
extracts all vertices belonging to a given plane
mesh | intersection points of all CMM planes |
planes | number of surface parts mesured via CMM |