X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Projection_1D2D.cxx;h=73feed3cc3d910346b2908a9d52b91dce50c5b61;hb=88b3dbe23b236bd1746405155ae33a76aaf59ecd;hp=efe6bf034819dd7a5c7a696f65812988343d9b55;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_Projection_1D2D.cxx b/src/StdMeshers/StdMeshers_Projection_1D2D.cxx index efe6bf034..73feed3cc 100644 --- a/src/StdMeshers/StdMeshers_Projection_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_Projection_1D2D.cxx @@ -27,6 +27,7 @@ #include "SMESH_Gen.hxx" #include "SMESH_MesherHelper.hxx" +#include "SMESH_subMesh.hxx" #include "SMESH_subMeshEventListener.hxx" #include "StdMeshers_FaceSide.hxx" #include "StdMeshers_ProjectionSource2D.hxx" @@ -69,7 +70,7 @@ namespace * \brief Structure used to temporary remove EventProparatorToEdges from faceSubMesh * in order to prevent propagation of CLEAN event from FACE to EDGEs during * StdMeshers_Projection_1D2D::Compute(). The CLEAN event is emmited by Pattern mapper - * and causes removal of faces generated on adjacent FACEs. + * and causes removal of faces generated on adjacent FACEs. */ struct UnsetterOfEventProparatorToEdges { @@ -107,9 +108,13 @@ bool StdMeshers_Projection_1D2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape { UnsetterOfEventProparatorToEdges eventBarrier( theMesh.GetSubMesh( theShape )); + // 1) Project faces + if ( !StdMeshers_Projection_2D::Compute(theMesh, theShape)) return false; + // 2) Create segments + SMESHDS_Mesh * meshDS = theMesh.GetMeshDS(); SMESHDS_SubMesh * faceSubMesh = meshDS->MeshElements( theShape ); @@ -172,7 +177,7 @@ bool StdMeshers_Projection_1D2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape meshDS->SetMeshElementOnShape( e, edgeID ); } } - } + } return true; } @@ -194,7 +199,7 @@ bool StdMeshers_Projection_1D2D::Evaluate(SMESH_Mesh& theMesh, if ( !srcMesh ) srcMesh = & theMesh; SMESH_subMesh* srcFaceSM = srcMesh->GetSubMesh( srcFace ); - typedef StdMeshers_ProjectionUtils SPU; + namespace SPU = StdMeshers_ProjectionUtils; SPU::TShapeShapeMap shape2ShapeMap; SPU::InitVertexAssociation( _sourceHypo, shape2ShapeMap ); if ( !SPU::FindSubShapeAssociation( theShape, &theMesh, srcFace, srcMesh, shape2ShapeMap))