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 );
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
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 );
meshDS->SetMeshElementOnShape(edge, shapeID);
}
}
- theMesh.Unlock();
return true;
}