0021893: EDF 2133 SMESH : Improvement of 3D extrusion algorithm

StdMeshers_ProjectionUtils::Count() moved to SMESH_MesherHelper::Count()
This commit is contained in:
eap 2013-01-28 08:32:01 +00:00
parent 53b3b75be6
commit 9f2f0a0c1a
2 changed files with 14 additions and 13 deletions

View File

@ -28,6 +28,7 @@
#include "StdMeshers_ProjectionSource2D.hxx"
#include "SMESH_Mesh.hxx"
#include "SMESH_MesherHelper.hxx"
#include "StdMeshers_ProjectionUtils.hxx"
#include "utilities.h"
@ -111,7 +112,7 @@ void StdMeshers_ProjectionSource2D::SetVertexAssociation(const TopoDS_Shape& sou
{
// possibly there is only 1 vertex in the face
if ( !_sourceFace.IsNull() &&
StdMeshers_ProjectionUtils::Count( _sourceFace, TopAbs_VERTEX, /*ignoreSame=*/true) != 1 )
SMESH_MesherHelper::Count( _sourceFace, TopAbs_VERTEX, /*ignoreSame=*/true) != 1 )
throw SALOME_Exception(LOCALIZED("Two or none pairs of vertices must be provided"));
}

View File

@ -219,13 +219,13 @@ bool StdMeshers_Projection_3D::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aS
SMESH_Comment("Target shape must have 1 shell but not ") << nbShell);
// Check that shapes are blocks
if ( TAssocTool::Count( tgtShell, TopAbs_FACE , 1 ) != 6 ||
TAssocTool::Count( tgtShell, TopAbs_EDGE , 1 ) != 12 ||
TAssocTool::Count( tgtShell, TopAbs_WIRE , 1 ) != 6 )
if ( SMESH_MesherHelper::Count( tgtShell, TopAbs_FACE , 1 ) != 6 ||
SMESH_MesherHelper::Count( tgtShell, TopAbs_EDGE , 1 ) != 12 ||
SMESH_MesherHelper::Count( tgtShell, TopAbs_WIRE , 1 ) != 6 )
return error(COMPERR_BAD_SHAPE, "Target shape is not a block");
if ( TAssocTool::Count( srcShell, TopAbs_FACE , 1 ) != 6 ||
TAssocTool::Count( srcShell, TopAbs_EDGE , 1 ) != 12 ||
TAssocTool::Count( srcShell, TopAbs_WIRE , 1 ) != 6 )
if ( SMESH_MesherHelper::Count( srcShell, TopAbs_FACE , 1 ) != 6 ||
SMESH_MesherHelper::Count( srcShell, TopAbs_EDGE , 1 ) != 12 ||
SMESH_MesherHelper::Count( srcShell, TopAbs_WIRE , 1 ) != 6 )
return error(COMPERR_BAD_SHAPE, "Source shape is not a block");
// Assure that mesh on a source shape is computed
@ -459,13 +459,13 @@ bool StdMeshers_Projection_3D::Evaluate(SMESH_Mesh& aMesh,
SMESH_Comment("Target shape must have 1 shell but not ") << nbShell);
// Check that shapes are blocks
if ( TAssocTool::Count( tgtShell, TopAbs_FACE , 1 ) != 6 ||
TAssocTool::Count( tgtShell, TopAbs_EDGE , 1 ) != 12 ||
TAssocTool::Count( tgtShell, TopAbs_WIRE , 1 ) != 6 )
if ( SMESH_MesherHelper::Count( tgtShell, TopAbs_FACE , 1 ) != 6 ||
SMESH_MesherHelper::Count( tgtShell, TopAbs_EDGE , 1 ) != 12 ||
SMESH_MesherHelper::Count( tgtShell, TopAbs_WIRE , 1 ) != 6 )
return error(COMPERR_BAD_SHAPE, "Target shape is not a block");
if ( TAssocTool::Count( srcShell, TopAbs_FACE , 1 ) != 6 ||
TAssocTool::Count( srcShell, TopAbs_EDGE , 1 ) != 12 ||
TAssocTool::Count( srcShell, TopAbs_WIRE , 1 ) != 6 )
if ( SMESH_MesherHelper::Count( srcShell, TopAbs_FACE , 1 ) != 6 ||
SMESH_MesherHelper::Count( srcShell, TopAbs_EDGE , 1 ) != 12 ||
SMESH_MesherHelper::Count( srcShell, TopAbs_WIRE , 1 ) != 6 )
return error(COMPERR_BAD_SHAPE, "Source shape is not a block");
// Assure that mesh on a source shape is computed