mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-30 23:40:34 +05:00
0022124: [CEA 763] Projection 1D does not work with Netgen 1D2D
1) namespace TAssocTool = StdMeshers_ProjectionUtils; 2) Use StdMeshers_ProjectionUtils::SourceNotComputedError()
This commit is contained in:
parent
46c3601d73
commit
9635ee01fa
@ -57,7 +57,8 @@ using namespace std;
|
|||||||
|
|
||||||
#define RETURN_BAD_RESULT(msg) { MESSAGE(")-: Error: " << msg); return false; }
|
#define RETURN_BAD_RESULT(msg) { MESSAGE(")-: Error: " << msg); return false; }
|
||||||
|
|
||||||
typedef StdMeshers_ProjectionUtils TAssocTool;
|
//typedef StdMeshers_ProjectionUtils TAssocTool;
|
||||||
|
namespace TAssocTool = StdMeshers_ProjectionUtils;
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : StdMeshers_Projection_1D
|
//function : StdMeshers_Projection_1D
|
||||||
@ -238,14 +239,18 @@ bool StdMeshers_Projection_1D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
|
|||||||
SMESH_subMesh* srcSubMesh = srcMesh->GetSubMesh( srcEdge );
|
SMESH_subMesh* srcSubMesh = srcMesh->GetSubMesh( srcEdge );
|
||||||
//SMESH_subMesh* tgtSubMesh = tgtMesh->GetSubMesh( tgtEdge );
|
//SMESH_subMesh* tgtSubMesh = tgtMesh->GetSubMesh( tgtEdge );
|
||||||
|
|
||||||
|
string srcMeshError;
|
||||||
if ( tgtMesh == srcMesh ) {
|
if ( tgtMesh == srcMesh ) {
|
||||||
if ( !TAssocTool::MakeComputed( srcSubMesh ))
|
if ( !TAssocTool::MakeComputed( srcSubMesh ))
|
||||||
return error(COMPERR_BAD_INPUT_MESH,"Source mesh not computed");
|
srcMeshError = TAssocTool::SourceNotComputedError( srcSubMesh, this );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( !srcSubMesh->IsMeshComputed() )
|
if ( !srcSubMesh->IsMeshComputed() )
|
||||||
return error(COMPERR_BAD_INPUT_MESH,"Source mesh not computed");
|
srcMeshError = TAssocTool::SourceNotComputedError();
|
||||||
}
|
}
|
||||||
|
if ( !srcMeshError.empty() )
|
||||||
|
return error(COMPERR_BAD_INPUT_MESH, srcMeshError );
|
||||||
|
|
||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
// Find out nodes distribution on the source edge
|
// Find out nodes distribution on the source edge
|
||||||
// -----------------------------------------------
|
// -----------------------------------------------
|
||||||
|
@ -199,7 +199,7 @@ bool StdMeshers_Projection_1D2D::Evaluate(SMESH_Mesh& theMesh,
|
|||||||
if ( !srcMesh ) srcMesh = & theMesh;
|
if ( !srcMesh ) srcMesh = & theMesh;
|
||||||
SMESH_subMesh* srcFaceSM = srcMesh->GetSubMesh( srcFace );
|
SMESH_subMesh* srcFaceSM = srcMesh->GetSubMesh( srcFace );
|
||||||
|
|
||||||
typedef StdMeshers_ProjectionUtils SPU;
|
namespace SPU = StdMeshers_ProjectionUtils;
|
||||||
SPU::TShapeShapeMap shape2ShapeMap;
|
SPU::TShapeShapeMap shape2ShapeMap;
|
||||||
SPU::InitVertexAssociation( _sourceHypo, shape2ShapeMap );
|
SPU::InitVertexAssociation( _sourceHypo, shape2ShapeMap );
|
||||||
if ( !SPU::FindSubShapeAssociation( theShape, &theMesh, srcFace, srcMesh, shape2ShapeMap))
|
if ( !SPU::FindSubShapeAssociation( theShape, &theMesh, srcFace, srcMesh, shape2ShapeMap))
|
||||||
|
@ -62,7 +62,8 @@ using namespace std;
|
|||||||
|
|
||||||
#define RETURN_BAD_RESULT(msg) { MESSAGE(")-: Error: " << msg); return false; }
|
#define RETURN_BAD_RESULT(msg) { MESSAGE(")-: Error: " << msg); return false; }
|
||||||
|
|
||||||
typedef StdMeshers_ProjectionUtils TAssocTool;
|
namespace TAssocTool = StdMeshers_ProjectionUtils;
|
||||||
|
//typedef StdMeshers_ProjectionUtils TAssocTool;
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : StdMeshers_Projection_2D
|
//function : StdMeshers_Projection_2D
|
||||||
@ -824,14 +825,17 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
|
|||||||
SMESH_subMesh* srcSubMesh = srcMesh->GetSubMesh( srcFace );
|
SMESH_subMesh* srcSubMesh = srcMesh->GetSubMesh( srcFace );
|
||||||
SMESH_subMesh* tgtSubMesh = tgtMesh->GetSubMesh( tgtFace );
|
SMESH_subMesh* tgtSubMesh = tgtMesh->GetSubMesh( tgtFace );
|
||||||
|
|
||||||
|
string srcMeshError;
|
||||||
if ( tgtMesh == srcMesh ) {
|
if ( tgtMesh == srcMesh ) {
|
||||||
if ( !TAssocTool::MakeComputed( srcSubMesh ) || !srcSubMesh->IsMeshComputed() )
|
if ( !TAssocTool::MakeComputed( srcSubMesh ))
|
||||||
return error(COMPERR_BAD_INPUT_MESH,"Source mesh not computed");
|
srcMeshError = TAssocTool::SourceNotComputedError( srcSubMesh, this );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( !srcSubMesh->IsMeshComputed() )
|
if ( !srcSubMesh->IsMeshComputed() )
|
||||||
return error(COMPERR_BAD_INPUT_MESH,"Source mesh not computed");
|
srcMeshError = TAssocTool::SourceNotComputedError();
|
||||||
}
|
}
|
||||||
|
if ( !srcMeshError.empty() )
|
||||||
|
return error(COMPERR_BAD_INPUT_MESH, srcMeshError );
|
||||||
|
|
||||||
// ===========
|
// ===========
|
||||||
// Projection
|
// Projection
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
// cout << msg << " ("<< p.X() << "; " <<p.Y() << "; " <<p.Z() << ") " <<endl;\
|
// cout << msg << " ("<< p.X() << "; " <<p.Y() << "; " <<p.Z() << ") " <<endl;\
|
||||||
// }
|
// }
|
||||||
|
|
||||||
typedef StdMeshers_ProjectionUtils TAssocTool;
|
namespace TAssocTool = StdMeshers_ProjectionUtils;
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -233,13 +233,14 @@ bool StdMeshers_Projection_3D::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aS
|
|||||||
SMESH_subMesh* srcSubMesh = srcMesh->GetSubMesh( _sourceHypo->GetSource3DShape() );
|
SMESH_subMesh* srcSubMesh = srcMesh->GetSubMesh( _sourceHypo->GetSource3DShape() );
|
||||||
//SMESH_subMesh* tgtSubMesh = tgtMesh->GetSubMesh( aShape );
|
//SMESH_subMesh* tgtSubMesh = tgtMesh->GetSubMesh( aShape );
|
||||||
|
|
||||||
if ( tgtMesh == srcMesh && !aShape.IsSame( _sourceHypo->GetSource3DShape() )) {
|
string srcMeshError;
|
||||||
|
if ( tgtMesh == srcMesh && !aShape.IsSame( _sourceHypo->GetSource3DShape() )) {
|
||||||
if ( !TAssocTool::MakeComputed( srcSubMesh ))
|
if ( !TAssocTool::MakeComputed( srcSubMesh ))
|
||||||
return error(COMPERR_BAD_INPUT_MESH,"Source mesh not computed");
|
srcMeshError = TAssocTool::SourceNotComputedError( srcSubMesh, this );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( !srcSubMesh->IsMeshComputed() )
|
if ( !srcSubMesh->IsMeshComputed() )
|
||||||
return error(COMPERR_BAD_INPUT_MESH,"Source mesh not computed");
|
srcMeshError = TAssocTool::SourceNotComputedError();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find 2 pairs of corresponding vertices
|
// Find 2 pairs of corresponding vertices
|
||||||
|
Loading…
Reference in New Issue
Block a user