Commit c6088ade authored by CGoGN GIT Supervisor's avatar CGoGN GIT Supervisor

Merge branch 'master' of /home/jund/CGoGN

* 'master' of /home/jund/CGoGN:
  adding mergeFaces on map3
  Resolving bug in MarkerForTraversor and compilation pb for importMoka and exportPov
  import Tet : option to invert, correction of mergeFace gmap2, removing extra createHexa in polyhedron3D
  removing unnecessary check() in subdivision3
  correcting embedding error for edge orbit on splitFace on 3gmap, replacing name functions in gmap1 to use cycle
  using traversor for exportPov, correction of volumic function (slicing and subdivision)
  small modification function sliceConvexVolumes
  problem on polyhedronView
  starting import function for Moka and improving export for povray
  adding slicing function for volume and conversion hexahedrongrid to tetrahedron mesh
  add export obj, function to slice a volume with a plane, extrusion of surfaces to volumes from lionel
parents a4b94aa3 b70ccab9
......@@ -34,27 +34,31 @@ SimpleGMap3::SimpleGMap3()
normal = myMap.addAttribute<VEC3, VERTEX>("normal");
volume = myMap.addAttribute<VEC3, VOLUME>("volume");
CellMarker<EDGE> mE(myMap);
Algo::Modelisation::Primitive3D<PFP> primCat(myMap,position);
Dart d = primCat.hexaGrid_topo(3,1,1);
primCat.embedHexaGrid(2,1,1);
std::cout << "AAA"<< std::endl;
myMap.check();
std::cout << "AAA"<< std::endl;
DartMarker markOrient(myMap);
std::vector<Dart> orient;
FunctorStore fs(orient);
// DartMarker markOrient(myMap);
// std::vector<Dart> orient;
// FunctorStore fs(orient);
d = 49;
myMap.foreach_dart_of_oriented_volume(d, fs);
// d = 49;
// myMap.foreach_dart_of_oriented_volume(d, fs);
// for(std::vector<Dart>::iterator it = orient.begin() ; it != orient.end() ; ++it)
// markOrient.mark(*it);
std::cout << "AAA"<< std::endl;
// SelectorMarked sm(markOrient);
// std::cout << "AAA"<< std::endl;
// Algo::Modelisation::catmullClarkVol<PFP,PFP::TVEC3,PFP::VEC3>(myMap, position, sm);
for(std::vector<Dart>::iterator it = orient.begin() ; it != orient.end() ; ++it)
markOrient.mark(*it);
// Geom::Plane3D<PFP::REAL> pl(VEC3(0.5,0.14,0.5),VEC3(1.5,0.45,0.5),VEC3(0.5,0.15,1.5));
Geom::Plane3D<PFP::REAL> pl(VEC3(-1,-0.5,-0.5),VEC3(-1,-0.5,0.5),VEC3(1,0.5,0.5));
Algo::Modelisation::sliceConvexVolume<PFP>(myMap, position, d, pl);
SelectorMarked sm(markOrient);
std::cout << "AAA"<< std::endl;
//Algo::Modelisation::catmullClarkVol<PFP,PFP::TVEC3,PFP::VEC3>(myMap, position, sm);
myMap.check();
for(unsigned int i = position.begin() ; i != position.end() ; position.next(i))
position[i] += VEC3(2,0,0);
......@@ -77,6 +81,10 @@ SimpleGMap3::SimpleGMap3()
myMap.cutEdge(d);
position[myMap.phi1(d)] = mid;
myMap.splitFace(d,myMap.phi1(myMap.phi1(myMap.phi1(d))));
myMap.check();
for(unsigned int i = position.begin() ; i != position.end() ; position.next(i))
position[i] += VEC3(0,2,0);
......@@ -112,12 +120,13 @@ void SimpleGMap3::cb_redraw()
glDisable(GL_LIGHTING);
glLineWidth(1.0f);
Algo::Render::GL1::renderTopoGMD3<PFP>(myMap, position, true, true, true, true, 0.9f, 0.9f, 0.9f, 0.9f);
// Algo::Render::GL1::renderTopoMD3<PFP>(myMap, position, true, true, true, 0.9f, 0.9f, 0.9f);
glDisable(GL_LIGHTING);
glColor3f(1.0f, 1.0f, 1.0f);
glLineWidth(1.0f);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
Algo::Render::GL1::renderTriQuadPoly<PFP>(myMap, Algo::Render::GL1::LINE, 1.0,position, normal);
// glDisable(GL_LIGHTING);
// glColor3f(1.0f, 1.0f, 1.0f);
// glLineWidth(1.0f);
// glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
// Algo::Render::GL1::renderTriQuadPoly<PFP>(myMap, Algo::Render::GL1::LINE, 1.0,position, normal);
}
/**********************************************************************************************
......
......@@ -28,6 +28,7 @@
#include "Topology/generic/parameters.h"
#include "Topology/gmap/embeddedGMap3.h"
//#include "Topology/map/embeddedMap3.h"
#include "Geometry/vector_gen.h"
......@@ -40,6 +41,7 @@ struct PFP: public PFP_STANDARD
{
// definition of the map
typedef EmbeddedGMap3 MAP ;
// typedef EmbeddedMap3 MAP ;
};
typedef PFP::MAP MAP ;
......
......@@ -27,7 +27,7 @@
#include <iostream>
#define WITH_GMAP 1
// #define WITH_GMAP 1
#include "Topology/generic/parameters.h"
#ifdef WITH_GMAP
......
......@@ -129,15 +129,15 @@ int main(int argc, char **argv)
prim3.transform(trf);
// create a subdivided cube
Algo::Modelisation::Polyhedron<PFP> prim4(myMap, position);
prim4.cube_topo(4, 5, 6);
prim4.embedCube(50.0f,50.0f, 50.0f);
// Algo::Modelisation::Polyhedron<PFP> prim4(myMap, position);
// prim4.cube_topo(4, 5, 6);
// prim4.embedCube(50.0f,50.0f, 50.0f);
//transform
trf.identity();
Geom::rotate<float>(1.0f,1.0f,1.0f,0.4f,trf);
Geom::translate<float>(270.0f,0.0,0.0,trf);
prim4.transform(trf);
// prim4.transform(trf);
// bounding box
Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position);
......
......@@ -3,7 +3,7 @@ installer les paquets suivants:
cmake libXi-dev libXmu-dev libglew-dev libxml2-dev libboost-all-dev zlib1g-dev qt4-designer qt4-dev-tools uuid-dev
Pour compiler CGoGN:
- aller dans ThirdParty, cd build, taper "cmake ..", puis make ( avec -j x si vous avez x core sur votre machine)
- aller dans ThirdParty, cd build, taper "cmake .", puis make ( avec -j x si vous avez x core sur votre machine)
On peut fixer certaines option pour ne pas tout compiler (cf le README.TXT dans ThirdParty)
On peut aussi compiler en debug en créant un répertoir qui fini par Debug à la place de build
......
......@@ -68,6 +68,15 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type
template <typename PFP>
bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename, const FunctorSelect& good = allDarts) ;
/**
* export the map into a OBJ file
* @param the_map map to be exported
* @param filename filename of obj file
* @return true
*/
template <typename PFP>
bool exportOBJ(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good = allDarts) ;
/**
* export the map into a Trian file
* @param the_map map to be exported
......
......@@ -389,6 +389,72 @@ bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>
return true ;
}
/*
template <typename PFP>
bool exportOBJ(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good)
{
typedef typename PFP::MAP MAP;
typedef typename PFP::VEC3 VEC3;
std::ofstream out(filename, std::ios::out) ;
if (!out.good())
{
CGoGNerr << "Unable to open file " << CGoGNendl ;
return false ;
}
unsigned int nbDarts = map.getNbDarts() ;
std::vector<unsigned int> facesSize ;
std::vector<std::vector<unsigned int> > facesIdx ;
facesSize.reserve(nbDarts/3) ;
facesIdx.reserve(nbDarts/3) ;
std::map<unsigned int, unsigned int> vIndex ;
unsigned int vCpt = 0 ;
std::vector<unsigned int> vertices ;
vertices.reserve(nbDarts/6) ;
CellMarker<VERTEX> markV(map) ;
TraversorF<MAP> t(map, good) ;
for(Dart d = t.begin(); d != t.end(); d = t.next())
{
std::vector<unsigned int> fidx ;
fidx.reserve(8) ;
Traversor2FV<typename PFP::MAP> tfv(map, d) ;
for(Dart it = tfv.begin(); it != tfv.end(); it = tfv.next())
{
unsigned int vNum = map.getEmbedding(VERTEX, it) ;
if(!markV.isMarked(it))
{
markV.mark(it) ;
vIndex[vNum] = vCpt++ ;
vertices.push_back(vNum) ;
}
fidx.push_back(vIndex[vNum]+1) ;
}
facesIdx.push_back(fidx) ;
}
out << "#OBJ - Export from CGoGN" << std::endl ;
for(unsigned int i = 0; i < vertices.size(); ++i)
{
const VEC3& v = position[vertices[i]] ;
out << "v " << v[0] << " " << v[1] << " " << v[2] << std::endl ;
}
out << std::endl;
for(unsigned int i = 0; i < facesIdx.size(); ++i)
{
out << "f ";
for(unsigned int j = 0; j < facesIdx[i].size(); ++j)
out << " " << facesIdx[i][j] ;
out << std::endl ;
}
out.close() ;
return true ;
}
template <typename PFP>
bool exportPlyPTMgeneric(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename, const FunctorSelect& good)
{
......
......@@ -15,13 +15,13 @@ namespace ExportPov
{
template <typename PFP>
void exportTriangleWire(std::ofstream& out,typename PFP::VEC3& p1,typename PFP::VEC3& p2,typename PFP::VEC3& p3)
void exportTriangleWire(std::ofstream& out,typename PFP::VEC3& p1,typename PFP::VEC3& p2,typename PFP::VEC3& p3, float width)
{
out << "cylinder { <" << p1[0] << "," << p1[2] << "," << p1[1] << ">, <" << p2[0] << "," << p2[2] << "," << p2[1] << ">, 0.5 }" << std::endl;
out << "cylinder { <" << p1[0] << "," << p1[1] << "," << p1[2] << ">, <" << p2[0] << "," << p2[1] << "," << p2[2] << ">, " << width << "}" << std::endl;
out << "cylinder { <" << p1[0] << "," << p1[2] << "," << p1[1] << ">, <" << p3[0] << "," << p3[2] << "," << p3[1] << ">, 0.5 }" << std::endl;
out << "cylinder { <" << p1[0] << "," << p1[1] << "," << p1[2] << ">, <" << p3[0] << "," << p3[1] << "," << p3[2] << ">, " << width << "}" << std::endl;
out << "cylinder { <" << p3[0] << "," << p3[2] << "," << p3[1] << ">, <" << p2[0] << "," << p2[2] << "," << p2[1] << ">, 0.5 }" << std::endl;
out << "cylinder { <" << p3[0] << "," << p3[1] << "," << p3[2] << ">, <" << p2[0] << "," << p2[1] << "," << p2[2] << ">, " << width << "}" << std::endl;
}
template <typename PFP>
......@@ -39,33 +39,26 @@ void exportMeshPlain(std::ofstream& out, typename PFP::MAP& map, VertexAttribute
{
out << "#declare " << meshName << "= union {" << std::endl;
DartMarkerStore traite(map);
TraversorF<typename PFP::MAP > travF(map);
for(Dart d = map.begin() ; d!= map.end() ; map.next(d))
for(Dart d = travF.begin() ; d!= travF.end() ; travF.next(d))
{
if(good(d) && !traite.isMarked(d))
if(good(d))
{
unsigned int nb = 0;
Dart dd = d;
do
{
traite.mark(dd);
dd = map.phi1(dd);
nb++;
} while(dd != d);
unsigned int nb = map.faceDegree(d);
if(nb == 3)
Algo::ExportPov::exportTrianglePlain<PFP>(out,position[dd],position[map.phi1(dd)],position[map.phi1(map.phi1(dd))]);
Algo::ExportPov::exportTrianglePlain<PFP>(out,position[d],position[map.phi1(d)],position[map.phi1(map.phi1(d))]);
else
{
out << "polygon{ " << nb+1 << std::endl;
dd = d;
Dart dd = d;
do
{
out << "<" << position[dd][0] << "," << position[dd][2] << "," << position[dd][1] << ">," << std::endl;
out << "<" << position[dd][0] << "," << position[dd][1] << "," << position[dd][2] << ">," << std::endl;
dd = map.phi1(dd);
} while(dd!=d);
out << "<" << position[d][0] << "," << position[d][2] << "," << position[d][1] << ">" << std::endl;
out << "<" << position[d][0] << "," << position[d][1] << "," << position[d][2] << ">" << std::endl;
out << "}" << std::endl;
}
}
......@@ -177,38 +170,18 @@ void exportMeshWire(std::ofstream& out, typename PFP::MAP& map, VertexAttribute<
{
out << "#declare " << meshName << "= union {" << std::endl;
DartMarkerStore traite(map);
TraversorE<typename PFP::MAP > travE(map);
for(Dart d = map.begin() ; d!= map.end() ; map.next(d))
for(Dart d = travE.begin() ; d!= travE.end() ; d = travE.next())
{
if(good(d) && !traite.isMarked(d))
if(good(d))
{
unsigned int nb = 0;
Dart dd = d;
do
{
traite.mark(dd);
dd = map.phi1(dd);
nb++;
} while(dd != d);
Dart dd = map.phi2(d);
if(nb == 3)
Algo::ExportPov::exportTriangleWire<PFP>(out,position[dd],position[map.phi1(dd)],position[map.phi1(map.phi1(dd))]);
else
{
dd = d;
do
{
if(position[dd][0]!=position[map.phi1(dd)][0] || position[dd][1]!=position[map.phi1(dd)][1] || position[dd][2]!=position[map.phi1(dd)][2])
{
out << "cylinder{ " << std::endl;
out << "<" << position[dd][0] << "," << position[dd][2] << "," << position[dd][1] << ">," << std::endl;
out << "<" << position[map.phi1(dd)][0] << "," << position[map.phi1(dd)][2] << "," << position[map.phi1(dd)][1] << ">, 0.5" << std::endl;
out << "}" << std::endl;
}
dd = map.phi1(dd);
} while(dd != d);
}
out << "cylinder{ " << std::endl;
out << "<" << position[d][0] << "," << position[d][1] << "," << position[d][2] << ">," << std::endl;
out << "<" << position[dd][0] << "," << position[dd][1] << "," << position[dd][2] << ">," << 0.5 << std::endl;
out << "}" << std::endl;
}
}
......
......@@ -125,11 +125,11 @@ typename PFP::VEC3 vertexBorderNormal(typename PFP::MAP& map, Dart d, const Vert
CellMarker<FACE> f(map);
FunctorStore fs(faces);
map.foreach_dart_of_oriented_vertex(d,fs);
map.foreach_dart_of_vertex(d,fs);
for(std::vector<Dart>::iterator it = faces.begin() ; it != faces.end() ; ++it)
{
if(!f.isMarked(*it) && map.phi3(*it)==*it)
if(!f.isMarked(*it) && map.isBoundaryFace(*it))
{
f.mark(*it);
VEC3 n = faceNormal<PFP>(map, *it, position);
......
......@@ -79,7 +79,7 @@ typename PFP::REAL convexPolyhedronVolume(typename PFP::MAP& map, Dart d, const
for(typename std::vector<Dart>::iterator face = visitedFaces.begin(); face != visitedFaces.end(); ++face)
{
Dart e = *face ;
if(map.isFaceTriangle(e))
if(map.isCycleTriangle(e))
{
VEC3 p1 = position[e] ;
VEC3 p2 = position[map.phi1(e)] ;
......
......@@ -46,7 +46,7 @@ namespace Import
* @param filename
* @param attrNames attribute names
* @param mergeCloseVertices a boolean indicating if close vertices should be merged during import
* @return a boolean indicating if import was successfull
* @return a boolean indicating if import was successful
*/
template <typename PFP>
bool importMesh(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, bool mergeCloseVertices = false);
......@@ -57,23 +57,23 @@ bool importMesh(typename PFP::MAP& map, const std::string& filename, std::vector
* @param filename
* @param attrNames attribute names
* @param mergeCloseVertices a boolean indicating if close vertices should be merged during import
* @return a boolean indicating if import was successfull
* @return a boolean indicating if import was successful
*/
template <typename PFP>
bool importMeshV(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, bool mergeCloseVertices = false);
/**
* import a mesh and extrud it
* import a mesh and extrude it
* @param map the map in which the function imports the mesh
* @param filename
* @param attrNames attribute names
* @param mergeCloseVertices a boolean indicating if close vertices should be merged during import
* @return a boolean indicating if import was successfull
* @return a boolean indicating if import was successful
*/
template <typename PFP>
bool importMeshToExtrude(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames);
/**
/*
* import a MOKA file
* @param gmap the gmap in which the function imports the mesh
* @param filename
......@@ -82,7 +82,6 @@ bool importMeshToExtrude(typename PFP::MAP& map, const std::string& filename, st
template <typename PFP>
bool importMoka(typename PFP::MAP& gmap, const std::string& filename, std::vector<std::string>& attrNames);
/**
* import a Choupi file
* @param map
......@@ -102,15 +101,13 @@ template <typename PFP>
bool importNodeWithELERegions(typename PFP::MAP& map, const std::string& filenameNode, const std::string& filenameELE, std::vector<std::string>& attrNames);
template <typename PFP>
bool importTet(typename PFP::MAP& the_map, const std::string& filename, std::vector<std::string>& attrNames, float scaleFactor = 1.0f);
bool importTet(typename PFP::MAP& the_map, const std::string& filename, std::vector<std::string>& attrNames, float scaleFactor = 1.0f, bool invertTetra=false);
template <typename PFP>
bool importTs(typename PFP::MAP& the_map, const std::string& filename, std::vector<std::string>& attrNames, float scaleFactor = 1.0f);
bool importMoka(typename PFP::MAP& the_gmap, const std::string& filename, std::vector<std::string>& attrNames);
//template <typename PFP>
//bool importObjWithTex(typename PFP::MAP& map, const std::string& filename);
//
template <typename PFP>
bool importTs(typename PFP::MAP& the_map, const std::string& filename, std::vector<std::string>& attrNames, float scaleFactor = 1.0f);
} // namespace Import
......@@ -119,10 +116,10 @@ bool importTs(typename PFP::MAP& the_map, const std::string& filename, std::vect
} // namespace CGoGN
#include "Algo/Import/importMesh.hpp"
#include "Algo/Import/importMoka.hpp"
//#include "Algo/Import/importObjTex.hpp"
#include "Algo/Import/importObjEle.hpp"
#include "Algo/Import/importTet.hpp"
#include "Algo/Import/importMoka.hpp"
#include "Algo/Import/importTs.hpp"
#include "Algo/Import/importNodeEle.hpp"
......
......@@ -30,7 +30,6 @@
#include <vector>
#include <string>
//#include "Topology/generic/attributeHandler.h"
#include "Geometry/vector_gen.h"
#include "Geometry/matrix.h"
......@@ -57,7 +56,7 @@ namespace Import
namespace ImportVolumique
{
enum ImportType { UNKNOWNVOLUME , TET, OFF, TS, NODE};
enum ImportType { UNKNOWNVOLUME , TET, OFF, TS, MOKA, NODE};
}
......
......@@ -40,9 +40,15 @@ ImportVolumique::ImportType MeshTablesVolume<PFP>::getFileType(const std::string
if ((filename.rfind(".node")!=std::string::npos) || (filename.rfind(".NODE")!=std::string::npos))
return ImportVolumique::NODE;
if ((filename.rfind(".off")!=std::string::npos) || (filename.rfind(".OFF")!=std::string::npos))
return ImportVolumique::OFF;
if ((filename.rfind(".ts")!=std::string::npos) || (filename.rfind(".TS")!=std::string::npos))
return ImportVolumique::TS;
if ((filename.rfind(".moka")!=std::string::npos) || (filename.rfind(".MOKA")!=std::string::npos))
return ImportVolumique::MOKA;
return ImportVolumique::UNKNOWNVOLUME;
}
......@@ -60,6 +66,9 @@ bool MeshTablesVolume<PFP>::importMesh(const std::string& filename, std::vector<
break;
case ImportVolumique::TS:
break;
// case ImportVolumique::MOKA:
// return importMoka(filename,attrNames);
// break;
default:
CGoGNerr << "Not yet supported" << CGoGNendl;
break;
......@@ -178,7 +187,6 @@ bool MeshTablesVolume<PFP>::importTet(const std::string& filename, std::vector<s
return true;
}
} // namespace Import
} // namespace Algo
......
......@@ -236,6 +236,114 @@ bool importMeshSToV(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts, float d
return true ;
}
template <typename PFP>
bool importMeshSurfToVol(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts, float dist)
{
VertexAutoAttribute< NoMathIONameAttribute< std::vector<Dart> > > vecDartsPerVertex(map);
unsigned nbf = mts.getNbFaces();
int index = 0;
// buffer for tempo faces (used to remove degenerated edges)
std::vector<unsigned int> edgesBuffer;
edgesBuffer.reserve(16);
DartMarkerNoUnmark m(map) ;
VertexAttribute<typename PFP::VEC3> position = map.template getAttribute<typename PFP::VEC3, VERTEX>("position");
std::vector<unsigned int > backEdgesBuffer(mts.getNbVertices(), EMBNULL);
// for each face of table -> create a prism
for(unsigned int i = 0; i < nbf; ++i)
{
// store face in buffer, removing degenerated edges
unsigned int nbe = mts.getNbEdgesFace(i);
edgesBuffer.clear();
unsigned int prec = EMBNULL;
for (unsigned int j = 0; j < nbe; ++j)
{
unsigned int em = mts.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 = Algo::Modelisation::createPrism<PFP>(map, nbe);
//Embed the base faces
for (unsigned int j = 0; j < nbe; ++j)
{
unsigned int em = edgesBuffer[j]; // get embedding
if(backEdgesBuffer[em] == EMBNULL)
{
unsigned int emn = map.template newCell<VERTEX>();
map.template copyCell<VERTEX>(emn, em);
backEdgesBuffer[em] = emn;
position[emn] += typename PFP::VEC3(0,0,dist);
}
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, em);
//foreach_dart_of_orbit_in_parent<typename PFP::MAP>(&map, VERTEX, d, fsetemb) ;
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
//Embed the other base face
Dart d2 = map.phi1(map.phi1(map.phi2(d)));
unsigned int em2 = backEdgesBuffer[em];
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb2(map, em2);
//foreach_dart_of_orbit_in_parent<typename PFP::MAP>(&map, VERTEX, d2, fsetemb2) ;
map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d2, fsetemb2);
m.mark(d) ; // mark on the fly to unmark on second loop
vecDartsPerVertex[em].push_back(d); // store incident darts for fast adjacency reconstruction
d = map.phi_1(d);
}
}
}
// reconstruct neighbourhood
unsigned int nbBoundaryEdges = 0;
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.template getEmbedding<VERTEX>(d);
Dart good_dart = NIL;
for (typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end() && good_dart == NIL; ++it)
{
if (map.template getEmbedding<VERTEX>(map.phi1(*it)) == embd)
good_dart = *it;
}
if (good_dart != NIL)
{
map.sewVolumes(map.phi2(d), map.phi2(good_dart), false);
m.unmarkOrbit<EDGE>(d);
}
else
{
m.unmark(d);
++nbBoundaryEdges;
}
}
}
map.closeMap();
return true ;
}
template <typename PFP>
bool importMesh(typename PFP::MAP& map, MeshTablesVolume<PFP>& mtv)
{
......@@ -310,13 +418,13 @@ bool importMeshV(typename PFP::MAP& map, const std::string& filename, std::vecto
template <typename PFP>
bool importMeshToExtrude(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames)
{