X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FBRepMesh%2FBRepMesh_Delaun.cxx;h=5a8d30ffe50a10f75da82f214318a7d9848cc43d;hb=ce97cd97084feb968743b5b5231082af70ba0c78;hpb=99ca2eec6ba136c38e956a1a26c3e822d1ec30b1 diff --git a/src/BRepMesh/BRepMesh_Delaun.cxx b/src/BRepMesh/BRepMesh_Delaun.cxx index f1d4792cd6..5a8d30ffe5 100644 --- a/src/BRepMesh/BRepMesh_Delaun.cxx +++ b/src/BRepMesh/BRepMesh_Delaun.cxx @@ -370,7 +370,7 @@ void BRepMesh_Delaun::compute(IMeshData::VectorOfInteger& theVertexIndexes) createTriangles( theVertexIndexes( anVertexIdx ), aLoopEdges ); // Add other nodes to the mesh - createTrianglesOnNewVertices( theVertexIndexes ); + createTrianglesOnNewVertices (theVertexIndexes, Message_ProgressRange()); } // Destruction of triangles containing a top of the super triangle @@ -523,7 +523,8 @@ void BRepMesh_Delaun::createTriangles(const Standard_Integer theVertexI //purpose : Creation of triangles from the new nodes //======================================================================= void BRepMesh_Delaun::createTrianglesOnNewVertices( - IMeshData::VectorOfInteger& theVertexIndexes) + IMeshData::VectorOfInteger& theVertexIndexes, + const Message_ProgressRange& theRange) { Handle(NCollection_IncAllocator) aAllocator = new NCollection_IncAllocator(IMeshData::MEMORY_BLOCK_SIZE_HUGE); @@ -537,8 +538,13 @@ void BRepMesh_Delaun::createTrianglesOnNewVertices( Standard_Integer anIndex = theVertexIndexes.Lower(); Standard_Integer anUpper = theVertexIndexes.Upper(); - for( ; anIndex <= anUpper; ++anIndex ) + Message_ProgressScope aPS(theRange, "Create triangles on new vertices", anUpper); + for (; anIndex <= anUpper; ++anIndex, aPS.Next()) { + if (!aPS.More()) + { + return; + } aAllocator->Reset(Standard_False); IMeshData::MapOfIntegerInteger aLoopEdges(10, aAllocator); @@ -2207,13 +2213,14 @@ void BRepMesh_Delaun::RemoveVertex( const BRepMesh_Vertex& theVertex ) //function : AddVertices //purpose : Adds some vertices in the triangulation. //======================================================================= -void BRepMesh_Delaun::AddVertices(IMeshData::VectorOfInteger& theVertices) +void BRepMesh_Delaun::AddVertices(IMeshData::VectorOfInteger& theVertices, + const Message_ProgressRange& theRange) { ComparatorOfIndexedVertexOfDelaun aCmp(myMeshData); std::make_heap(theVertices.begin(), theVertices.end(), aCmp); std::sort_heap(theVertices.begin(), theVertices.end(), aCmp); - createTrianglesOnNewVertices(theVertices); + createTrianglesOnNewVertices(theVertices, theRange); } //=======================================================================