Salome HOME
minor change
[modules/smesh.git] / src / StdMeshers / StdMeshers_Projection_1D.cxx
index 1cb6e21f60cbb39a3e75911475237f10a460356c..40568111a23a0a9c0835d781e71bc3bb39881ca0 100644 (file)
@@ -67,7 +67,7 @@ StdMeshers_Projection_1D::StdMeshers_Projection_1D(int hypId, int studyId, SMESH
   :SMESH_1D_Algo(hypId, studyId, gen)
 {
   _name = "Projection_1D";
-  _shapeType = (1 << TopAbs_EDGE);     // 1 bit per shape type
+  _shapeType = (1 << TopAbs_EDGE);      // 1 bit per shape type
 
   _compatibleHypothesis.push_back("ProjectionSource1D");
   _sourceHypo = 0;
@@ -379,8 +379,8 @@ bool StdMeshers_Projection_1D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
 //=======================================================================
 
 bool StdMeshers_Projection_1D::Evaluate(SMESH_Mesh& theMesh,
-                                       const TopoDS_Shape& theShape,
-                                       MapShapeNbElems& aResMap)
+                                        const TopoDS_Shape& theShape,
+                                        MapShapeNbElems& aResMap)
 {
   if ( !_sourceHypo )
     return false;
@@ -390,7 +390,7 @@ bool StdMeshers_Projection_1D::Evaluate(SMESH_Mesh& theMesh,
   if ( !srcMesh )
     srcMesh = tgtMesh;
 
-  SMESHDS_Mesh * meshDS = theMesh.GetMeshDS();
+  //SMESHDS_Mesh * meshDS = theMesh.GetMeshDS();
 
   // ---------------------------
   // Make subshapes association
@@ -433,8 +433,8 @@ bool StdMeshers_Projection_1D::Evaluate(SMESH_Mesh& theMesh,
   // Find out nodes distribution on the source edge
   // -----------------------------------------------
 
-  double srcLength = EdgeLength( srcEdge );
-  double tgtLength = EdgeLength( tgtEdge );
+  //double srcLength = EdgeLength( srcEdge );
+  //double tgtLength = EdgeLength( tgtEdge );
   
   vector< double > params; // sorted parameters of nodes on the source edge
   if ( !SMESH_Algo::GetNodeParamOnEdge( srcMesh->GetMeshDS(), srcEdge, params ))
@@ -442,19 +442,19 @@ bool StdMeshers_Projection_1D::Evaluate(SMESH_Mesh& theMesh,
 
   int nbNodes = params.size();
 
-  std::vector<int> aVec(17);
-  for(int i=0; i<17; i++) aVec[i] = 0;
+  std::vector<int> aVec(SMDSEntity_Last);
+  for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i] = 0;
 
-  aVec[0] = nbNodes;
+  aVec[SMDSEntity_Node] = nbNodes;
 
   bool quadratic = false;
   SMDS_ElemIteratorPtr elemIt = srcSubMesh->GetSubMeshDS()->GetElements();
   if ( elemIt->more() )
     quadratic = elemIt->next()->IsQuadratic();
   if(quadratic)
-    aVec[2] = (nbNodes-1)/2;
+    aVec[SMDSEntity_Quad_Edge] = (nbNodes-1)/2;
   else
-    aVec[1] = nbNodes - 1;
+    aVec[SMDSEntity_Edge] = nbNodes - 1;
 
   SMESH_subMesh * sm = theMesh.GetSubMesh(theShape);
   aResMap.insert(std::make_pair(sm,aVec));