Commit 03f47a06 authored by untereiner's avatar untereiner

Adding 3maps MR with Regular Subdivision

parent 9cc6ba9f
......@@ -54,7 +54,7 @@ SimpleGMap3::SimpleGMap3()
SelectorMarked sm(markOrient);
std::cout << "AAA"<< std::endl;
Algo::Modelisation::catmullClarkVol<PFP,PFP::TVEC3,PFP::VEC3>(myMap, position, sm);
//Algo::Modelisation::catmullClarkVol<PFP,PFP::TVEC3,PFP::VEC3>(myMap, position, sm);
for(unsigned int i = position.begin() ; i != position.end() ; position.next(i))
position[i] += VEC3(2,0,0);
......
......@@ -263,8 +263,8 @@ void MyQT::cb_keyPress(int code)
if(code == 'c')
{
SelectorDartNoBoundary<PFP::MAP> nb(myMap);
Algo::Modelisation::catmullClarkVol<PFP>(myMap, position, nb);
//SelectorDartNoBoundary<PFP::MAP> nb(myMap);
Algo::Modelisation::catmullClarkVol<PFP>(myMap, position);
m_positionVBO->updateData(position);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::TRIANGLES);
......@@ -272,7 +272,7 @@ void MyQT::cb_keyPress(int code)
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::POINTS);
m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f, 0.9f, nb);
m_render_topo->updateData<PFP>(myMap, position, 0.9f, 0.9f, 0.9f, allDarts);
}
}
......
......@@ -466,31 +466,31 @@ Dart subdivideVolumeClassic2(typename PFP::MAP& map, Dart d, typename PFP::TVEC3
//Third step : 3-sew internal faces
for (std::vector<std::pair<Dart,Dart> >::iterator it = subdividedfaces.begin(); it != subdividedfaces.end(); ++it)
{
Dart f1 = (*it).first;
Dart f2 = (*it).second;
if(map.isBoundaryFace(map.phi2(f1)) && map.isBoundaryFace(map.phi2(f2)))
{
std::cout << "boundary" << std::endl;
//id pour toutes les faces interieures
map.sewVolumes(map.phi2(f1), map.phi2(f2));
// //Third step : 3-sew internal faces
// for (std::vector<std::pair<Dart,Dart> >::iterator it = subdividedfaces.begin(); it != subdividedfaces.end(); ++it)
// {
// Dart f1 = (*it).first;
// Dart f2 = (*it).second;
//
// //Fais a la couture !!!!!
// unsigned int idface = map.getNewFaceId();
// map.setFaceId(map.phi2(f1),idface, FACE);
}
//
// //FAIS a la couture !!!!!!!
// //id pour toutes les aretes exterieurs des faces quadrangulees
// unsigned int idedge = map.getEdgeId(f1);
// map.setEdgeId(map.phi2(f1), idedge, DART);
// map.setEdgeId( map.phi2(f2), idedge, DART);
}
// if(map.isBoundaryFace(map.phi2(f1)) && map.isBoundaryFace(map.phi2(f2)))
// {
// std::cout << "boundary" << std::endl;
// //id pour toutes les faces interieures
// map.sewVolumes(map.phi2(f1), map.phi2(f2));
//
////
//// //Fais a la couture !!!!!
//// unsigned int idface = map.getNewFaceId();
//// map.setFaceId(map.phi2(f1),idface, FACE);
// }
////
//// //FAIS a la couture !!!!!!!
//// //id pour toutes les aretes exterieurs des faces quadrangulees
//// unsigned int idedge = map.getEdgeId(f1);
//// map.setEdgeId(map.phi2(f1), idedge, DART);
//// map.setEdgeId( map.phi2(f2), idedge, DART);
// }
//LA copie de L'id est a gerer avec le sewVolumes normalement !!!!!!
//id pour les aretes interieurs : (i.e. 6 pour un hexa)
......
......@@ -44,10 +44,9 @@ namespace Import
* import a mesh
* @param map the map in which the function imports the mesh
* @param filename (*.{trian,trianbgz,off,obj,ply})
* @param positions table of vertices positions attribute
* @param m a marker that will be set by the function. If closeObject=false the phi2 that have fixed point are marked, else the created darts of the boundary are marked.
* @param attrNames attribute names
* @param kind what kind of mesh is the file (if none (-1) determined by filename extension) (cf enum in Mesh2Tables for other kind values)
* @param closeObject a boolean indicating if the imported mesh should be closed
* @param mergeColseVertces a boolean indicating if the imported mesh should be closed
* @return a boolean indicating if import was successfull
*/
template <typename PFP>
......@@ -55,14 +54,25 @@ bool importMesh(typename PFP::MAP& map, const std::string& filename, std::vector
/**
* import a volumetric mesh
* @param map the map in which the function imports the mesh
* @param filename (*.{tet,off,ts})
* @param attrNames attribute names
* @param kind what kind of mesh is the file (if none (-1) determined by filename extension) (cf enum in Mesh2Tables for other kind values)
* @param mergeColseVertces a boolean indicating if the imported mesh should be closed
* @return a boolean indicating if import was successfull
*/
//template <typename PFP>
//bool importMesh(typename PFP::MAP& map, const std::string& filename, typename PFP::TVEC3& positions, ImportVolumique::ImportType kind = ImportVolumique::UNKNOWNVOLUME);
//template <typename PFP>
//bool importObjWithTex(typename PFP::MAP& map, const std::string& filename);
//
template <typename PFP>
bool importMeshV(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, ImportVolumique::ImportType kind = ImportVolumique::UNKNOWNVOLUME, bool mergeCloseVertices=false);
/**
* import a mesh and extrud it
* @param map the map in which the function imports the mesh
* @param filename (*.{trian,trianbgz,off,obj,ply})
* @param attrNames attribute names
* @param kind what kind of mesh is the file (if none (-1) determined by filename extension) (cf enum in Mesh2Tables for other kind values)
* @param mergeColseVertces a boolean indicating if the imported mesh should be closed
* @return a boolean indicating if import was successfull
*/
template <typename PFP>
bool importMeshToExtrude(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, ImportSurfacique::ImportType kind = ImportSurfacique::UNKNOWNSURFACE);
......@@ -80,6 +90,10 @@ template <typename PFP>
bool importTs(typename PFP::MAP& the_map, const std::string& filename, std::vector<std::string>& attrNames, float scaleFactor = 1.0f);
//template <typename PFP>
//bool importObjWithTex(typename PFP::MAP& map, const std::string& filename);
//
} // namespace Import
} // namespace Algo
......
......@@ -57,7 +57,7 @@ namespace Import
namespace ImportVolumique
{
enum ImportType { UNKNOWNVOLUME ,TET ,TRIANBGZ ,PLY ,OFF, OBJ };
enum ImportType { UNKNOWNVOLUME , TET, ELE, TS };
}
......@@ -184,9 +184,6 @@ public:
bool importTet(const std::string& filename, std::vector<std::string>& attrNames, float scaleFactor);
bool importPly(const std::string& filename, std::vector<std::string>& attrNames);
bool importTrianBinGz(const std::string& filename, std::vector<std::string>& attrNames);
MeshTablesVolume(typename PFP::MAP& map):
m_map(map)
......
......@@ -37,11 +37,11 @@ ImportVolumique::ImportType MeshTablesVolume<PFP>::getFileType(const std::string
if ((filename.rfind(".tet")!=std::string::npos) || (filename.rfind(".TET")!=std::string::npos))
return ImportVolumique::TET;
if ((filename.rfind(".trianbgz")!=std::string::npos) || (filename.rfind(".TRIANBGZ")!=std::string::npos))
return ImportVolumique::TRIANBGZ;
if ((filename.rfind(".ele")!=std::string::npos) || (filename.rfind(".ELE")!=std::string::npos))
return ImportVolumique::ELE;
if ((filename.rfind(".ply")!=std::string::npos) || (filename.rfind(".PLY")!=std::string::npos))
return ImportVolumique::PLY;
if ((filename.rfind(".ts")!=std::string::npos) || (filename.rfind(".TS")!=std::string::npos))
return ImportVolumique::TS;
return ImportVolumique::UNKNOWNVOLUME;
}
......@@ -54,14 +54,12 @@ bool MeshTablesVolume<PFP>::importMesh(const std::string& filename, std::vector<
switch (kind)
{
case ImportVolumique::PLY:
return importPly(filename, attrNames);
break;
case ImportVolumique::TET:
return importTet(filename, attrNames, scaleFactor);
break;
case ImportVolumique::TRIANBGZ:
return importTrianBinGz(filename, attrNames);
case ImportVolumique::ELE:
break;
case ImportVolumique::TS:
break;
default:
CGoGNerr << "Not yet supported" << CGoGNendl;
......@@ -73,48 +71,44 @@ bool MeshTablesVolume<PFP>::importMesh(const std::string& filename, std::vector<
template <typename PFP>
bool MeshTablesVolume<PFP>::importTet(const std::string& filename, std::vector<std::string>& attrNames, float scaleFactor=1.0f)
{
AttributeContainer& container = m_map.getAttributeContainer(VERTEX) ;
// AttributeHandler<typename PFP::VEC3> positions = m_map.template addAttribute<typename PFP::VEC3>(VERTEX, "position") ;
AttributeHandler<typename PFP::VEC3> positions = m_map.template getAttribute<typename PFP::VEC3>(VERTEX, "position") ;
AttributeHandler<VEC3> positions = m_map.template getAttribute<VEC3>(VERTEX, "position") ;
if (!positions.isValid())
positions = m_map.template addAttribute<typename PFP::VEC3>(VERTEX, "position") ;
positions = m_map.template addAttribute<VEC3>(VERTEX, "position") ;
attrNames.push_back(positions.name()) ;
// open file
AttributeContainer& container = m_map.getAttributeContainer(VERTEX) ;
//open file
std::ifstream fp(filename.c_str(), std::ios::in);
if (!fp.good())
{
CGoGNerr << "Unable to open file " << filename<< CGoGNendl;
CGoGNerr << "Unable to open file " << filename << CGoGNendl;
return false;
}
std::string ligne;
int nbv,nbt;
// lecture des nombres de sommets/tetra
std::string ligne;
unsigned int nbv, nbt;
// reading number of vertices
std::getline (fp, ligne);
std::stringstream oss(ligne);
oss >> nbv;
//CGoGNout << "nbV = " << nbv << CGoGNendl;
// reading number of tetrahedra
std::getline (fp, ligne);
std::stringstream oss2(ligne);
oss2 >> nbt;
//CGoGNout << "nbT = " << nbt << CGoGNendl;
//lecture sommets
//reading vertices
std::vector<unsigned int> verticesID;
verticesID.reserve(nbv);
for(int i=0; i<nbv;++i)
for(unsigned int i = 0; i < nbv;++i)
{
do
{
std::getline (fp, ligne);
} while (ligne.size()==0);
do
{
std::getline (fp, ligne);
} while (ligne.size() == 0);
std::stringstream oss(ligne);
......@@ -122,21 +116,18 @@ bool MeshTablesVolume<PFP>::importTet(const std::string& filename, std::vector<s
oss >> x;
oss >> y;
oss >> z;
// on peut ajouter ici la lecture de couleur si elle existe
// TODO : if required read other vertices attributes here
VEC3 pos(x*scaleFactor,y*scaleFactor,z*scaleFactor);
//CGoGNout << "VEC3 = " << pos << CGoGNendl;
unsigned int id = container.insertLine();
positions[id] = pos;
verticesID.push_back(id);
}
m_nbVertices = verticesID.size();
//CGoGNout << "nbVertices = " << m_nbVertices << CGoGNendl;
m_nbVertices = nbv;
m_nbVolumes = nbt;
//CGoGNout << "nbVolumes = " << m_nbVolumes << CGoGNendl;
// lecture tetra
// normalement m_nbVolumes*12 (car on ne charge que des tetra)
......@@ -154,12 +145,7 @@ bool MeshTablesVolume<PFP>::importTet(const std::string& filename, std::vector<s
std::stringstream oss(ligne);
int n;
oss >> n; // nb de faces d'un volume ?
// m_nbVerticesPerFace.push_back(3);
// m_nbVerticesPerFace.push_back(3);
// m_nbVerticesPerFace.push_back(3);
// m_nbVerticesPerFace.push_back(3);
// m_nbFacesPerVolume.push_back(4);
m_nbEdges.push_back(3);
m_nbEdges.push_back(3);
m_nbEdges.push_back(3);
......@@ -193,112 +179,6 @@ bool MeshTablesVolume<PFP>::importTet(const std::string& filename, std::vector<s
return true;
}
template <typename PFP>
bool MeshTablesVolume<PFP>::importTrianBinGz(const std::string& filename, std::vector<std::string>& attrNames)
{
// // open file
// igzstream fs(filename.c_str(), std::ios::in|std::ios::binary);
//
// if (!fs.good())
// {
// CGoGNerr << "Unable to open file " << filename << CGoGNendl;
// return false;
// }
// // read nb of points
// int nbp;
// fs.read(reinterpret_cast<char*>(&nbp), sizeof(int));
//
// // read points
// std::vector<EMB*> vertices;
// {// juste pour limiter la portee des variables
// vertices.reserve(nbp);
// int labEmb=0;
// float* buffer = new float[nbp*3];
// fs.read(reinterpret_cast<char*>(buffer),3*nbp*sizeof(float));
// float *ptr = buffer;
// for (int i=0; i<nbp; ++i)
// {
// gmtl::Vec3f pos;
// pos[0]= *ptr++;
// pos[1]= *ptr++;
// pos[2]= *ptr++;
// EMB* em = EMB::create(pos);
// em->setLabel(labEmb++);
// vertices.push_back(em);
// }
// delete[] buffer;
// }
// m_nbVertices = vertices.size();
//
// // read nb of faces
// fs.read(reinterpret_cast<char*>(&m_nbFaces), sizeof(int));
// m_nbVolumes=1;
// m_nbFacesPerVolume.push_back(m_nbFaces);
// m_nbVerticesPerFace.reserve(m_nbFaces);
// m_emb.reserve(3*m_nbFaces);
//
// // read indices of faces
// {// juste pour limiter la portee des variables
// int* buffer = new int[m_nbFaces*6];
// fs.read(reinterpret_cast<char*>(buffer),6*m_nbFaces*sizeof(float));
// int *ptr = buffer;
//
// for (unsigned i=0; i<m_nbFaces; i++)
// {
// m_nbVerticesPerFace.push_back(3);
// m_emb.push_back(vertices[*ptr++]);
// m_emb.push_back(vertices[*ptr++]);
// m_emb.push_back(vertices[*ptr++]);
// }
// }
//
// fs.close();
return true;
}
template<typename PFP>
bool MeshTablesVolume<PFP>::importPly(const std::string& filename, std::vector<std::string>& attrNames)
{
// PlyImportData pid;
//
// if (! pid.read_file(filename) )
// {
// CGoGNerr << "Unable to open file " << filename<< CGoGNendl;
// return false;
// }
//
// // lecture des nombres de sommets/faces/ar�tes
// m_nbVertices = pid.nbVertices();
// m_nbFaces = pid.nbFaces();
// m_nbVolumes=1;
//
//
// //lecture sommets
// std::vector<EMB*> vertices;
// vertices.reserve(m_nbVertices);
// for (unsigned i=0; i<m_nbVertices;++i)
// {
// EMB* em =EMB::create(pid.vertexPosition(i));
// em->setLabel(i);
// vertices.push_back(em);
// }
//
// m_nbVerticesPerFace.reserve(m_nbFaces);
// m_emb.reserve(m_nbVertices*8);
// m_nbFacesPerVolume.push_back(m_nbFaces);
//
// for (unsigned i=0; i<m_nbFaces;++i)
// {
// int n = pid.getFaceValence(i);
// m_nbVerticesPerFace.push_back(n);
// int* indices = pid.getFaceIndices(i);
// for (int j=0;j<n; ++j)
// {
// m_emb.push_back(vertices[ indices[j] ]);
// }
// }
return true;
}
} // namespace Import
......
......@@ -243,296 +243,8 @@ bool importMesh(typename PFP::MAP& map, MeshTablesVolume<PFP>& mtv)
AutoAttributeHandler< NoMathIONameAttribute< std::vector<Dart> > > vecDartsPerVertex(map, VERTEX, "incidents");
//ALGO
// précondition
// indexer le tableau du nombre d'arrete par faces par le nombre de faces par volume
//
//creation d'une sous-carte (2-carte) pour les faces d'un volume en fonction du nombre d'arete grace a un meshtableSurface
//avoir un tableau_de_sommets[nbsommets] indexe par les sommets dans lequel on comptera le nombre de fois qu'on a croisé un sommet
//
//
//fusion de toutes les composantes connexes avec couture par phi3
unsigned int nbf = mtv.getNbFaces(); //getNbVolume()
unsigned int indexNbFaces = 0;
//for each volume
for(unsigned int i = 0 ; i < nbf ; ++i)
{
unsigned int indexNbFacesMin = indexNbFaces;
indexNbFaces += mtv.getNbFacesVolume(i) - 1;
//for each face of this volume
for(unsigned int j = indexNbFacesMin ; j<= indexNbFaces ; ++j)
{
//reconstructing the faces for this volume
unsigned int nbEdges = mtv.getNbEdgesFace(j);
// std::vector<unsigned int> edgesBuffer;
// edgesBuffer.reserve(8);
//
// edgesBuffer.clear();
// unsigned int prec = EMBNULL;
// for (unsigned int j = 0; j < nbe; ++j)
// {
// unsigned int em = mtv.getEmbIdx(index++);
// if (em!=prec)
// {
// prec = em;
// edgesBuffer.push_back(em);
// }
// }
// // check first/last vertices
// if (edgesBuffer.front() == edgesBuffer.back())
// edgesBuffer.pop_back();
//
// // create only non degenerated faces
// nbe = edgesBuffer.size();
// if (nbe >2)
// {
// Dart d = map.newFace(nbe);
// for (unsigned int j = 0; j < nbe; ++j)
// {
// unsigned int em = edgesBuffer[j]; // get embedding
// map.setDartEmbedding(VERTEX, d, em); // associate to dart
// vecDartsPerVertex[em].push_back(d); // store incident darts for fast phi2 reconstruction
// d = map.phi1(d);
// }
// m.markOrbit(FACE, d); // mark on the fly to unmark on second loop
// }
}
indexNbFaces++;
}
int index = 0;
// buffer for tempo faces (used to remove degenerated edges)
std::vector<unsigned int> edgesBuffer;
edgesBuffer.reserve(8);
DartMarkerNoUnmark m(map) ;
// for each face of table
for(unsigned int i = 0; i < nbf; ++i)
{
// store face in buffer, removing degenerated edges
unsigned int nbe = mtv.getNbEdgesFace(i);
edgesBuffer.clear();
unsigned int prec = EMBNULL;
for (unsigned int j = 0; j < nbe; ++j)
{
unsigned int em = mtv.getEmbIdx(index++);
if (em!=prec)
{
prec = em;
edgesBuffer.push_back(em);
}
}
// check first/last vertices
if (edgesBuffer.front() == edgesBuffer.back())
edgesBuffer.pop_back();
// create only non degenerated faces
nbe = edgesBuffer.size();
if (nbe >2)
{
Dart d = map.newFace(nbe);
for (unsigned int j = 0; j < nbe; ++j)
{
unsigned int em = edgesBuffer[j]; // get embedding
map.setDartEmbedding(VERTEX, d, em); // associate to dart
vecDartsPerVertex[em].push_back(d); // store incident darts for fast phi2 reconstruction
d = map.phi1(d);
}
m.markOrbit(FACE, d); // mark on the fly to unmark on second loop
}
}
//unsigned int nbnm = 0;
// reconstruct neighbourhood
for (Dart d = map.begin(); d != map.end(); map.next(d))
{
if (m.isMarked(d))
{
std::vector<Dart>& vec = vecDartsPerVertex[map.phi1(d)];
//Phi3 reconstruction
unsigned int emb1d = map.getEmbedding(VERTEX, map.phi_1(d));
unsigned int emb2d = map.getEmbedding(VERTEX, map.phi1(map.phi1(d)));
for (typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end(); ++it)
{
Dart dprim=*it;
unsigned int emb1dprim = map.getEmbedding(VERTEX, map.phi1(map.phi1(dprim)));
unsigned int emb2dprim = map.getEmbedding(VERTEX, map.phi_1(dprim));
if(emb1d == emb1dprim && emb2d == emb2dprim)
{
map.sewVolumes(d,dprim);
}
}
//Phi2 reconstruction
emb1d = map.getEmbedding(VERTEX, d);
emb2d = map.getEmbedding(VERTEX, map.phi1(d));
for (typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end(); ++it)
{
Dart dprim=*it;
unsigned int emb1dprim = map.getEmbedding(VERTEX, map.phi1(dprim));
unsigned int emb2dprim = map.getEmbedding(VERTEX, dprim);
if(emb1d == emb1dprim && emb2d == emb2dprim)
{
map.sewFaces(d,dprim);
}
}
m.unmarkOrbit(DART,d);
}
}
return true ;
//
// //creer un polyhedre de nbf faces
// //stocker pour un dart d tout les darts autour de l'arete
// // reconstruire le voisine de l'arete pour phi3
//
// AutoAttributeHandler< NoMathIONameAttribute< std::vector<Dart> > > vecDartsPerEdge(map, VERTEX, "incidents");
//
// unsigned nbv = mtv.getNbVolumes();
// int index = 0;
// // buffer for tempo faces (used to remove degenerated edges)
// std::vector<unsigned int> edgesBuffer;
// edgesBuffer.reserve(8);
//
// DartMarkerNoUnmark m(map) ;
//
// //for each volume of table
// for(unsigned int i = 0; i < nbv ; ++i)
// {
// unsigned int nbf = mtv.getNbFacesPerVolume(i);
//
// //for each face of a volume
// for(unsigned int j = 0; j < nbf; ++j)
// {
// // store face in buffer, removing degenerated edges
// unsigned int nbe = mtv.getNbVerticesPerFace(j);
// edgesBuffer.clear();
// unsigned int prec = EMBNULL;
// for (unsigned int k = 0; k < nbe; ++k)
// {
// unsigned int em = mtv.getEmbIdx(index++);
// if (em!=prec)
// {
// prec = em;
// edgesBuffer.push_back(em);
// }
// }
//
// // check first/last vertices
// if (edgesBuffer.front() == edgesBuffer.back())
// edgesBuffer.pop_back();
//
// // create only non degenerated faces
// nbe = edgesBuffer.size();
//
// if (nbe >2)
// {
// Dart d = map.newFace(nbe);
// Dart d3 = map.newFace(nbe);
// map.sewVolumes(d,d3);
//
// for (unsigned int l = 0; l < nbe; ++l)
// {
// unsigned int em = edgesBuffer[l]; // get embedding
// map.setDartEmbedding(VERTEX, d, em); // associate to dart
// vecDartsPerVertex[em].push_back(d); // store incident darts for fast phi2 reconstruction
// d = map.phi1(d);
//
//// if(l == nbe-1)
//// {
//// unsigned int em2 = edgesBuffer[0]; // get embedding
//// map.setDartEmbedding(VERTEX, d3, em2); // associate to dart
//// vecDartsPerVertex[em2].push_back(d3); // store incident darts for fast phi2 reconstruction
//// }
//// else
//// {
//// unsigned int em2 = edgesBuffer[l+1]; // get embedding
//// map.setDartEmbedding(VERTEX, d3, em2); // associate to dart
//// vecDartsPerVertex[em2].push_back(d3); // store incident darts for fast phi2 reconstruction
//// }
////
//// d3 = map.phi_1(d3);
// }
// m.markOrbit(FACE, d); // mark on the fly to unmark on second loop
// //m.markOrbit(FACE, d3); // mark on the fly to unmark on second loop
// }
// }
// }
//
//
// unsigned int nbnm = 0;
// // reconstruct neighbourhood
// for (Dart d = map.begin(); d != map.end(); map.next(d))
// {
// if (m.isMarked(d))
// {
// // darts incident to end vertex of edge
// std::vector<Dart>& vec = vecDartsPerVertex[map.phi1(d)];
//
// unsigned int embd = map.getEmbedding(VERTEX, d);
// unsigned int nbf = 0;
// Dart good_dart = d;
//
// CGoGNout << "vec size" << vec.size() << CGoGNendl;
//
// for(typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end(); ++it)
// {
// if (map.getEmbedding(VERTEX, map.phi1(*it)) == embd)
// {
// good_dart = *it;
// nbf++;
// }
// }
//
// if (nbf == 2)
// {
// if (good_dart == map.phi2(good_dart))
// {
// map.sewFaces(d, good_dart);
// m.unmarkOrbit(EDGE, d);
// }
// }
// else
// {
// ++nbnm;
// }
// }
// }
//
// if (nbnm > 0)
// {
// CGoGNout << "Warning " << nbnm << " darts with phi2 fix points" << CGoGNendl;
// }
//
// return true ;
return false;
}
template <typename PFP>
......@@ -549,6 +261,33 @@ bool importMesh(typename PFP::MAP& map, const std::string& filename, std::vector
return importMesh<PFP>(map, mts);
}
template <typename PFP>
bool importMeshV(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, ImportVolumique::ImportType kind, bool mergeCloseVertices)
{
switch (kind)
{
case ImportVolumique::TET:
return Algo::Import::importTet<PFP>(map, filename, attrNames, 1.0f);