Commit 1b3808a2 authored by Pierre Kraemer's avatar Pierre Kraemer

ImplicitHierarchicalMap -> correction gestion plongement face dans simplif face

parent efef8888
......@@ -164,7 +164,7 @@ void coarsenFace(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& position)
assert(map.faceIsSubdividedOnce(d) || !"Trying to coarsen a non-subdivided face or a more than once subdivided face") ;
unsigned int cur = map.getCurrentLevel() ;
map.setCurrentLevel(cur + 1) ;
map.setCurrentLevel(map.getMaxLevel()) ;
map.deleteVertex(map.phi1(map.phi1(d))) ;
map.setCurrentLevel(cur) ;
Dart fit = d ;
......
......@@ -91,7 +91,6 @@ class ParticleCell2D : public ParticleBase
};
#include "particle_cell_2D.hpp"
//namespace
}
......
......@@ -89,23 +89,20 @@ void ParticleCell2D<PFP>::vertexState(const VEC3& current)
if(dd_vert==d) {
//orbit with 2 edges : point on one edge
if(m.alpha1(m.alpha1(d))==d) {
if(!Algo::Geometry::isPointOnHalfEdge<PFP>(m,d,m_positions,current)) {
d = m.alpha1(d);
}
if(!Algo::Geometry::isPointOnHalfEdge<PFP>(m,d,m_positions,current)) {
d = m.alpha1(d);
}
}
else {
state = VERTEX_ORBIT;
state = VERTEX_ORBIT;
return;
}
}
}
else {
std::cout << "ploc" << std::endl;
Dart dd_vert = m.alpha1(d);
while(getOrientationEdge(current,d)==Geom::RIGHT && dd_vert!=d) {
std::cout << "tourne" << std::endl;
d = m.alpha_1(d);
if(m_positions[d][0]==m_positions[m.phi1(d)][0] && m_positions[d][1]==m_positions[m.phi1(d)][1]) {
d=m.alpha_1(d);
}
......@@ -115,7 +112,6 @@ void ParticleCell2D<PFP>::vertexState(const VEC3& current)
//displacement step
// if(!obstacle.isMarked(d)) {
if(getOrientationEdge(current,d)==Geom::ALIGNED && Algo::Geometry::isPointOnHalfEdge<PFP>(m,d,m_positions,current)) {
std::cout << m.vertexDegree(d) << std::endl;
edgeState(current);
}
else {
......
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