Commit 08553e53 authored by Lionel Untereiner's avatar Lionel Untereiner

import tet/hex meshes

parent 6acacc13
......@@ -29,6 +29,7 @@
#include "Algo/Modelisation/polyhedron.h"
#include "Algo/Import/import.h"
#include "Algo/Geometry/volume.h"
#include "Algo/Modelisation/tetrahedralization.h"
#include "Utils/chrono.h"
......@@ -455,6 +456,9 @@ int main(int argc, char **argv)
// Algo::Volume::Export::exportNAS<PFP>(myMap,position,"/tmp/test1.nas");
// Algo::Volume::Export::exportVTU<PFP>(myMap,position,"/tmp/test3.vtu");
}
myMap.check();
// un peu d'interface
QApplication app(argc, argv);
MyQT sqt;
......
This diff is collapsed.
......@@ -136,6 +136,8 @@ bool isPyra(typename PFP::MAP& map, Dart d, unsigned int thread = 0);
template <typename PFP>
bool isPrism(typename PFP::MAP& map, Dart d, unsigned int thread = 0);
template <typename PFP>
bool isHexahedron(typename PFP::MAP& the_map, Dart d, unsigned int thread=0);
template <typename PFP>
Dart embedPrism(typename PFP::MAP& map, VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, unsigned int n, bool withBoundary, float bottom_radius, float top_radius, float height);
......
......@@ -415,6 +415,27 @@ bool isPrism(typename PFP::MAP& map, Dart d, unsigned int thread)
return true;
}
template <typename PFP>
bool isHexahedron(typename PFP::MAP& the_map, Dart d, unsigned int thread)
{
unsigned int nbFaces = 0;
//Test the number of faces end its valency
Traversor3WF<typename PFP::MAP> travWF(the_map, d, false, thread);
for(Dart dit = travWF.begin() ; dit != travWF.end(); dit = travWF.next())
{
//increase the number of faces
nbFaces++;
if(nbFaces > 6) //too much faces
return false;
//test the valency of this face
if(the_map.faceDegree(dit) != 4)
return false;
}
return true;
}
template <typename PFP>
void explodPolyhedron(typename PFP::MAP& map, Dart d, VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position)
......
......@@ -42,9 +42,6 @@ namespace Volume
namespace Modelisation
{
template <typename PFP>
bool isHexahedron(typename PFP::MAP& the_map, Dart d, unsigned int thread=0);
/**
* Cut a 3D ear from a mesh : the ear is sewn by phi3 to the rest of the volume
* @param d dart of the point of the ear
......
......@@ -42,28 +42,6 @@ namespace Volume
namespace Modelisation
{
template <typename PFP>
bool isHexahedron(typename PFP::MAP& the_map, Dart d, unsigned int thread)
{
unsigned int nbFaces = 0;
//Test the number of faces end its valency
Traversor3WF<typename PFP::MAP> travWF(the_map, d, false, thread);
for(Dart dit = travWF.begin() ; dit != travWF.end(); dit = travWF.next())
{
//increase the number of faces
nbFaces++;
if(nbFaces > 6) //too much faces
return false;
//test the valency of this face
if(the_map.faceDegree(dit) != 4)
return false;
}
return true;
}
template <typename PFP>
Dart cut3Ear(typename PFP::MAP& map, Dart d)
{
......
......@@ -470,7 +470,7 @@ Dart splitVertex(typename PFP::MAP& map, std::vector<Dart>& vd)
*************************************************************************************************/
template <typename PFP>
bool isTetrahedron(typename PFP::MAP& map, Vol v, unsigned int thread)
bool isTetrahedron(typename PFP::MAP& map, Dart v, unsigned int thread)
{
unsigned int nbFaces = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment