]> OCCT Git - occt-copy.git/commitdiff
0025116: BRepTools - do not force Message_ProgressIndicator updates on each minor...
authorkgv <kgv@opencascade.com>
Thu, 31 Jul 2014 12:12:45 +0000 (16:12 +0400)
committerapv <apv@opencascade.com>
Thu, 7 Aug 2014 10:02:06 +0000 (14:02 +0400)
src/BRepTools/BRepTools_ShapeSet.cxx
src/GeomTools/GeomTools_Curve2dSet.cxx
src/GeomTools/GeomTools_CurveSet.cxx
src/GeomTools/GeomTools_SurfaceSet.cxx
src/TopTools/TopTools_LocationSet.cxx
src/TopTools/TopTools_ShapeSet.cxx

index 2ca436a1a612d477f6cc664998ab265b327b4290..c7c225c8b4461c0b30516713c5e88a46f7504f82 100644 (file)
@@ -1238,11 +1238,7 @@ void BRepTools_ShapeSet::WritePolygonOnTriangulation(Standard_OStream&      OS,
 
   Handle(Poly_PolygonOnTriangulation) Poly;
   Handle(TColStd_HArray1OfReal) Param;
-
   for (i=1; i<=nbpOntri && PS.More(); i++, PS.Next()) {
-    if ( !progress.IsNull() ) 
-      progress->Show();
-
     Poly = Handle(Poly_PolygonOnTriangulation)::DownCast(myNodes(i));
     const TColStd_Array1OfInteger& Nodes = Poly->Nodes();
     if (!Compact) {
@@ -1305,9 +1301,6 @@ void BRepTools_ShapeSet::ReadPolygonOnTriangulation(Standard_IStream& IS)
   Handle(Message_ProgressIndicator) progress = GetProgress();
   Message_ProgressSentry PS(progress, "Polygons On Triangulation", 0, nbpol, 1);
   for (i=1; i<=nbpol&& PS.More(); i++, PS.Next()) {
-    if ( !progress.IsNull() ) 
-      progress->Show();
-
     IS >> nbnodes;
     TColStd_Array1OfInteger Nodes(1, nbnodes);
     for (j = 1; j <= nbnodes; j++) {
@@ -1365,9 +1358,6 @@ void BRepTools_ShapeSet::WritePolygon3D(Standard_OStream&      OS,
   
   Handle(Poly_Polygon3D) P;
   for (i = 1; i <= nbpol && PS.More(); i++, PS.Next()) {
-    if ( !progress.IsNull() ) 
-      progress->Show();
-
     P = Handle(Poly_Polygon3D)::DownCast(myPolygons3D(i));
     if (Compact) {
       OS << P->NbNodes() << " ";
@@ -1443,9 +1433,6 @@ void BRepTools_ShapeSet::ReadPolygon3D(Standard_IStream& IS)
   Handle(Message_ProgressIndicator) progress = GetProgress();
   Message_ProgressSentry PS(progress, "3D Polygons", 0, nbpol, 1);
   for (i=1; i<=nbpol && PS.More(); i++, PS.Next()) {
-    if ( !progress.IsNull() ) 
-      progress->Show();
-
     IS >> nbnodes;
     IS >> hasparameters;
     TColgp_Array1OfPnt Nodes(1, nbnodes);
@@ -1490,11 +1477,9 @@ void BRepTools_ShapeSet::WriteTriangulation(Standard_OStream&      OS,
     OS <<"Dump of " << nbtri << " Triangulations\n";
     OS << " -------\n";
   }
-  
+
   Handle(Poly_Triangulation) T;
   for (i = 1; i <= nbtri && PS.More(); i++, PS.Next()) {
-    if ( !progress.IsNull() ) 
-      progress->Show();
 
     T = Handle(Poly_Triangulation)::DownCast(myTriangulations(i));
     if (Compact) {
@@ -1599,8 +1584,6 @@ void BRepTools_ShapeSet::ReadTriangulation(Standard_IStream& IS)
   Handle(Message_ProgressIndicator) progress = GetProgress();
   Message_ProgressSentry PS(progress, "Triangulations", 0, nbtri, 1);
   for (i=1; i<=nbtri && PS.More();i++, PS.Next()) {
-    if ( !progress.IsNull() )  
-      progress->Show();
 
     IS >> nbNodes >> nbTriangles >> hasUV;
     IS >> d;
@@ -1636,5 +1619,3 @@ void BRepTools_ShapeSet::ReadTriangulation(Standard_IStream& IS)
     myTriangulations.Add(T);
   }
 }
-
-
index a3feb3e532b0e88f3be60d7c340af0a3af2f8c69..7897e4b7f7037c659211a0109c7510382a2ab73c 100644 (file)
@@ -504,13 +504,9 @@ void  GeomTools_Curve2dSet::Write(Standard_OStream& OS)const
   //OCC19559
   Handle(Message_ProgressIndicator) progress = GetProgress();
   Message_ProgressSentry PS(progress, "2D Curves", 0, nbsurf, 1);
-
   for (i = 1; i <= nbsurf && PS.More(); i++, PS.Next()) {
-    if ( !myProgress.IsNull() ) 
-      progress->Show();
     PrintCurve2d(Handle(Geom2d_Curve)::DownCast(myMap(i)),OS,Standard_True);
   }
-
   OS.precision(prec);
 }
 
@@ -851,11 +847,7 @@ void  GeomTools_Curve2dSet::Read(Standard_IStream& IS)
   //OCC19559
   Handle(Message_ProgressIndicator) progress = GetProgress();
   Message_ProgressSentry PS(progress, "2D Curves", 0, nbcurve, 1);
-
   for (i = 1; i <= nbcurve && PS.More(); i++, PS.Next()) {
-    if ( !myProgress.IsNull() ) 
-      progress->Show();
-    
     GeomTools_Curve2dSet::ReadCurve2d(IS,C);
     myMap.Add(C);
   }
index a87255905230bc02c595950006f24e68301812b1..3d8cd71a770eb9b705c9c41c2b662d72066d317a 100644 (file)
@@ -521,14 +521,9 @@ void  GeomTools_CurveSet::Write(Standard_OStream& OS)const
     //OCC19559
   Handle(Message_ProgressIndicator) progress = GetProgress();
   Message_ProgressSentry PS(progress, "3D Curves", 0, nbcurve, 1);
-
   for (i = 1; i <= nbcurve && PS.More(); i++, PS.Next()) {
-    if ( !progress.IsNull() ) 
-      progress->Show();
-
     PrintCurve(Handle(Geom_Curve)::DownCast(myMap(i)),OS,Standard_True);
   }
-
   OS.precision(prec);
 }
 
@@ -872,9 +867,6 @@ void  GeomTools_CurveSet::Read(Standard_IStream& IS)
   Handle(Message_ProgressIndicator) progress = GetProgress();
   Message_ProgressSentry PS(progress, "3D Curves", 0, nbcurve, 1);
   for (i = 1; i <= nbcurve && PS.More(); i++, PS.Next()) {
-    if ( !progress.IsNull() ) 
-      progress->Show();
-
     GeomTools_CurveSet::ReadCurve(IS,C);
     myMap.Add(C);
   }
index bdedce937ce0deda326228e52de8e0899e427d09..bda21b0a68d4e98fed9df4ff202b76041b90ca41 100644 (file)
@@ -641,14 +641,9 @@ void  GeomTools_SurfaceSet::Write(Standard_OStream& OS)const
   //OCC19559
   Handle(Message_ProgressIndicator) progress = GetProgress();
   Message_ProgressSentry PS(progress, "Surfaces", 0, nbsurf, 1);
-
   for (i = 1; i <= nbsurf && PS.More(); i++, PS.Next()) {
-    if ( !progress.IsNull() ) 
-      progress->Show();
-
     PrintSurface(Handle(Geom_Surface)::DownCast(myMap(i)),OS,Standard_True);
   }
-
   OS.precision(prec);
 }
 
@@ -1062,9 +1057,6 @@ void  GeomTools_SurfaceSet::Read(Standard_IStream& IS)
   Handle(Message_ProgressIndicator) progress = GetProgress();
   Message_ProgressSentry PS(progress, "Surfaces", 0, nbsurf, 1);
   for (i = 1; i <= nbsurf && PS.More(); i++, PS.Next()) {
-    if ( !progress.IsNull() ) 
-      progress->Show();
-
     GeomTools_SurfaceSet::ReadSurface(IS,S);
     myMap.Add(S);
   }
index 1754e5ff7dbf18fba4221e1914c1c25b2d8d4a40..23e16d901bc0155aee34e35393e1d2e81c4429bc 100644 (file)
@@ -180,11 +180,7 @@ void  TopTools_LocationSet::Write(Standard_OStream& OS) const
   
   //OCC19559
   Message_ProgressSentry PS(GetProgress(), "Locations", 0, nbLoc, 1);
-  
   for (i = 1; i <= nbLoc && PS.More(); i++, PS.Next()) {
-    if ( !GetProgress().IsNull() ) 
-      GetProgress()->Show();
-
     TopLoc_Location L = myMap(i);
 
     
@@ -261,9 +257,6 @@ void  TopTools_LocationSet::Read(Standard_IStream& IS)
   //OCC19559
   Message_ProgressSentry PS(GetProgress(), "Locations", 0, nbLoc, 1);
   for (i = 1; i <= nbLoc&& PS.More(); i++, PS.Next()) {
-    if ( !GetProgress().IsNull() ) 
-      GetProgress()->Show();
-
     Standard_Integer typLoc;
     IS >> typLoc;
     
index ac5738547463629078334455e1d4d22d6555bdd7..5c7484820bf893bacbe18000947545e6bdfd24d0 100644 (file)
@@ -499,11 +499,7 @@ void  TopTools_ShapeSet::Write(Standard_OStream& OS)
   if ( !myProgress.IsNull() ) 
     myProgress->NewScope ( 15, "Shapes" );
   Message_ProgressSentry PS(myProgress, "Shapes", 0, nbShapes, 1);
-
   for (i = 1; i <= nbShapes && PS.More(); i++, PS.Next()) {
-    if ( !myProgress.IsNull() ) 
-      myProgress->Show();
-
     const TopoDS_Shape& S = myShapes(i);
     
     // Type
@@ -687,8 +683,6 @@ void  TopTools_ShapeSet::Read(Standard_IStream& IS)
     myProgress->NewScope ( 15, "Shapes" );
   Message_ProgressSentry PS(myProgress, "Shapes", 0, nbShapes, 1);
   for (i = 1; i <= nbShapes && PS.More(); i++, PS.Next() ) {
-    if ( !myProgress.IsNull() ) 
-      myProgress->Show();
     TopoDS_Shape S;
     
     //Read type and create empty shape.