Commit a4ca9f84 authored by Sylvain Thery's avatar Sylvain Thery

Merge branch 'master' of cgogn:~jund/CGoGN

parents d68c5b28 d2c82ad7
...@@ -15,7 +15,6 @@ IF (FORCE_MR EQUAL 1) ...@@ -15,7 +15,6 @@ IF (FORCE_MR EQUAL 1)
add_definitions(-DCGoGN_FORCE_MR=1) add_definitions(-DCGoGN_FORCE_MR=1)
ENDIF (FORCE_MR EQUAL 1) ENDIF (FORCE_MR EQUAL 1)
# for CGoGN in one lib on not # for CGoGN in one lib on not
file(STRINGS ${CGoGN_ROOT_DIR}/include/cgogn_onelib.h ONELIB_STR) file(STRINGS ${CGoGN_ROOT_DIR}/include/cgogn_onelib.h ONELIB_STR)
IF (ONELIB_STR EQUAL 1) IF (ONELIB_STR EQUAL 1)
...@@ -26,28 +25,22 @@ ELSE (ONELIB_STR EQUAL 1) ...@@ -26,28 +25,22 @@ ELSE (ONELIB_STR EQUAL 1)
SET(CGoGN_LIBS_R topology algo container utils) SET(CGoGN_LIBS_R topology algo container utils)
ENDIF (ONELIB_STR EQUAL 1) ENDIF (ONELIB_STR EQUAL 1)
IF(WIN32) IF(WIN32)
set(CMAKE_PREFIX_PATH ${CGoGN_ROOT_DIR}/windows_dependencies CACHE STRING "path to dependencies") set(CMAKE_PREFIX_PATH ${CGoGN_ROOT_DIR}/windows_dependencies CACHE STRING "path to dependencies")
ENDIF(WIN32) ENDIF(WIN32)
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
find_package(Boost COMPONENTS regex thread system REQUIRED) find_package(Boost COMPONENTS regex thread system REQUIRED)
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
find_package(LibXml2 REQUIRED) find_package(LibXml2 REQUIRED)
find_package(GLEW REQUIRED) find_package(GLEW REQUIRED)
IF (DEFINED ASSERTON) IF (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=${ASSERTON}) add_definitions(-DCGOGN_ASSERT_BOOL=${ASSERTON})
ELSE (DEFINED ASSERTON) ELSE (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=false) add_definitions(-DCGOGN_ASSERT_BOOL=false)
ENDIF (DEFINED ASSERTON) ENDIF (DEFINED ASSERTON)
add_definitions(-DSHADERPATH="${CGoGN_ROOT_DIR}/lib/Shaders/") add_definitions(-DSHADERPATH="${CGoGN_ROOT_DIR}/lib/Shaders/")
# define includes of external libs # define includes of external libs
...@@ -98,7 +91,6 @@ IF (WITH_NUMERICAL) ...@@ -98,7 +91,6 @@ IF (WITH_NUMERICAL)
SET (COMMON_LIBS ${COMMON_LIBS} numerical lapack blas f2c) SET (COMMON_LIBS ${COMMON_LIBS} numerical lapack blas f2c)
ENDIF (WITH_NUMERICAL) ENDIF (WITH_NUMERICAL)
# qq definition specifiques pour mac # qq definition specifiques pour mac
IF(APPLE) IF(APPLE)
# attention a changer pour chercher la bonne version automatiquement # attention a changer pour chercher la bonne version automatiquement
...@@ -124,6 +116,3 @@ IF(WIN32) ...@@ -124,6 +116,3 @@ IF(WIN32)
ELSE (WIN32) ELSE (WIN32)
link_directories( ${CGoGN_ROOT_DIR}/lib/Debug ${CGoGN_ROOT_DIR}/lib/Release) link_directories( ${CGoGN_ROOT_DIR}/lib/Debug ${CGoGN_ROOT_DIR}/lib/Release)
ENDIF (WIN32) ENDIF (WIN32)
...@@ -38,6 +38,9 @@ namespace Algo ...@@ -38,6 +38,9 @@ namespace Algo
namespace BooleanOperator namespace BooleanOperator
{ {
template <typename PFP>
bool isBetween(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& positions, Dart d, Dart e, Dart f) ;
template <typename PFP> template <typename PFP>
void mergeVertex(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& positions, Dart d, Dart e); void mergeVertex(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& positions, Dart d, Dart e);
......
...@@ -31,42 +31,57 @@ namespace Algo ...@@ -31,42 +31,57 @@ namespace Algo
namespace BooleanOperator namespace BooleanOperator
{ {
template <typename PFP>
bool isBetween(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& positions, Dart d, Dart e, Dart f)
{
return CGoGN::Geom::isBetween(positions[map.phi1(d)]-positions[d],
positions[map.phi1(e)]-positions[e],
positions[map.phi1(f)]-positions[f]);
}
template <typename PFP> template <typename PFP>
void mergeVertex(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& positions, Dart d, Dart e) void mergeVertex(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& positions, Dart d, Dart e)
{ {
assert(Geom::arePointsEquals(positions[d],positions[e]) && !map.sameVertex(d,e)); assert(Geom::arePointsEquals(positions[d],positions[e]) && !map.sameVertex(d,e));
Dart dd; // d1 traverses the vertex of d (following the alpha1 permutation)
do // y is a temporay buffer to stop the loop
{ Dart d1=d;
dd = map.phi2_1(d); // e1 traverses the vertex of e (following the alpha1 permutation)
map.removeEdgeFromVertex(dd); Dart e1=e;
Dart ee = e; bool notempty = true;
do do {
{ if (map.phi2_1(e1) == e1) notempty = false;
if(Geom::testOrientation2D(positions[map.phi1(dd)],positions[ee],positions[map.phi1(ee)])!=Geom::RIGHT // detach z from its vertex
&& Geom::testOrientation2D(positions[map.phi1(dd)],positions[ee],positions[map.phi1(map.phi2_1(ee))])==Geom::RIGHT) map.removeEdgeFromVertex(e1);
{ // Searchs the dart of the vertex of x where tz may be inserted
break; Dart nd1 = d1;
} do {
ee = map.phi2_1(ee); if (CGoGN::Algo::BooleanOperator::isBetween<PFP>(map,positions,e1,d1,map.phi2_1(d1))) break;
} while(ee != e); d1 = map.phi2_1(d1);
map.insertEdgeInVertex(ee,dd); } while (d1 != nd1);
map.insertEdgeInVertex(d1,e1);
d1 = e1;
} while (notempty);
} while(dd!=d); // 0-embed z on the vertex of x without copy of the vertex
// positions[d] = ;
} }
template <typename PFP> template <typename PFP>
void mergeVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& positions) void mergeVertices(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& positions)
{ {
// TODO optimiser en triant les sommets
for(Dart d = map.begin() ; d != map.end() ; map.next(d)) for(Dart d = map.begin() ; d != map.end() ; map.next(d))
{ {
CellMarker<VERTEX> vM(map); CellMarker<VERTEX> vM(map);
vM.mark(d); vM.mark(d);
std::cout << "." ; std::cout.flush() ;
for(Dart dd = map.begin() ; dd != map.end() ; map.next(dd)) for(Dart dd = map.begin() ; dd != map.end() ; map.next(dd))
{ {
if(!vM.isMarked(dd)) if(!vM.isMarked(dd))
{ {
vM.mark(dd);
if(Geom::arePointsEquals(positions[d],positions[dd])) if(Geom::arePointsEquals(positions[d],positions[dd]))
{ {
mergeVertex<PFP>(map,positions,d,dd); mergeVertex<PFP>(map,positions,d,dd);
......
...@@ -303,13 +303,14 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib ...@@ -303,13 +303,14 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib
CellMarker<EDGE> brokenMark(map); CellMarker<EDGE> brokenMark(map);
EdgeAttribute<float> edgeWidth = map.template addAttribute<float, EDGE>("width"); EdgeAttribute<float> edgeWidth = map.template addAttribute<float, EDGE>("width");
EdgeAttribute<Dart> edgeOpp = map.template addAttribute<Dart, EDGE>("opp");
EdgeAttribute<NoMathAttribute<Geom::Plane3D<typename PFP::REAL> > > edgePlanes = map.template addAttribute<NoMathAttribute<Geom::Plane3D<typename PFP::REAL> >, EDGE>("planes"); EdgeAttribute<NoMathAttribute<Geom::Plane3D<typename PFP::REAL> > > edgePlanes = map.template addAttribute<NoMathAttribute<Geom::Plane3D<typename PFP::REAL> >, EDGE>("planes");
///////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////
//create broken lines //create broken lines
DartMarker brokenL(map); DartMarker brokenL(map);
unsigned int nbVertices = 0 ;
std::vector<float >::iterator itW = allBrokenLinesWidth.begin(); std::vector<float >::iterator itW = allBrokenLinesWidth.begin();
for(typename std::vector<POLYGON >::iterator it = allBrokenLines.begin() ; it != allBrokenLines.end() ; ++it) for(typename std::vector<POLYGON >::iterator it = allBrokenLines.begin() ; it != allBrokenLines.end() ; ++it)
{ {
...@@ -320,46 +321,42 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib ...@@ -320,46 +321,42 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib
} }
else else
{ {
unsigned int faceDegree = it->size()*2-2; nbVertices += it->size() ;
Dart d = map.newFace(faceDegree);
polygonsFaces.mark(d); Dart d = map.newFace(it->size()*2-2,false);
Dart d1=d; Dart d1=d;
Dart d_1=map.phi_1(d); Dart d_1=map.phi_1(d);
//build a degenerated "line" face //build a degenerated "line" face
for(unsigned int i = 0; i<faceDegree/2 ; ++i) for(unsigned int i = 0; i<it->size() ; ++i)
{ {
edgeOpp[d1] = d_1;
edgeOpp[d_1] = d_1;
edgeWidth[d1] = *itW;
edgeWidth[d_1] = *itW;
brokenL.mark(d1); brokenL.mark(d1);
brokenL.mark(d_1); brokenL.mark(d_1);
map.sewFaces(d1,d_1,false) ;
edgeWidth[d1] = *itW;
d1 = map.phi1(d1); d1 = map.phi1(d1);
d_1 = map.phi_1(d_1); d_1 = map.phi_1(d_1);
} }
polygonsFaces.mark(d);
//embed the line //embed the line
Dart dd = d; d1 = d;
Dart dOp = d;
for(typename POLYGON::iterator emb = it->begin(); emb != it->end() ; emb++) for(typename POLYGON::iterator emb = it->begin(); emb != it->end() ; emb++)
{ {
bb->addPoint(*emb); bb->addPoint(*emb);
position[dd] = *emb; position[d1] = *emb;
position[dOp] = *emb; d1 = map.phi1(d1);
dd = map.phi1(dd);
dOp = map.phi_1(dOp);
} }
} }
itW++; itW++;
} }
std::cout << "importSVG : broken lines created." << std::endl; std::cout << "importSVG : broken lines created : " << nbVertices << " vertices"<< std::endl;
///////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////
//create polygons //create polygons
...@@ -411,6 +408,7 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib ...@@ -411,6 +408,7 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib
// map.closeMap(close); // map.closeMap(close);
// map.closeMap(); // map.closeMap();
std::cout << "importSVG : Vertices merging..." << std::endl;
Algo::BooleanOperator::mergeVertices<PFP>(map,position); Algo::BooleanOperator::mergeVertices<PFP>(map,position);
std::cout << "importSVG : Vertices merged." << std::endl; std::cout << "importSVG : Vertices merged." << std::endl;
...@@ -455,12 +453,12 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib ...@@ -455,12 +453,12 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib
CellMarker<EDGE> eMTreated(map); CellMarker<EDGE> eMTreated(map);
for(Dart d = map.begin();d != map.end(); map.next(d)) for(Dart d = map.begin();d != map.end(); map.next(d))
{ {
if(brokenL.isMarked(d) && !eMTreated.isMarked(d) && edgeOpp[d]!=d) if(brokenL.isMarked(d) && !eMTreated.isMarked(d))
{ {
// -> we convert broken lines to faces to represent their width // -> we convert broken lines to faces to represent their width
Dart d1 = d; Dart d1 = d;
Dart d2 = edgeOpp[d]; Dart d2 = map.phi2(d);
VEC3 p1 = position[d1]; VEC3 p1 = position[d1];
VEC3 p2 = position[d2]; VEC3 p2 = position[d2];
...@@ -487,7 +485,6 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib ...@@ -487,7 +485,6 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib
Dart dC = map.phi1(d2); Dart dC = map.phi1(d2);
eMTreated.mark(dC); eMTreated.mark(dC);
edgeOpp[dC] = dC;
position[map.phi_1(d1)]=p1; position[map.phi_1(d1)]=p1;
edgePlanes[map.phi_1(d1)] = Geom::Plane3D<typename PFP::REAL>(v,p1); edgePlanes[map.phi_1(d1)] = Geom::Plane3D<typename PFP::REAL>(v,p1);
...@@ -507,7 +504,6 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib ...@@ -507,7 +504,6 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib
Dart dC = map.phi1(d1); Dart dC = map.phi1(d1);
eMTreated.mark(dC); eMTreated.mark(dC);
edgeOpp[dC] = dC;
position[map.phi_1(d2)]=p2; position[map.phi_1(d2)]=p2;
edgePlanes[map.phi_1(d2)] = Geom::Plane3D<typename PFP::REAL>(-1.0f*v, p2); edgePlanes[map.phi_1(d2)] = Geom::Plane3D<typename PFP::REAL>(-1.0f*v, p2);
...@@ -548,9 +544,9 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib ...@@ -548,9 +544,9 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib
VEC3 pos = position[d]; VEC3 pos = position[d];
pl.project(pos); pl.project(pos);
// pl = edgePlanes[map.phi_1(d)]; pl = edgePlanes[map.phi_1(d)];
//
// pl.project(pos); pl.project(pos);
position[d] = pos; position[d] = pos;
} }
} }
......
...@@ -100,7 +100,8 @@ void ParticleCell2D<PFP>::vertexState(const VEC3& goal) ...@@ -100,7 +100,8 @@ void ParticleCell2D<PFP>::vertexState(const VEC3& goal)
do do
{ {
if(Algo::Geometry::isPointOnHalfEdge<PFP>(m,d,positionAttribut,goal) if(Algo::Geometry::isPointOnHalfEdge<PFP>(m,d,positionAttribut,goal)
&& Algo::Geometry::isPointOnHalfEdge<PFP>(m,this->m.phi2(d),positionAttribut,goal)) && Algo::Geometry::isPointOnHalfEdge<PFP>(m,this->m.phi2(d),positionAttribut,goal)
&& this->getOrientationEdge(goal, this->d) == Geom::ALIGNED)
{ {
edgeState(goal) ; edgeState(goal) ;
return; return;
......
#ifndef PARTCELL2DMEMO_H #ifndef PARTCELL2DMEMO_H
#define PARTCELL2DMEMO_H #define PARTCELL2DMEMO_H
//#define DEBUG
#include "particle_cell_2D.h" #include "particle_cell_2D.h"
#include "Algo/Geometry/inclusion.h" #include "Algo/Geometry/inclusion.h"
...@@ -29,34 +29,27 @@ public: ...@@ -29,34 +29,27 @@ public:
typedef typename PFP::VEC3 VEC3; typedef typename PFP::VEC3 VEC3;
typedef VertexAttribute<typename PFP::VEC3> TAB_POS ; typedef VertexAttribute<typename PFP::VEC3> TAB_POS ;
std::list<Dart> memo_cross ;
bool detect_vertex ;
bool detect_edge ;
bool detect_face ;
private: private:
ParticleCell2DMemo() : ParticleCell2DMemo(){
detect_vertex(false), detect_edge(false), detect_face(true)
{
} }
public: public:
ParticleCell2DMemo(MAP& map, Dart belonging_cell, VEC3 pos, const TAB_POS& tabPos) : ParticleCell2DMemo(MAP& map, Dart belonging_cell, VEC3 pos, const TAB_POS& tabPos) :
ParticleCell2D<PFP>(map, belonging_cell, pos, tabPos), ParticleCell2D<PFP>(map, belonging_cell, pos, tabPos)
detect_vertex(false),
detect_edge(false),
detect_face(true)
{ {
} }
void vertexState(const VEC3& current) ; void vertexState(const VEC3& current, CellMarkerMemo<FACE> * memo_cross) ;
void edgeState(const VEC3& current, Geom::Orientation2D sideOfEdge = Geom::ALIGNED) ; void edgeState(const VEC3& current, CellMarkerMemo<FACE> * memo_cross, Geom::Orientation2D sideOfEdge = Geom::ALIGNED) ;
void faceState(const VEC3& current) ; void faceState(const VEC3& current, CellMarkerMemo<FACE> * memo_cross) ;
void move(const VEC3& goal) ; void move(const VEC3& goal, CellMarkerMemo<FACE> * memo_cross) ;
std::vector<Dart> get_memo(const VEC3& goal);
} ; } ;
#include "particle_cell_2D_memo.hpp" #include "particle_cell_2D_memo.hpp"
......
template <typename PFP> template <typename PFP>
void ParticleCell2DMemo<PFP>::move(const VEC3& goal) void ParticleCell2DMemo<PFP>::move(const VEC3& goal, CellMarkerMemo<FACE> * memo_cross)
{ {
this->crossCell = NO_CROSS ; this->crossCell = NO_CROSS ;
if (!Geom::arePointsEquals(goal, this->getPosition())) if (!Geom::arePointsEquals(goal, this->getPosition()))
...@@ -7,13 +7,13 @@ void ParticleCell2DMemo<PFP>::move(const VEC3& goal) ...@@ -7,13 +7,13 @@ void ParticleCell2DMemo<PFP>::move(const VEC3& goal)
switch (this->getState()) switch (this->getState())
{ {
case VERTEX : case VERTEX :
vertexState(goal) ; vertexState(goal,memo_cross) ;
break ; break ;
case EDGE : case EDGE :
edgeState(goal) ; edgeState(goal,memo_cross) ;
break ; break ;
case FACE : case FACE :
faceState(goal) ; faceState(goal,memo_cross) ;
break ; break ;
} }
} }
...@@ -22,13 +22,22 @@ void ParticleCell2DMemo<PFP>::move(const VEC3& goal) ...@@ -22,13 +22,22 @@ void ParticleCell2DMemo<PFP>::move(const VEC3& goal)
} }
template <typename PFP> template <typename PFP>
void ParticleCell2DMemo<PFP>::vertexState(const VEC3& current) std::vector<Dart> ParticleCell2DMemo<PFP>::get_memo(const VEC3& goal)
{
CellMarkerMemo<FACE> memo_cross(this->m);
memo_cross.mark(this->d);
this->move(goal,&memo_cross);
return memo_cross.get_markedCells();
}
template <typename PFP>
void ParticleCell2DMemo<PFP>::vertexState(const VEC3& current, CellMarkerMemo<FACE> * memo_cross)
{ {
#ifdef DEBUG #ifdef DEBUG
CGoGNout << "vertexState" << d << CGoGNendl ; CGoGNout << "vertexState" << this->d << CGoGNendl ;
#endif #endif
assert(std::isfinite(current[0]) && std::isfinite(current[1]) && std::isfinite(current[2])) ; assert(std::isfinite(current[0]) && std::isfinite(current[1]) && std::isfinite(current[2])) ;
(*memo_cross).mark(this->d);
this->crossCell = CROSS_OTHER ; this->crossCell = CROSS_OTHER ;
if (Algo::Geometry::isPointOnVertex < PFP > (this->m, this->d, this->positionAttribut, current)) if (Algo::Geometry::isPointOnVertex < PFP > (this->m, this->d, this->positionAttribut, current))
...@@ -67,9 +76,12 @@ void ParticleCell2DMemo<PFP>::vertexState(const VEC3& current) ...@@ -67,9 +76,12 @@ void ParticleCell2DMemo<PFP>::vertexState(const VEC3& current)
do do
{ {
if(Algo::Geometry::isPointOnHalfEdge<PFP>(this->m,this->d,this->positionAttribut,current) if(Algo::Geometry::isPointOnHalfEdge<PFP>(this->m,this->d,this->positionAttribut,current)
&& Algo::Geometry::isPointOnHalfEdge<PFP>(this->m,this->m.phi2(this->d),this->positionAttribut,current)) && Algo::Geometry::isPointOnHalfEdge<PFP>(this->m,this->m.phi2(this->d),this->positionAttribut,current)
&& this->getOrientationEdge(current, this->d) == Geom::ALIGNED)
{ {
this->edgeState(current) ;
this->edgeState(current,memo_cross) ;
return; return;
} }
this->d = this->m.phi2_1(this->d) ; this->d = this->m.phi2_1(this->d) ;
...@@ -94,31 +106,28 @@ void ParticleCell2DMemo<PFP>::vertexState(const VEC3& current) ...@@ -94,31 +106,28 @@ void ParticleCell2DMemo<PFP>::vertexState(const VEC3& current)
} }
//displacement step //displacement step
if (detect_vertex)
memo_cross.push_back(this->d) ;
if (this->getOrientationEdge(current, this->d) == Geom::ALIGNED if (this->getOrientationEdge(current, this->d) == Geom::ALIGNED
&& Algo::Geometry::isPointOnHalfEdge<PFP>(this->m, this->d, this->positionAttribut, current)) && Algo::Geometry::isPointOnHalfEdge<PFP>(this->m, this->d, this->positionAttribut, current))
edgeState(current) ; edgeState(current,memo_cross) ;
else else
{ {
this->d = this->m.phi1(this->d) ; this->d = this->m.phi1(this->d) ;
faceState(current) ; faceState(current,memo_cross) ;
} }
} }
} }
template <typename PFP> template <typename PFP>
void ParticleCell2DMemo<PFP>::edgeState(const VEC3& current, Geom::Orientation2D sideOfEdge) void ParticleCell2DMemo<PFP>::edgeState(const VEC3& current, CellMarkerMemo<FACE>* memo_cross, Geom::Orientation2D sideOfEdge)
{ {
#ifdef DEBUG #ifdef DEBUG
CGoGNout << "edgeState" << d << CGoGNendl ; CGoGNout << "edgeState" << this->d << CGoGNendl ;
#endif #endif
if (detect_edge)
memo_cross.push_back(this->d) ;
assert(std::isfinite(current[0]) && std::isfinite(current[1]) && std::isfinite(current[2])) ; assert(std::isfinite(current[0]) && std::isfinite(current[1]) && std::isfinite(current[2])) ;
// assert(Algo::Geometry::isPointOnEdge<PFP>(m,d,m_positions,m_position)); // assert(Algo::Geometry::isPointOnEdge<PFP>(m,d,m_positions,m_position));
(*memo_cross).mark(this->d);
if (this->crossCell == NO_CROSS) if (this->crossCell == NO_CROSS)
{ {
this->crossCell = CROSS_EDGE ; this->crossCell = CROSS_EDGE ;
...@@ -133,11 +142,11 @@ void ParticleCell2DMemo<PFP>::edgeState(const VEC3& current, Geom::Orientation2D ...@@ -133,11 +142,11 @@ void ParticleCell2DMemo<PFP>::edgeState(const VEC3& current, Geom::Orientation2D
{ {
case Geom::LEFT : case Geom::LEFT :
this->d = this->m.phi1(this->d) ; this->d = this->m.phi1(this->d) ;
faceState(current) ; faceState(current,memo_cross) ;
return ; return ;
case Geom::RIGHT : case Geom::RIGHT :
this->d = this->m.phi1(this->m.phi2(this->d)) ; this->d = this->m.phi1(this->m.phi2(this->d)) ;
faceState(current) ; faceState(current,memo_cross) ;
return ; return ;
default : default :
this->setState(EDGE) ; this->setState(EDGE) ;
...@@ -148,7 +157,7 @@ void ParticleCell2DMemo<PFP>::edgeState(const VEC3& current, Geom::Orientation2D ...@@ -148,7 +157,7 @@ void ParticleCell2DMemo<PFP>::edgeState(const VEC3& current, Geom::Orientation2D
> (this->m, this->d, this->pos