From f34d4ca3432a04dbedb6047638927c600749c304 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 17 Oct 2014 20:26:57 +0400 Subject: [PATCH 1/1] Regression of 21397: a quadrangle face mesh can't be projected to a cylinder --- src/SMESH/SMESH_MesherHelper.cxx | 6 ++++-- src/StdMeshers/StdMeshers_Projection_2D.cxx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index 4449efbce..21b0043c9 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -2574,11 +2574,13 @@ bool SMESH_MesherHelper::IsDistorted2D( SMESH_subMesh* faceSM ) } // prepare to getting UVs const SMDS_MeshNode* inFaceNode = 0; - if ( helper.HasSeam() ) + if ( helper.HasSeam() ) { for ( size_t i = 0; ( i < nodes.size() && !inFaceNode ); ++i ) if ( !helper.IsSeamShape( nodes[ i ]->getshapeId() )) inFaceNode = nodes[ i ]; - + if ( !inFaceNode ) + continue; + } // get UVs uv.resize( nodes.size() ); for ( size_t i = 0; i < nodes.size(); ++i ) diff --git a/src/StdMeshers/StdMeshers_Projection_2D.cxx b/src/StdMeshers/StdMeshers_Projection_2D.cxx index 9db5ee4c3..66e7834ae 100644 --- a/src/StdMeshers/StdMeshers_Projection_2D.cxx +++ b/src/StdMeshers/StdMeshers_Projection_2D.cxx @@ -1047,7 +1047,7 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& bool done = false; - if ( !done ) + if ( !done ) { // try to project from the same face with different location done = projectPartner( tgtFace, srcFace, tgtWires, srcWires, -- 2.30.2