Salome HOME
Merge from V6_main 01/04/2013
[modules/smesh.git] / src / StdMeshers / StdMeshers_Projection_1D2D.cxx
index 7e5cfe82181ca4f87276f0a52dc5fe1165b5a2b7..b64c5ad9e99f3ee2f8afad07e556108bbec1d45c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -70,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
   {
@@ -108,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 );
@@ -173,7 +177,7 @@ bool StdMeshers_Projection_1D2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape
         meshDS->SetMeshElementOnShape( e, edgeID );
       }
     }
-  }   
+  }
 
   return true;
 }
@@ -195,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))