Skip to content
Snippets Groups Projects
Commit fb40c362 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

cleanup

parent ba6055bb
Branches
Tags
No related merge requests found
...@@ -116,13 +116,3 @@ GEdgeLoop::GEdgeLoop(const std::list<GEdge*> &cwire) ...@@ -116,13 +116,3 @@ GEdgeLoop::GEdgeLoop(const std::list<GEdge*> &cwire)
} }
} }
GEdgeLoop::GEdgeLoop(const std::list<GEdge*> &cwire, const std::list<int> &dir)
{
std::list<GEdge*>::const_iterator it = cwire.begin();
std::list<int>::const_iterator itdir = dir.begin();
for ( ; it != cwire.end() ; ++it,++itdir){
loop.push_back(GEdgeSigned(*itdir,*it));
}
}
...@@ -33,7 +33,6 @@ class GEdgeLoop ...@@ -33,7 +33,6 @@ class GEdgeLoop
typedef std::list<GEdgeSigned>::iterator iter; typedef std::list<GEdgeSigned>::iterator iter;
typedef std::list<GEdgeSigned>::const_iterator citer; typedef std::list<GEdgeSigned>::const_iterator citer;
GEdgeLoop(const std::list<GEdge*> &); GEdgeLoop(const std::list<GEdge*> &);
GEdgeLoop(const std::list<GEdge*> &, const std::list<int> &dir);
inline iter begin() { return loop.begin(); } inline iter begin() { return loop.begin(); }
inline iter end() { return loop.end(); } inline iter end() { return loop.end(); }
inline citer begin() const { return loop.begin(); } inline citer begin() const { return loop.begin(); }
... ...
......
...@@ -146,45 +146,6 @@ std::list<GVertex*> GFace::vertices() const ...@@ -146,45 +146,6 @@ std::list<GVertex*> GFace::vertices() const
return ret; return ret;
} }
std::vector<std::pair<GEdge*, int> > GFace::sortedEdges() const
{
std::vector<std::pair<GEdge*, int> > sorted;
if(l_dirs.size() == l_edges.size()){
std::vector<std::pair<GEdge*, int> > tmp;
std::list<GEdge*>::const_iterator ite = l_edges.begin();
std::list<int>::const_iterator itd = l_dirs.begin();
while(ite != l_edges.end()){
tmp.push_back(std::pair<GEdge*, int>(*ite, *itd));
ite++; itd++;
}
if(tmp.size()){
sorted.push_back(tmp.front());
tmp.erase(tmp.begin());
int check = 0;
while(sorted.size() < l_edges.size()){
if(++check > l_edges.size()){
Msg::Warning("Aborting sorted edge computation");
break;
}
GVertex *v1 = (sorted.back().second > 0) ? sorted.back().first->getEndVertex() :
sorted.back().first->getBeginVertex();
for(std::vector<std::pair<GEdge*, int> >::iterator it = tmp.begin();
it != tmp.end(); it++){
GVertex *v2 = (it->second > 0) ? it->first->getBeginVertex() :
it->first->getEndVertex();
if(v1 == v2){
sorted.push_back(*it);
tmp.erase(it);
break;
}
}
}
}
}
return sorted;
}
void GFace::setVisibility(char val, bool recursive) void GFace::setVisibility(char val, bool recursive)
{ {
GEntity::setVisibility(val); GEntity::setVisibility(val);
... ...
......
...@@ -73,9 +73,6 @@ class GFace : public GEntity ...@@ -73,9 +73,6 @@ class GFace : public GEntity
// edges that bound the face // edges that bound the face
virtual std::list<GEdge*> edges() const { return l_edges; } virtual std::list<GEdge*> edges() const { return l_edges; }
// edges that bound the face, sorted in a loop, with orientation
virtual std::vector<std::pair<GEdge*, int> > sortedEdges() const;
// edges that are embedded in the face // edges that are embedded in the face
virtual std::list<GEdge*> embeddedEdges() const { return embedded_edges; } virtual std::list<GEdge*> embeddedEdges() const { return embedded_edges; }
... ...
......
...@@ -52,12 +52,9 @@ int MeshTransfiniteSurface(GFace *gf) ...@@ -52,12 +52,9 @@ int MeshTransfiniteSurface(GFace *gf)
} }
else{ else{
// try to find the corners automatically // try to find the corners automatically
std::vector<std::pair<GEdge*, int> > bnd = gf->sortedEdges(); GEdgeLoop el(gf->edges());
for(unsigned int i = 0; i < bnd.size(); i++) for(GEdgeLoop::iter it = el.begin(); it != el.end(); it++)
if(bnd[i].second > 0) corners.push_back(it->getBeginVertex()->mesh_vertices[0]);
corners.push_back(bnd[i].first->getBeginVertex()->mesh_vertices[0]);
else
corners.push_back(bnd[i].first->getEndVertex()->mesh_vertices[0]);
} }
if(corners.size () != 3 && corners.size () != 4){ if(corners.size () != 3 && corners.size () != 4){
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment