Salome HOME
Merge from V6_main 28/02/2013
[modules/smesh.git] / src / StdMeshers / StdMeshers_Projection_1D2D.cxx
index efe6bf034819dd7a5c7a696f65812988343d9b55..73feed3cc3d910346b2908a9d52b91dce50c5b61 100644 (file)
@@ -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))