From: eap Date: Wed, 27 Nov 2013 10:00:34 +0000 (+0000) Subject: 22419: EDF SMESH Regression: 3D Extrusion fails X-Git-Tag: V7_3_0a1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d9d385cc066b218b812bd8d5f83782e82ab84f78;p=modules%2Fsmesh.git 22419: EDF SMESH Regression: 3D Extrusion fails FaceQuadStruct::Ptr CheckNbEdges(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, + const bool considerMesh=false); --- diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx index 8ae1eb96f..250948ddc 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx @@ -218,7 +218,7 @@ bool StdMeshers_Quadrangle_2D::Compute (SMESH_Mesh& aMesh, _quadraticMesh = myHelper->IsQuadraticSubMesh(aShape); myNeedSmooth = false; - FaceQuadStruct::Ptr quad = CheckNbEdges( aMesh, F ); + FaceQuadStruct::Ptr quad = CheckNbEdges( aMesh, F, /*considerMesh=*/true ); if (!quad) return false; myQuadStruct = quad; @@ -819,7 +819,8 @@ static bool twoEdgesMeatAtVertex(const TopoDS_Edge& e1, //============================================================================= FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh & aMesh, - const TopoDS_Shape & aShape) + const TopoDS_Shape & aShape, + const bool considerMesh) { if ( myQuadStruct && myQuadStruct->face.IsSame( aShape )) return myQuadStruct; @@ -839,7 +840,7 @@ FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh & // find corner vertices of the quad vector corners; - int nbDegenEdges, nbSides = getCorners( F, aMesh, edges, corners, nbDegenEdges ); + int nbDegenEdges, nbSides = getCorners( F, aMesh, edges, corners, nbDegenEdges, considerMesh ); if ( nbSides == 0 ) { return FaceQuadStruct::Ptr(); @@ -3459,6 +3460,8 @@ void StdMeshers_Quadrangle_2D::smooth (FaceQuadStruct::Ptr quad) * \param [out] theVertices - the found corner vertices in the order corresponding to * the order of EDGEs in \a theWire * \param [out] theNbDegenEdges - nb of degenerated EDGEs in theFace + * \param [in] theConsiderMesh - if \c true, only meshed VERTEXes are considered + * as possible corners * \return int - number of quad sides found: 0, 3 or 4 */ //================================================================================ @@ -3467,7 +3470,8 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face& theFace, SMESH_Mesh & theMesh, std::list& theWire, std::vector& theVertices, - int & theNbDegenEdges) + int & theNbDegenEdges, + const bool theConsiderMesh) { theNbDegenEdges = 0; @@ -3495,7 +3499,7 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face& theFace, continue; } TopoDS_Vertex v = helper.IthVertex( 0, *edge ); - if ( SMESH_Algo::VertexNode( v, helper.GetMeshDS() )) + if ( !theConsiderMesh || SMESH_Algo::VertexNode( v, helper.GetMeshDS() )) { double angle = SMESH_MesherHelper::GetAngle( prevE, *edge, theFace ); vertexByAngle.insert( make_pair( angle, v )); diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx index 58f7bf0da..54a2a0664 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx @@ -78,7 +78,8 @@ public: const bool CreateQuadratic); FaceQuadStruct::Ptr CheckNbEdges(SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape); + const TopoDS_Shape& aShape, + const bool considerMesh=false); protected: @@ -125,7 +126,8 @@ protected: SMESH_Mesh & theMesh, std::list& theWire, std::vector& theVertices, - int & theNbDegenEdges); + int & theNbDegenEdges, + const bool considerMesh); // true if QuadranglePreference hypothesis is assigned that forces