From 2541f0a92afab0e623b2dee32309c0853c6f4c8d Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 26 May 2011 16:22:57 +0000 Subject: [PATCH] 0021086: EDF 1686 GEOM: Bad triangle in a BLSURF + GHS3D mesh after converting to quadratic (Bug1686_Convert2Quad.py) in GetMiddleUV(), get period from a base surface of Geom_RectangularTrimmedSurface --- src/SMESH/SMESH_MesherHelper.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index 9199f20a5..ec1ec85ce 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -40,7 +40,7 @@ #include #include #include -//#include +#include #include #include #include @@ -735,7 +735,14 @@ gp_XY SMESH_MesherHelper::GetMiddleUV(const Handle(Geom_Surface)& surface, const gp_XY& p1, const gp_XY& p2) { - return applyIn2D( surface, p1, p2, & AverageUV ); + // NOTE: + // the proper place of getting basic surface seems to be in applyIn2D() + // but we put it here to decrease a risk of regressions just before releasing a version + Handle(Geom_Surface) surf = surface; + while ( !surf.IsNull() && surf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface ))) + surf = Handle(Geom_RectangularTrimmedSurface)::DownCast( surf )->BasisSurface(); + + return applyIn2D( surf, p1, p2, & AverageUV ); } //======================================================================= -- 2.39.2