Salome HOME
Merge branch 'yan/parallel_mesh2'
[modules/smesh.git] / src / StdMeshers / StdMeshers_Regular_1D.cxx
index bd20e30fa9505e1774ce255d0d792a4fc9261ce2..886f72b63abaedfcf247fd8c31e94be7edada513 100644 (file)
@@ -1182,7 +1182,6 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
 
   SMESHDS_Mesh * meshDS = theMesh.GetMeshDS();
 
-  theMesh.Lock();
   const TopoDS_Edge & EE = TopoDS::Edge(theShape);
   TopoDS_Edge E = TopoDS::Edge(EE.Oriented(TopAbs_FORWARD));
   int shapeID = meshDS->ShapeToIndex( E );
@@ -1197,10 +1196,9 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
   ASSERT(!VLast.IsNull());
   const SMDS_MeshNode * nFirst = SMESH_Algo::VertexNode( VFirst, meshDS );
   const SMDS_MeshNode *  nLast = SMESH_Algo::VertexNode( VLast,  meshDS );
-  if ( !nFirst || !nLast ){
-    theMesh.Unlock();
+  if ( !nFirst || !nLast )
     return error( COMPERR_BAD_INPUT_MESH, "No node on vertex");
-  }
+
   // remove elements created by e.g. pattern mapping (PAL21999)
   // CLEAN event is incorrectly ptopagated seemingly due to Propagation hyp
   // so TEMPORARY solution is to clean the submesh manually
@@ -1244,7 +1242,6 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
 
     BRepAdaptor_Curve C3d( E );
     if ( ! computeInternalParameters( theMesh, C3d, length, f, l, params, reversed, true )) {
-      theMesh.Unlock();
       return false;
     }
     redistributeNearVertices( theMesh, C3d, length, params, VFirst, VLast );
@@ -1335,7 +1332,6 @@ bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
       meshDS->SetMeshElementOnShape(edge, shapeID);
     }
   }
-  theMesh.Unlock();
   return true;
 }