From f35cfb87a022db59725ffdaad4faafe614099975 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 20 Feb 2013 08:47:05 +0000 Subject: [PATCH] 0022005: Error at the end of NETGEN 3D spheres mesh while tetrahedrons have been generated SMESH_Algo::IsReversedSubMesh() is moved to SMESH_MesherHelper --- src/StdMeshers/StdMeshers_Prism_3D.cxx | 2 +- src/StdMeshers/StdMeshers_Projection_2D.cxx | 8 ++++---- src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx | 2 +- src/StdMeshers/StdMeshers_ViscousLayers.cxx | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index 00a536105..17c67d6e1 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -1646,7 +1646,7 @@ bool StdMeshers_Prism_3D::projectBottomToTop() // if the bottom faces is orienetd OK then top faces must be reversed bool reverseTop = true; if ( myHelper->NbAncestors( botFace, *myBlock.Mesh(), TopAbs_SOLID ) > 1 ) - reverseTop = ! SMESH_Algo::IsReversedSubMesh( TopoDS::Face( botFace ), meshDS ); + reverseTop = ! myHelper->IsReversedSubMesh( TopoDS::Face( botFace )); int iFrw, iRev, *iPtr = &( reverseTop ? iRev : iFrw ); // loop on bottom mesh faces diff --git a/src/StdMeshers/StdMeshers_Projection_2D.cxx b/src/StdMeshers/StdMeshers_Projection_2D.cxx index 7467a19f9..9742f8840 100644 --- a/src/StdMeshers/StdMeshers_Projection_2D.cxx +++ b/src/StdMeshers/StdMeshers_Projection_2D.cxx @@ -861,15 +861,15 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& done = projectBy2DSimilarity( tgtFace, srcFace, tgtMesh, srcMesh, shape2ShapeMap, is1DComputed); } + SMESH_MesherHelper helper( theMesh ); + helper.SetSubShape( tgtFace ); + if ( !done ) { // -------------------- // Prepare to mapping // -------------------- - SMESH_MesherHelper helper( theMesh ); - helper.SetSubShape( tgtFace ); - // Check if node projection to a face is needed Bnd_B2d uvBox; SMDS_ElemIteratorPtr faceIt = srcSubMesh->GetSubMeshDS()->GetElements(); @@ -1182,7 +1182,7 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& } } // Fix orientation - if ( SMESH_Algo::IsReversedSubMesh( face, meshDS )) + if ( helper.IsReversedSubMesh( face )) { SMESH_MeshEditor editor( tgtMesh ); SMDS_ElemIteratorPtr eIt = meshDS->MeshElements( face )->GetElements(); diff --git a/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx b/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx index 4c96220ea..54c3b7609 100644 --- a/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx +++ b/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx @@ -756,7 +756,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh, { bool isRev = false; if ( helper.NbAncestors( aShapeFace, aMesh, aShape.ShapeType() ) > 1 ) - isRev = SMESH_Algo::IsReversedSubMesh( TopoDS::Face(aShapeFace), meshDS ); + isRev = helper.IsReversedSubMesh( TopoDS::Face(aShapeFace) ); SMDS_ElemIteratorPtr iteratorElem = aSubMeshDSFace->GetElements(); while ( iteratorElem->more() ) // loop on elements on a geometrical face diff --git a/src/StdMeshers/StdMeshers_ViscousLayers.cxx b/src/StdMeshers/StdMeshers_ViscousLayers.cxx index a855c24a3..b90271fb1 100644 --- a/src/StdMeshers/StdMeshers_ViscousLayers.cxx +++ b/src/StdMeshers/StdMeshers_ViscousLayers.cxx @@ -1096,7 +1096,7 @@ bool _ViscousBuilder::findFacesWithLayers() { _ignoreShapeIds.insert( faceInd ); ignoreFaces.push_back( exp.Current() ); - if ( SMESH_Algo::IsReversedSubMesh( TopoDS::Face( exp.Current() ), getMeshDS())) + if ( helper.IsReversedSubMesh( TopoDS::Face( exp.Current() ))) _sdVec[i]._reversedFaceIds.insert( faceInd ); } } @@ -4480,7 +4480,7 @@ bool _ViscousBuilder::addBoundaryElements() reverse = ( helper.GetSubShapeOri( F, E ) == TopAbs_REVERSED ); if ( helper.GetSubShapeOri( data._solid, F ) == TopAbs_REVERSED ) reverse = !reverse, F.Reverse(); - if ( SMESH_Algo::IsReversedSubMesh( TopoDS::Face(F), getMeshDS() )) + if ( helper.IsReversedSubMesh( TopoDS::Face(F) )) reverse = !reverse; } else -- 2.30.2