Salome HOME
0022005: Error at the end of NETGEN 3D spheres mesh while tetrahedrons have been...
authoreap <eap@opencascade.com>
Wed, 20 Feb 2013 08:47:05 +0000 (08:47 +0000)
committereap <eap@opencascade.com>
Wed, 20 Feb 2013 08:47:05 +0000 (08:47 +0000)
  SMESH_Algo::IsReversedSubMesh() is moved to SMESH_MesherHelper

src/StdMeshers/StdMeshers_Prism_3D.cxx
src/StdMeshers/StdMeshers_Projection_2D.cxx
src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx
src/StdMeshers/StdMeshers_ViscousLayers.cxx

index 00a53610546f39a9b6cf983e50dba7ed1accbc78..17c67d6e12cf89b5339ac04199bc34c7e4887ccc 100644 (file)
@@ -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
index 7467a19f9b5a9c913ea337c36cb15fd082ac4337..9742f88400b242f3a2f8fd57a2eb5b0e4bb5eed3 100644 (file)
@@ -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();
index 4c96220ea5297581e5a1ef7dedbd289ec2c88a00..54c3b7609f79c418c945cc1454a0095b68c07c0a 100644 (file)
@@ -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
index a855c24a35a5a3182d9c9bcdc3f96b054ef9a581..b90271fb196e76a9e016320911ffde5811444f1b 100644 (file)
@@ -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