Skip to content
Snippets Groups Projects
Commit c6a77a72 authored by Jean-François Remacle's avatar Jean-François Remacle
Browse files

*** empty log message ***

parent c1bfcdb0
No related branches found
No related tags found
No related merge requests found
...@@ -51,7 +51,7 @@ class GMSH_GSHHSPlugin:public GMSH_Post_Plugin ...@@ -51,7 +51,7 @@ class GMSH_GSHHSPlugin:public GMSH_Post_Plugin
} }
}; };
class reader_gshhs:public reader{ class reader_gshhs:public reader{
/* $Id: GSHHS.cpp,v 1.22 2009-01-15 00:43:04 geuzaine Exp $ /* $Id: GSHHS.cpp,v 1.23 2009-01-15 13:28:30 remacle Exp $
* *
* Include file defining structures used in gshhs.c * Include file defining structures used in gshhs.c
* *
...@@ -337,10 +337,10 @@ class GMSH_GSHHSPlugin:public GMSH_Post_Plugin ...@@ -337,10 +337,10 @@ class GMSH_GSHHSPlugin:public GMSH_Post_Plugin
box *b; box *b;
double min_dist; double min_dist;
loop *l; loop *l;
point(double _x,double _y,double _z,Field *f,double straits_factor){ point(double _x,double _y,double _z,Field *f){
v[0]=_x; v[1]=_y; v[2]=_z; v[0]=_x; v[1]=_y; v[2]=_z;
if(f) if(f)
min_dist=(*f)(v[0],v[1],v[2])*straits_factor; min_dist=(*f)(v[0],v[1],v[2]);
} }
point(double _x,double _y,double _z,double _min_dist){ point(double _x,double _y,double _z,double _min_dist){
v[0]=_x; v[1]=_y; v[2]=_z; v[0]=_x; v[1]=_y; v[2]=_z;
...@@ -972,7 +972,7 @@ PView *GMSH_GSHHSPlugin::execute(PView * v) ...@@ -972,7 +972,7 @@ PView *GMSH_GSHHSPlugin::execute(PView * v)
while(read->next_point(p)){ while(read->next_point(p)){
if(c_syst) if(c_syst)
c_syst->to_cartesian(p,p); c_syst->to_cartesian(p,p);
point newp(p[0],p[1],p[2],field,straits_factor); point newp(p[0],p[1],p[2],field);
if(newp.min_dist<0){ if(newp.min_dist<0){
while(!l.empty() && l.back().dist(l.front())<l.back().min_dist) while(!l.empty() && l.back().dist(l.front())<l.back().min_dist)
l.pop_back(); l.pop_back();
...@@ -992,6 +992,9 @@ PView *GMSH_GSHHSPlugin::execute(PView * v) ...@@ -992,6 +992,9 @@ PView *GMSH_GSHHSPlugin::execute(PView * v)
} }
delete read; delete read;
if(straits_factor>0 && iField !=0){ if(straits_factor>0 && iField !=0){
for(loops::iterator il=ll.begin();il!=ll.end();il++)
for(loop::iterator ip=il->begin();ip!=il->end();ip++)
ip->min_dist*=straits_factor;
box *b=new box(point(-radius,-radius,-radius,0.),point(radius,radius,radius,0.)); box *b=new box(point(-radius,-radius,-radius,0.),point(radius,radius,radius,0.));
for(loops::iterator il=ll.begin();il!=ll.end();il++) for(loops::iterator il=ll.begin();il!=ll.end();il++)
loop_fill_box(&*il,*b); loop_fill_box(&*il,*b);
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
// bugs and problems to <gmsh@geuz.org>. // bugs and problems to <gmsh@geuz.org>.
#include "LongitudeLatitude.h" #include "LongitudeLatitude.h"
#include "OpenFile.h"
StringXNumber LongituteLatitudeOptions_Number[] = { StringXNumber LongituteLatitudeOptions_Number[] = {
{GMSH_FULLRC, "iView", NULL, -1.} {GMSH_FULLRC, "iView", NULL, -1.}
...@@ -86,7 +87,7 @@ PView *GMSH_LongituteLatitudePlugin::execute(PView *v) ...@@ -86,7 +87,7 @@ PView *GMSH_LongituteLatitudePlugin::execute(PView *v)
x2 = atan2(y, x); x2 = atan2(y, x);
xmin=std::min(x2, xmin); xmin=std::min(x2, xmin);
xmax=std::max(x2, xmax); xmax=std::max(x2, xmax);
data1->setNode(step, ent, ele, nod, x2 * 180 / M_PI, y2 * 180 / M_PI, z2); data1->setNode(step, ent, ele, nod, x2 * 180 / M_PI, y2 * 180 / M_PI, 0);
data1->tagNode(step, ent, ele, nod, 1); data1->tagNode(step, ent, ele, nod, 1);
if(nbComp == 3){ if(nbComp == 3){
for(int i = 0; i < 3; i++) for(int i = 0; i < 3; i++)
...@@ -114,8 +115,9 @@ PView *GMSH_LongituteLatitudePlugin::execute(PView *v) ...@@ -114,8 +115,9 @@ PView *GMSH_LongituteLatitudePlugin::execute(PView *v)
} }
} }
} }
data1->destroyAdaptiveData();
data1->finalize(); data1->finalize();
SetBoundingBox();
v1->setChanged(true); v1->setChanged(true);
return v1; return v1;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment