Commit 9b56e839 authored by Sylvain Thery's avatar Sylvain Thery

EMBNULL ....

parent 54ec8819
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include "Topology/generic/dartmarker.h" #include "Topology/generic/dartmarker.h"
#include <vector> #include <vector>
#include "Algo/Modelisation/boundEmb.h"
namespace CGoGN namespace CGoGN
{ {
...@@ -117,7 +119,9 @@ void MarchingCube<DataType, Windowing, PFP>::deleteMesh() ...@@ -117,7 +119,9 @@ void MarchingCube<DataType, Windowing, PFP>::deleteMesh()
template< typename DataType, template < typename D2 > class Windowing, typename PFP > template< typename DataType, template < typename D2 > class Windowing, typename PFP >
Dart MarchingCube<DataType, Windowing, PFP>::createTriEmb(unsigned int e1, unsigned int e2, unsigned int e3) Dart MarchingCube<DataType, Windowing, PFP>::createTriEmb(unsigned int e1, unsigned int e2, unsigned int e3)
{ {
L_DART d = m_map->newFace(3,false); // L_DART d = m_map->newFace(3,false);
L_DART d = Modelisation::newFaceEmb<PFP>(*m_map,3);
FunctorSetEmb<GenericMap, VERTEX> fsetemb(*m_map, e1); FunctorSetEmb<GenericMap, VERTEX> fsetemb(*m_map, e1);
m_map->template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb); m_map->template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb);
...@@ -922,7 +926,9 @@ void MarchingCube<DataType, Windowing, PFP>::setNeighbourSimple(L_DART d1, L_DAR ...@@ -922,7 +926,9 @@ void MarchingCube<DataType, Windowing, PFP>::setNeighbourSimple(L_DART d1, L_DAR
{ {
if (m_map->phi2(d1) != d2) if (m_map->phi2(d1) != d2)
{ {
m_map->sewFaces(d1,d2,false); // m_map->sewFaces(d1,d2,false);
Modelisation::sewFaceEmb<PFP>(*m_map,d1,d2);
#ifdef MC_WIDTH_EDGE_Z_EMBEDED #ifdef MC_WIDTH_EDGE_Z_EMBEDED
if (m_zslice!=NULL) if (m_zslice!=NULL)
{ {
...@@ -939,7 +945,9 @@ void MarchingCube<DataType, Windowing, PFP>::setNeighbour(L_DART d1, L_DART d2) ...@@ -939,7 +945,9 @@ void MarchingCube<DataType, Windowing, PFP>::setNeighbour(L_DART d1, L_DART d2)
{ {
if (m_map->phi2(d1) != d2) if (m_map->phi2(d1) != d2)
{ {
m_map->sewFaces(d1,d2,false); // m_map->sewFaces(d1,d2,false);
Modelisation::sewFaceEmb<PFP>(*m_map,d1,d2);
#ifdef MC_WIDTH_EDGE_Z_EMBEDED #ifdef MC_WIDTH_EDGE_Z_EMBEDED
if (m_zslice!=NULL) if (m_zslice!=NULL)
{ {
......
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifndef _BOUND_EMBD_H
#define _BOUND_EMBD_H
namespace CGoGN
{
namespace Algo
{
namespace Modelisation
{
template <typename PFP>
void sewFaceEmb(typename PFP::MAP& map, Dart d, Dart e)
{
map.sewFaces(d, e, false) ;
if (map.template isOrbitEmbedded<EDGE>())
map.template initOrbitEmbeddingNewCell<EDGE>(d) ;
}
template <typename PFP>
Dart newFaceEmb(typename PFP::MAP& map, unsigned int n)
{
Dart d = map.newFace(n,false);
if (map.template isOrbitEmbedded<FACE>())
map.template initOrbitEmbeddingNewCell<FACE>(d) ;
return d;
}
}
}
}
#endif
...@@ -44,6 +44,12 @@ namespace Modelisation ...@@ -44,6 +44,12 @@ namespace Modelisation
enum { NONE, GRID, CUBE, CYLINDER, CONE, SPHERE, TORE, COMPOSED }; enum { NONE, GRID, CUBE, CYLINDER, CONE, SPHERE, TORE, COMPOSED };
//template <typename PFP>
//void sewFaceEmb(typename PFP::MAP& map, Dart d, Dart e);
//
//template <typename PFP>
//Dart newFaceEmb(typename PFP::MAP& map, unsigned int n);
/** /**
* sudivide the all quads of a CC into 2 triangles * sudivide the all quads of a CC into 2 triangles
*/ */
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* Contact information: cgogn@unistra.fr * * Contact information: cgogn@unistra.fr *
* * * *
*******************************************************************************/ *******************************************************************************/
#include "Algo/Modelisation/boundEmb.h"
namespace CGoGN namespace CGoGN
{ {
...@@ -44,7 +45,7 @@ Dart createPyramid(typename PFP::MAP& map, unsigned int n) ...@@ -44,7 +45,7 @@ Dart createPyramid(typename PFP::MAP& map, unsigned int n)
// creation of triangles around circunference and storing vertices // creation of triangles around circunference and storing vertices
for (unsigned int i = 0; i < n; ++i) for (unsigned int i = 0; i < n; ++i)
{ {
Dart d = map.newFace(3, false); Dart d = newFaceEmb<PFP>(map, 3);
m_tableVertDarts.push_back(d); m_tableVertDarts.push_back(d);
} }
...@@ -55,17 +56,17 @@ Dart createPyramid(typename PFP::MAP& map, unsigned int n) ...@@ -55,17 +56,17 @@ Dart createPyramid(typename PFP::MAP& map, unsigned int n)
d = map.phi_1(d); d = map.phi_1(d);
Dart e = m_tableVertDarts[i+1]; Dart e = m_tableVertDarts[i+1];
e = map.phi1(e); e = map.phi1(e);
map.sewFaces(d, e, false); sewFaceEmb<PFP>(map, d, e);
} }
//sewing the last with the first //sewing the last with the first
map.sewFaces(map.phi1(m_tableVertDarts[0]), map.phi_1(m_tableVertDarts[n-1]), false); sewFaceEmb<PFP>(map, map.phi1(m_tableVertDarts[0]), map.phi_1(m_tableVertDarts[n-1]));
//sewing the bottom face //sewing the bottom face
Dart d1 = map.newFace(n, false); Dart d1 = newFaceEmb<PFP>(map, n);
dres = d1; dres = d1;
for(unsigned int i = 0; i < n ; ++i) for(unsigned int i = 0; i < n ; ++i)
{ {
map.sewFaces(m_tableVertDarts[i], d1, false); sewFaceEmb<PFP>(map, m_tableVertDarts[i], d1);
d1 = map.phi1(d1); d1 = map.phi1(d1);
} }
...@@ -87,7 +88,7 @@ Dart createPrism(typename PFP::MAP& map, unsigned int n) ...@@ -87,7 +88,7 @@ Dart createPrism(typename PFP::MAP& map, unsigned int n)
// creation of quads around circunference and storing vertices // creation of quads around circunference and storing vertices
for (unsigned int i = 0; i < n; ++i) for (unsigned int i = 0; i < n; ++i)
{ {
Dart d = map.newFace(4, false); Dart d = newFaceEmb<PFP>(map, 4);
m_tableVertDarts.push_back(d); m_tableVertDarts.push_back(d);
} }
...@@ -104,19 +105,19 @@ Dart createPrism(typename PFP::MAP& map, unsigned int n) ...@@ -104,19 +105,19 @@ Dart createPrism(typename PFP::MAP& map, unsigned int n)
d = map.phi_1(d); d = map.phi_1(d);
Dart e = m_tableVertDarts[i+1]; Dart e = m_tableVertDarts[i+1];
e = map.phi1(e); e = map.phi1(e);
map.sewFaces(d, e, false); sewFaceEmb<PFP>(map, d, e);
} }
//sewing the last with the first //sewing the last with the first
map.sewFaces(map.phi1(m_tableVertDarts[0]), map.phi_1(m_tableVertDarts[n-1]), false); sewFaceEmb<PFP>(map, map.phi1(m_tableVertDarts[0]), map.phi_1(m_tableVertDarts[n-1]));
//sewing the top & bottom faces //sewing the top & bottom faces
Dart d1 = map.newFace(n, false); Dart d1 = newFaceEmb<PFP>(map, n);
Dart d2 = map.newFace(n, false); Dart d2 = newFaceEmb<PFP>(map, n);
dres = d1; dres = d1;
for(unsigned int i = 0; i < n ; ++i) for(unsigned int i = 0; i < n ; ++i)
{ {
map.sewFaces(m_tableVertDarts[i], d1, false); sewFaceEmb<PFP>(map, m_tableVertDarts[i], d1);
map.sewFaces(m_tableVertDarts[n+i], d2, false); sewFaceEmb<PFP>(map, m_tableVertDarts[n+i], d2);
d1 = map.phi1(d1); d1 = map.phi1(d1);
d2 = map.phi_1(d2); d2 = map.phi_1(d2);
} }
...@@ -343,7 +344,7 @@ Dart Polyhedron<PFP>::grid_topo(unsigned int x, unsigned int y) ...@@ -343,7 +344,7 @@ Dart Polyhedron<PFP>::grid_topo(unsigned int x, unsigned int y)
{ {
for (unsigned int j = 1; j <= x; ++j) for (unsigned int j = 1; j <= x; ++j)
{ {
Dart d = m_map.newFace(4, false); Dart d = newFaceEmb<PFP>(m_map, 4);
m_tableVertDarts.push_back(d); m_tableVertDarts.push_back(d);
if (j == x) if (j == x)
m_tableVertDarts.push_back(m_map.phi1(d)); m_tableVertDarts.push_back(m_map.phi1(d));
...@@ -368,7 +369,7 @@ Dart Polyhedron<PFP>::grid_topo(unsigned int x, unsigned int y) ...@@ -368,7 +369,7 @@ Dart Polyhedron<PFP>::grid_topo(unsigned int x, unsigned int y)
Dart d = m_tableVertDarts[pos]; Dart d = m_tableVertDarts[pos];
Dart e = m_tableVertDarts[pos-(x+1)]; Dart e = m_tableVertDarts[pos-(x+1)];
e = m_map.phi1(m_map.phi1(e)); e = m_map.phi1(m_map.phi1(e));
m_map.sewFaces(d, e, false); sewFaceEmb<PFP>(m_map, d, e);
} }
if (j > 0) // sew with preceeding column if (j > 0) // sew with preceeding column
{ {
...@@ -377,7 +378,7 @@ Dart Polyhedron<PFP>::grid_topo(unsigned int x, unsigned int y) ...@@ -377,7 +378,7 @@ Dart Polyhedron<PFP>::grid_topo(unsigned int x, unsigned int y)
d = m_map.phi_1(d); d = m_map.phi_1(d);
Dart e = m_tableVertDarts[pos-1]; Dart e = m_tableVertDarts[pos-1];
e = m_map.phi1(e); e = m_map.phi1(e);
m_map.sewFaces(d, e, false); sewFaceEmb<PFP>(m_map, d, e);
} }
} }
} }
...@@ -414,7 +415,7 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo ...@@ -414,7 +415,7 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo
{ {
for (unsigned int j = 0; j < n; ++j) for (unsigned int j = 0; j < n; ++j)
{ {
Dart d = m_map.newFace(4, false); Dart d = newFaceEmb<PFP>(m_map, 4);
m_tableVertDarts.push_back(d); m_tableVertDarts.push_back(d);
} }
} }
...@@ -434,7 +435,7 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo ...@@ -434,7 +435,7 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo
Dart d = m_tableVertDarts[pos]; Dart d = m_tableVertDarts[pos];
Dart e = m_tableVertDarts[pos-n]; Dart e = m_tableVertDarts[pos-n];
e = m_map.phi1(m_map.phi1(e)); e = m_map.phi1(m_map.phi1(e));
m_map.sewFaces(d, e, false); sewFaceEmb<PFP>(m_map, d, e);
} }
if (j > 0) // sew with preceeding column if (j > 0) // sew with preceeding column
{ {
...@@ -443,7 +444,7 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo ...@@ -443,7 +444,7 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo
d = m_map.phi_1(d); d = m_map.phi_1(d);
Dart e = m_tableVertDarts[pos-1]; Dart e = m_tableVertDarts[pos-1];
e = m_map.phi1(e); e = m_map.phi1(e);
m_map.sewFaces(d, e, false); sewFaceEmb<PFP>(m_map, d, e);
} }
else else
{ {
...@@ -452,7 +453,7 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo ...@@ -452,7 +453,7 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo
d = m_map.phi_1(d); d = m_map.phi_1(d);
Dart e = m_tableVertDarts[pos+(n-1)]; Dart e = m_tableVertDarts[pos+(n-1)];
e = m_map.phi1(e); e = m_map.phi1(e);
m_map.sewFaces(d, e, false); sewFaceEmb<PFP>(m_map, d, e);
} }
} }
} }
...@@ -515,14 +516,14 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo ...@@ -515,14 +516,14 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo
// // close bottom with one quad not three triangles // // close bottom with one quad not three triangles
// if (bottom_closed) // if (bottom_closed)
// { // {
// Dart t= m_map.newFace(4,false); // Dart t= newFaceEmb(m_map, 4);
// m_map.sewFaces(m_tableVertDarts[0],t); // sewFaceEmb(m_map, m_tableVertDarts[0],t);
// t=m_map.phi_1(t); // t=m_map.phi_1(t);
// m_map.sewFaces(m_tableVertDarts[1],t); // sewFaceEmb(m_map, m_tableVertDarts[1],t);
// t=m_map.phi_1(t); // t=m_map.phi_1(t);
// m_map.sewFaces(m_tableVertDarts[2],t); // sewFaceEmb(m_map, m_tableVertDarts[2],t);
// t=m_map.phi_1(t); // t=m_map.phi_1(t);
// m_map.sewFaces(m_tableVertDarts[3],t); // sewFaceEmb(m_map, m_tableVertDarts[3],t);
// } // }
// return d; // return d;
// } // }
...@@ -534,12 +535,12 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo ...@@ -534,12 +535,12 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo
// // close bottom with one triangle not three // // close bottom with one triangle not three
// if (bottom_closed) // if (bottom_closed)
// { // {
// Dart t= m_map.newFace(3,false); // Dart t= newFaceEmb(m_map, 3);
// m_map.sewFaces(d,t); // sewFaceEmb(m_map, d,t);
// d=nextDV(d); t=m_map.phi_1(t); // d=nextDV(d); t=m_map.phi_1(t);
// m_map.sewFaces(d,t); // sewFaceEmb(m_map, d,t);
// d=nextDV(d); t=m_map.phi_1(t); // d=nextDV(d); t=m_map.phi_1(t);
// m_map.sewFaces(d,t); // sewFaceEmb(m_map, d,t);
// } // }
// return d; // return d;
// } // }
...@@ -571,7 +572,7 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo ...@@ -571,7 +572,7 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo
// m_tableVertDarts.push_back(m_map.phi_1(dd)); // m_tableVertDarts.push_back(m_map.phi_1(dd));
// for (int i=0;i<n;++i) // for (int i=0;i<n;++i)
// { // {
// m_map.sewFaces(d,dd); // sewFaceEmb(map, d,dd);
// d=nextDV(d); // d=nextDV(d);
// dd=precDV(dd); // dd=precDV(dd);
// } // }
...@@ -597,14 +598,14 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo ...@@ -597,14 +598,14 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo
// //
// if (bottom_closed) // if (bottom_closed)
// { // {
// Dart t= m_map.newFace(4,false); // Dart t= newFaceEmb(m_map, 4);
// m_map.sewFaces(m_tableVertDarts[0],t); // sewFaceEmb(map, m_tableVertDarts[0],t);
// t=m_map.phi_1(t); // t=m_map.phi_1(t);
// m_map.sewFaces(m_tableVertDarts[1],t); // sewFaceEmb(map, m_tableVertDarts[1],t);
// t=m_map.phi_1(t); // t=m_map.phi_1(t);
// m_map.sewFaces(m_tableVertDarts[2],t); // sewFaceEmb(map, m_tableVertDarts[2],t);
// t=m_map.phi_1(t); // t=m_map.phi_1(t);
// m_map.sewFaces(m_tableVertDarts[3],t); // sewFaceEmb(map, m_tableVertDarts[3],t);
// } // }
// m_dart=dd; // m_dart=dd;
// return dd; // return dd;
...@@ -624,12 +625,12 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo ...@@ -624,12 +625,12 @@ Dart Polyhedron<PFP>::cylinder_topo(unsigned int n, unsigned int z, bool top_clo
// //
// if (bottom_closed) // if (bottom_closed)
// { // {
// Dart t= m_map.newFace(3,false); // Dart t= newFaceEmb(m_map, 3);
// m_map.sewFaces(m_tableVertDarts[0],t); // sewFaceEmb(map, m_tableVertDarts[0],t);
// t=m_map.phi_1(t); // t=m_map.phi_1(t);
// m_map.sewFaces(m_tableVertDarts[1],t); // sewFaceEmb(map, m_tableVertDarts[1],t);
// t=m_map.phi_1(t); // t=m_map.phi_1(t);
// m_map.sewFaces(m_tableVertDarts[2],t); // sewFaceEmb(map, m_tableVertDarts[2],t);
// } // }
// m_dart=dd; // m_dart=dd;
// return dd; // return dd;
...@@ -662,27 +663,27 @@ Dart Polyhedron<PFP>::cube_topo(unsigned int x, unsigned int y, unsigned int z) ...@@ -662,27 +663,27 @@ Dart Polyhedron<PFP>::cube_topo(unsigned int x, unsigned int y, unsigned int z)
{ {
Dart d = m_map.phi_1(m_tableVertDarts[index_side++]); Dart d = m_map.phi_1(m_tableVertDarts[index_side++]);
Dart e = tableTop[i]; Dart e = tableTop[i];
m_map.sewFaces(d, e, false); sewFaceEmb(m_map, d, e);
} }
for(unsigned int i = 0; i < y; ++i) for(unsigned int i = 0; i < y; ++i)
{ {
Dart d = m_map.phi_1(m_tableVertDarts[index_side++]); Dart d = m_map.phi_1(m_tableVertDarts[index_side++]);
Dart e = tableTop[x+i*(x+1)]; Dart e = tableTop[x+i*(x+1)];
m_map.sewFaces(d, e, false); sewFaceEmb(m_map, d, e);
} }
for(unsigned int i = 0; i < x; ++i) for(unsigned int i = 0; i < x; ++i)
{ {
Dart d = m_map.phi_1(m_tableVertDarts[index_side++]); Dart d = m_map.phi_1(m_tableVertDarts[index_side++]);
Dart e = tableTop[(x+1)*(y+1)-2 - i]; Dart e = tableTop[(x+1)*(y+1)-2 - i];
e = m_map.phi_1(e); e = m_map.phi_1(e);
m_map.sewFaces(d, e, false); sewFaceEmb(m_map, d, e);
} }
for(unsigned int i = 0; i < y; ++i) for(unsigned int i = 0; i < y; ++i)
{ {
Dart d = m_map.phi_1(m_tableVertDarts[index_side++]); Dart d = m_map.phi_1(m_tableVertDarts[index_side++]);
Dart e = tableTop[(y-1-i)*(x+1)]; Dart e = tableTop[(y-1-i)*(x+1)];
e = m_map.phi_1(e); e = m_map.phi_1(e);
m_map.sewFaces(d, e, false); sewFaceEmb(m_map, d, e);
} }
// the bottom // the bottom
...@@ -695,27 +696,27 @@ Dart Polyhedron<PFP>::cube_topo(unsigned int x, unsigned int y, unsigned int z) ...@@ -695,27 +696,27 @@ Dart Polyhedron<PFP>::cube_topo(unsigned int x, unsigned int y, unsigned int z)
{ {
Dart d = m_tableVertDarts[(index_side--)%(2*(x+y))]; Dart d = m_tableVertDarts[(index_side--)%(2*(x+y))];
Dart e = tableBottom[i]; Dart e = tableBottom[i];
m_map.sewFaces(d, e, false); sewFaceEmb(m_map, d, e);
} }
for(unsigned int i = 0; i < y; ++i) for(unsigned int i = 0; i < y; ++i)
{ {
Dart d = m_tableVertDarts[(index_side--)%(2*(x+y))]; Dart d = m_tableVertDarts[(index_side--)%(2*(x+y))];
Dart e = tableBottom[x+i*(x+1)]; Dart e = tableBottom[x+i*(x+1)];
m_map.sewFaces(d, e, false); sewFaceEmb(m_map, d, e);
} }
for(unsigned int i = 0; i < x; ++i) for(unsigned int i = 0; i < x; ++i)
{ {
Dart d = m_tableVertDarts[(index_side--)%(2*(x+y))]; Dart d = m_tableVertDarts[(index_side--)%(2*(x+y))];
Dart e = tableBottom[(x+1)*(y+1)-2 - i]; Dart e = tableBottom[(x+1)*(y+1)-2 - i];
e = m_map.phi_1(e); e = m_map.phi_1(e);
m_map.sewFaces(d, e, false); sewFaceEmb(m_map, d, e);
} }
for(unsigned int i = 0; i < y; ++i) for(unsigned int i = 0; i < y; ++i)
{ {
Dart d = m_tableVertDarts[(index_side--)%(2*(x+y))]; Dart d = m_tableVertDarts[(index_side--)%(2*(x+y))];
Dart e = tableBottom[(y-1-i)*(x+1)]; Dart e = tableBottom[(y-1-i)*(x+1)];
e = m_map.phi_1(e); e = m_map.phi_1(e);
m_map.sewFaces(d, e, false); sewFaceEmb(m_map, d, e);
} }
// and add new vertex in m_tableVertDarts // and add new vertex in m_tableVertDarts
...@@ -752,7 +753,7 @@ Dart Polyhedron<PFP>::tore_topo(unsigned int m, unsigned int n) ...@@ -752,7 +753,7 @@ Dart Polyhedron<PFP>::tore_topo(unsigned int m, unsigned int n)
Dart d = m_tableVertDarts[i]; Dart d = m_tableVertDarts[i];
Dart e = m_tableVertDarts[(m*n)+i]; Dart e = m_tableVertDarts[(m*n)+i];
e = m_map.phi_1(e); e = m_map.phi_1(e);
m_map.sewFaces(d, e); sewFaceEmb<PFP>(m_map, d, e);
} }
// remove the last n vertex darts that are no more necessary (sewed with n first) // remove the last n vertex darts that are no more necessary (sewed with n first)
...@@ -1196,10 +1197,10 @@ void Polyhedron<PFP>::embedHelicoid(float radius_min, float radius_max, float ma ...@@ -1196,10 +1197,10 @@ void Polyhedron<PFP>::embedHelicoid(float radius_min, float radius_max, float ma
// for(int i=1;i<n;++i) // for(int i=1;i<n;++i)
// { // {
// Dart f = the_map.newFace(3,false); // Dart f = the_map.newFace(3,false);
// the_map.sewFaces(the_map.phi_1(f),e); // the_sewFaceEmb(map, the_map.phi_1(f),e);
// e = the_map.phi1(f); // e = the_map.phi1(f);
// } // }
// the_map.sewFaces(the_map.phi_1(d),e); // the_sewFaceEmb(map, the_map.phi_1(d),e);
// return d; // return d;
// } // }
......
...@@ -72,27 +72,27 @@ Dart EmbeddedMap2::newFace(unsigned int nbEdges, bool withBoundary) ...@@ -72,27 +72,27 @@ Dart EmbeddedMap2::newFace(unsigned int nbEdges, bool withBoundary)
initOrbitEmbeddingNewCell<FACE>(phi2(d)) ; initOrbitEmbeddingNewCell<FACE>(phi2(d)) ;
} }
} }
else // else
{ // {
if (isOrbitEmbedded<VERTEX>()) // if (isOrbitEmbedded<VERTEX>())
{ // {
/* ///*
Traversor2FV<EmbeddedMap2> t(*this, d); // Traversor2FV<EmbeddedMap2> t(*this, d);
for(Dart it = t.begin(); it != t.end(); it = t.next()) // for(Dart it = t.begin(); it != t.end(); it = t.next())
initOrbitEmbeddingNewCell<VERTEX>(it) ; // initOrbitEmbeddingNewCell<VERTEX>(it) ;
*/ //*/
Dart e = d; // Dart e = d;
do // do
{ // {
initDartEmbedding<VERTEX>(e,newCell<VERTEX>()); // initDartEmbedding<VERTEX>(e,newCell<VERTEX>());
e = this->phi1(e); // e = this->phi1(e);