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

never, *NEVER* interpolate plane surfaces in GeoInterpolation

parent adc6d4d8
Branches
Tags
No related merge requests found
...@@ -656,7 +656,8 @@ Vertex InterpolateSurface(Surface *s, double u, double v, int derivee, int u_v) ...@@ -656,7 +656,8 @@ Vertex InterpolateSurface(Surface *s, double u, double v, int derivee, int u_v)
return InterpolateRuledSurface(s, u, v); return InterpolateRuledSurface(s, u, v);
case MSH_SURF_PLAN: case MSH_SURF_PLAN:
{ {
Vertex T(u, v, .0); Msg::Error("You should never be here (InterpolateSurface(MSH_PLANE)): contact support ;-)");
Vertex T(u, v, 0.);
Vertex V(s->a, s->b, s->c); Vertex V(s->a, s->b, s->c);
Projette(&V, s->plan); Projette(&V, s->plan);
if(V.Pos.Z != 0.) if(V.Pos.Z != 0.)
......
...@@ -160,11 +160,19 @@ SVector3 gmshFace::normal(const SPoint2 &param) const ...@@ -160,11 +160,19 @@ SVector3 gmshFace::normal(const SPoint2 &param) const
Pair<SVector3,SVector3> gmshFace::firstDer(const SPoint2 &param) const Pair<SVector3,SVector3> gmshFace::firstDer(const SPoint2 &param) const
{ {
if(s->Typ == MSH_SURF_PLAN && !s->geometry){
double x, y, z, VX[3], VY[3];
getMeanPlaneData(VX, VY, x, y, z);
return Pair<SVector3, SVector3>(SVector3(VX[0], VX[1], VX[2]),
SVector3(VY[0], VY[1], VY[2]));
}
else{
Vertex vu = InterpolateSurface(s, param[0], param[1], 1, 1); Vertex vu = InterpolateSurface(s, param[0], param[1], 1, 1);
Vertex vv = InterpolateSurface(s, param[0], param[1], 1, 2); Vertex vv = InterpolateSurface(s, param[0], param[1], 1, 2);
return Pair<SVector3, SVector3>(SVector3(vu.Pos.X, vu.Pos.Y, vu.Pos.Z), return Pair<SVector3, SVector3>(SVector3(vu.Pos.X, vu.Pos.Y, vu.Pos.Z),
SVector3(vv.Pos.X, vv.Pos.Y, vv.Pos.Z)); SVector3(vv.Pos.X, vv.Pos.Y, vv.Pos.Z));
} }
}
GPoint gmshFace::point(double par1, double par2) const GPoint gmshFace::point(double par1, double par2) const
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment