0022005: Error at the end of NETGEN 3D spheres mesh while tetrahedrons have been generated

SMESH_Algo::IsReversedSubMesh() is moved to SMESH_MesherHelper
This commit is contained in:
eap 2013-02-20 08:47:05 +00:00
parent bb00f9a545
commit f35cfb87a0
4 changed files with 8 additions and 8 deletions

View File

@ -1646,7 +1646,7 @@ bool StdMeshers_Prism_3D::projectBottomToTop()
// if the bottom faces is orienetd OK then top faces must be reversed // if the bottom faces is orienetd OK then top faces must be reversed
bool reverseTop = true; bool reverseTop = true;
if ( myHelper->NbAncestors( botFace, *myBlock.Mesh(), TopAbs_SOLID ) > 1 ) 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 ); int iFrw, iRev, *iPtr = &( reverseTop ? iRev : iFrw );
// loop on bottom mesh faces // loop on bottom mesh faces

View File

@ -861,15 +861,15 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
done = projectBy2DSimilarity( tgtFace, srcFace, tgtMesh, srcMesh, shape2ShapeMap, is1DComputed); done = projectBy2DSimilarity( tgtFace, srcFace, tgtMesh, srcMesh, shape2ShapeMap, is1DComputed);
} }
SMESH_MesherHelper helper( theMesh );
helper.SetSubShape( tgtFace );
if ( !done ) if ( !done )
{ {
// -------------------- // --------------------
// Prepare to mapping // Prepare to mapping
// -------------------- // --------------------
SMESH_MesherHelper helper( theMesh );
helper.SetSubShape( tgtFace );
// Check if node projection to a face is needed // Check if node projection to a face is needed
Bnd_B2d uvBox; Bnd_B2d uvBox;
SMDS_ElemIteratorPtr faceIt = srcSubMesh->GetSubMeshDS()->GetElements(); SMDS_ElemIteratorPtr faceIt = srcSubMesh->GetSubMeshDS()->GetElements();
@ -1182,7 +1182,7 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
} }
} }
// Fix orientation // Fix orientation
if ( SMESH_Algo::IsReversedSubMesh( face, meshDS )) if ( helper.IsReversedSubMesh( face ))
{ {
SMESH_MeshEditor editor( tgtMesh ); SMESH_MeshEditor editor( tgtMesh );
SMDS_ElemIteratorPtr eIt = meshDS->MeshElements( face )->GetElements(); SMDS_ElemIteratorPtr eIt = meshDS->MeshElements( face )->GetElements();

View File

@ -756,7 +756,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute(SMESH_Mesh& aMesh,
{ {
bool isRev = false; bool isRev = false;
if ( helper.NbAncestors( aShapeFace, aMesh, aShape.ShapeType() ) > 1 ) 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(); SMDS_ElemIteratorPtr iteratorElem = aSubMeshDSFace->GetElements();
while ( iteratorElem->more() ) // loop on elements on a geometrical face while ( iteratorElem->more() ) // loop on elements on a geometrical face

View File

@ -1096,7 +1096,7 @@ bool _ViscousBuilder::findFacesWithLayers()
{ {
_ignoreShapeIds.insert( faceInd ); _ignoreShapeIds.insert( faceInd );
ignoreFaces.push_back( exp.Current() ); 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 ); _sdVec[i]._reversedFaceIds.insert( faceInd );
} }
} }
@ -4480,7 +4480,7 @@ bool _ViscousBuilder::addBoundaryElements()
reverse = ( helper.GetSubShapeOri( F, E ) == TopAbs_REVERSED ); reverse = ( helper.GetSubShapeOri( F, E ) == TopAbs_REVERSED );
if ( helper.GetSubShapeOri( data._solid, F ) == TopAbs_REVERSED ) if ( helper.GetSubShapeOri( data._solid, F ) == TopAbs_REVERSED )
reverse = !reverse, F.Reverse(); reverse = !reverse, F.Reverse();
if ( SMESH_Algo::IsReversedSubMesh( TopoDS::Face(F), getMeshDS() )) if ( helper.IsReversedSubMesh( TopoDS::Face(F) ))
reverse = !reverse; reverse = !reverse;
} }
else else