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

pp

parent 4ac3cc6b
No related branches found
No related tags found
No related merge requests found
...@@ -79,7 +79,7 @@ void outputScalarField(std::list<BDS_Face*> t, const char *iii, int param, GFace ...@@ -79,7 +79,7 @@ void outputScalarField(std::list<BDS_Face*> t, const char *iii, int param, GFace
} }
BDS_Vector::BDS_Vector(const BDS_Point &p2, const BDS_Point &p1) BDS_Vector::BDS_Vector(const BDS_Point &p2, const BDS_Point &p1)
:x(p2.X - p1.X), y(p2.Y - p1.Y), z(p2.Z - p1.Z) : x(p2.X - p1.X), y(p2.Y - p1.Y), z(p2.Z - p1.Z)
{ {
} }
...@@ -303,20 +303,20 @@ BDS_Edge *BDS_Mesh::recover_edge(int num1, int num2, std::set<EdgeToRecover> *e2 ...@@ -303,20 +303,20 @@ BDS_Edge *BDS_Mesh::recover_edge(int num1, int num2, std::set<EdgeToRecover> *e2
std::set<EdgeToRecover>::iterator itr2 = std::set<EdgeToRecover>::iterator itr2 =
e2r->find(EdgeToRecover(num1, num2, 0)); e2r->find(EdgeToRecover(num1, num2, 0));
Msg::Debug("edge %d %d on model edge %d cannot be recovered because" Msg::Debug("edge %d %d on model edge %d cannot be recovered because"
" it intersects %d %d on model edge %d", num1, num2, itr2->ge->tag(), " it intersects %d %d on model edge %d", num1, num2, itr2->ge->tag(),
e->p1->iD, e->p2->iD, itr1->ge->tag()); e->p1->iD, e->p2->iD, itr1->ge->tag());
// now throw a class that contains the diagnostic // now throw a class that contains the diagnostic
not_recovered->insert(EdgeToRecover(num1, num2, itr2->ge)); not_recovered->insert(EdgeToRecover(num1, num2, itr2->ge));
not_recovered->insert(EdgeToRecover(e->p1->iD, e->p2->iD, itr1->ge)); not_recovered->insert(EdgeToRecover(e->p1->iD, e->p2->iD, itr1->ge));
selfIntersection = true; selfIntersection = true;
} }
if (e->numfaces() != e->numTriangles())return 0; if (e->numfaces() != e->numTriangles()) return 0;
intersected.push_back(e); intersected.push_back(e);
} }
++it; ++it;
} }
if (selfIntersection)return 0; if (selfIntersection) return 0;
// if(ix > 300){ // if(ix > 300){
// Msg::Warning("edge %d %d cannot be recovered after %d iterations, trying again", // Msg::Warning("edge %d %d cannot be recovered after %d iterations, trying again",
...@@ -564,11 +564,11 @@ void BDS_Mesh::cleanup() ...@@ -564,11 +564,11 @@ void BDS_Mesh::cleanup()
BDS_Mesh::~BDS_Mesh() BDS_Mesh::~BDS_Mesh()
{ {
DESTROOOY(geom.begin(), geom.end()); DESTROOOY(geom.begin(), geom.end());
DESTROOOY(points.begin(), points.end()); DESTROOOY(points.begin(), points.end());
cleanup(); cleanup();
DESTROOOY(edges.begin(), edges.end()); DESTROOOY(edges.begin(), edges.end());
DESTROOOY(triangles.begin(), triangles.end()); DESTROOOY(triangles.begin(), triangles.end());
} }
bool BDS_Mesh::split_face(BDS_Face *f, BDS_Point *mid) bool BDS_Mesh::split_face(BDS_Face *f, BDS_Point *mid)
......
...@@ -400,10 +400,10 @@ BDS_Edge *gmshEdgeFront::findOptimalEdge(BDS_Point *p, BDS_Point *avoid) ...@@ -400,10 +400,10 @@ BDS_Edge *gmshEdgeFront::findOptimalEdge(BDS_Point *p, BDS_Point *avoid)
if(!f->e4){ if(!f->e4){
BDS_Point *target = f->oppositeVertex(e); BDS_Point *target = f->oppositeVertex(e);
// ONLY WORKS IN 2D for now !!!!!!!!!!!!!!!!!!! // ONLY WORKS IN 2D for now !!!!!!!!!!!!!!!!!!!
Intersect_Edges_2d(e->p1->X,e->p1->Y, Intersect_Edges_2d(e->p1->X, e->p1->Y,
e->p2->X,e->p2->Y, e->p2->X, e->p2->Y,
p->X,p->Y, p->X, p->Y,
p->X+n.x(),p->Y + n.y(),x); p->X + n.x(), p->Y + n.y(), x);
if(x[0] >= 0 && x[0] <= 1){ if(x[0] >= 0 && x[0] <= 1){
SVector3 d(target->X-p->X,target->Y-p->Y,target->Z-p->Z); SVector3 d(target->X-p->X,target->Y-p->Y,target->Z-p->Z);
d.normalize(); d.normalize();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment