1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025748: Parallel version of progress indicator

Progress indication mechanism is refactored to support incrementing progress within multithreaded algorithms.

The class Message_ProgressIndicator is only an interface to the user application.
It accumulates the progress provided by progress scopes.
The counter is protected by mutex for thread-safety.

The new class Message_ProgressScope replacing Message_ProgressSentry should be used to advance the progress.
The scopes are nested to each other to reflect the nested nature of operations.
The new class Message_ProgressRange should be used to pass the progress to sub-scopes.

All OCCT algorithms involving progress indication have been updated to new API.

Improvements in Draw_ProgressIndicator:
- Separate console mode has been added in order to make possible to put the progress into std::cout instead
  or in addition to the draw interpreter, instead of trigger option "-tclOutput".
- Treatment of Ctrl-Break signal has been added.
  Now any operation can be aborted by Ctrl-C or Ctrl-Break keystroke.

Added new test case 'perf fclasses progr_par' for testing of parallel work of the progress.
This commit is contained in:
msv
2020-07-10 14:19:31 +03:00
committed by abv
parent 99289bed0a
commit 7e785937b3
271 changed files with 3701 additions and 3149 deletions

View File

@@ -667,7 +667,7 @@ void BRepTools::Dump(const TopoDS_Shape& Sh, Standard_OStream& S)
//=======================================================================
void BRepTools::Write(const TopoDS_Shape& Sh, Standard_OStream& S,
const Handle(Message_ProgressIndicator)& theProgress)
const Message_ProgressRange& theProgress)
{
BRepTools_ShapeSet SS;
SS.Add(Sh);
@@ -684,7 +684,7 @@ void BRepTools::Write(const TopoDS_Shape& Sh, Standard_OStream& S,
void BRepTools::Read(TopoDS_Shape& Sh,
std::istream& S,
const BRep_Builder& B,
const Handle(Message_ProgressIndicator)& theProgress)
const Message_ProgressRange& theProgress)
{
BRepTools_ShapeSet SS(B);
SS.Read(S, theProgress);
@@ -698,7 +698,7 @@ void BRepTools::Read(TopoDS_Shape& Sh,
Standard_Boolean BRepTools::Write(const TopoDS_Shape& Sh,
const Standard_CString File,
const Handle(Message_ProgressIndicator)& theProgress)
const Message_ProgressRange& theProgress)
{
std::ofstream os;
OSD_OpenStream(os, File, std::ios::out);
@@ -735,7 +735,7 @@ Standard_Boolean BRepTools::Write(const TopoDS_Shape& Sh,
Standard_Boolean BRepTools::Read(TopoDS_Shape& Sh,
const Standard_CString File,
const BRep_Builder& B,
const Handle(Message_ProgressIndicator)& theProgress)
const Message_ProgressRange& theProgress)
{
std::filebuf fic;
std::istream in(&fic);

View File

@@ -27,8 +27,7 @@
#include <Standard_OStream.hxx>
#include <Standard_IStream.hxx>
#include <Standard_CString.hxx>
#include <Message_ProgressIndicator.hxx>
#include <Message_ProgressRange.hxx>
class TopoDS_Face;
class TopoDS_Wire;
@@ -207,23 +206,22 @@ public:
//! Writes <Sh> on <S> in an ASCII format.
Standard_EXPORT static void Write (const TopoDS_Shape& Sh, Standard_OStream& S,
const Handle(Message_ProgressIndicator)& theProgress = NULL);
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Reads a Shape from <S> in returns it in <Sh>.
//! <B> is used to build the shape.
Standard_EXPORT static void Read (TopoDS_Shape& Sh, Standard_IStream& S, const BRep_Builder& B,
const Handle(Message_ProgressIndicator)& theProgress = NULL);
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Writes <Sh> in <File>.
Standard_EXPORT static Standard_Boolean Write
(const TopoDS_Shape& Sh, const Standard_CString File,
const Handle(Message_ProgressIndicator)& theProgress = NULL);
Standard_EXPORT static Standard_Boolean Write (const TopoDS_Shape& Sh, const Standard_CString File,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Reads a Shape from <File>, returns it in <Sh>.
//! <B> is used to build the shape.
Standard_EXPORT static Standard_Boolean Read
(TopoDS_Shape& Sh, const Standard_CString File, const BRep_Builder& B,
const Handle(Message_ProgressIndicator)& theProgress = NULL);
Standard_EXPORT static Standard_Boolean Read (TopoDS_Shape& Sh, const Standard_CString File,
const BRep_Builder& B,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Evals real tolerance of edge <theE>.
//! <theC3d>, <theC2d>, <theS>, <theF>, <theL> are
@@ -253,8 +251,18 @@ public:
Standard_EXPORT static void RemoveInternals (TopoDS_Shape& theS,
const Standard_Boolean theForce = Standard_False);
protected:
private:
friend class BRepTools_WireExplorer;
friend class BRepTools_Modification;
friend class BRepTools_Modifier;

View File

@@ -18,7 +18,6 @@
#include <BRepTools_Modification.hxx>
#include <BRepTools_Modifier.hxx>
#include <Message_ProgressIndicator.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_NullObject.hxx>
#include <TColStd_ListIteratorOfListOfTransient.hxx>
@@ -54,7 +53,7 @@
#include <Standard_NullObject.hxx>
#include <gp_Trsf.hxx>
#include <BRepTools_TrsfModification.hxx>
#include <Message_ProgressSentry.hxx>
#include <Message_ProgressScope.hxx>
#include <Geom_Surface.hxx>
static void SetShapeFlags(const TopoDS_Shape& theInSh, TopoDS_Shape& theOutSh);
@@ -116,7 +115,8 @@ void BRepTools_Modifier::Init(const TopoDS_Shape& S)
static TopTools_IndexedMapOfShape MapE, MapF;
#endif
void BRepTools_Modifier::Perform(const Handle(BRepTools_Modification)& M, const Handle(Message_ProgressIndicator) & aProgress)
void BRepTools_Modifier::Perform(const Handle(BRepTools_Modification)& M,
const Message_ProgressRange& theProgress)
{
if (myShape.IsNull()) {
throw Standard_NullObject();
@@ -128,7 +128,7 @@ void BRepTools_Modifier::Perform(const Handle(BRepTools_Modification)& M, const
#endif
TopTools_DataMapIteratorOfDataMapOfShapeShape theIter(myMap);
Message_ProgressSentry aPSentry(aProgress, "Converting Shape", 0, 2, 1);
Message_ProgressScope aPS(theProgress, "Converting Shape", 2);
TopTools_IndexedDataMapOfShapeListOfShape aMVE, aMEF;
TopExp::MapShapesAndAncestors(myShape, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
@@ -144,16 +144,14 @@ void BRepTools_Modifier::Perform(const Handle(BRepTools_Modification)& M, const
CreateOtherVertices(aMVE, aMEF, M);
Standard_Boolean aNewGeom;
Rebuild(myShape, M, aNewGeom, aProgress);
Rebuild(myShape, M, aNewGeom, aPS.Next());
if (!aPSentry.More())
if (!aPS.More())
{
// The processing was broken
return;
}
aPSentry.Next();
if (myShape.ShapeType() == TopAbs_FACE) {
if (myShape.Orientation() == TopAbs_REVERSED) {
myMap(myShape).Reverse();
@@ -242,7 +240,7 @@ Standard_Boolean BRepTools_Modifier::Rebuild
(const TopoDS_Shape& S,
const Handle(BRepTools_Modification)& M,
Standard_Boolean& theNewGeom,
const Handle(Message_ProgressIndicator)& aProgress)
const Message_ProgressRange& theProgress)
{
#ifdef DEBUG_Modifier
int iF = MapF.Contains(S) ? MapF.FindIndex(S) : 0;
@@ -357,16 +355,16 @@ Standard_Boolean BRepTools_Modifier::Rebuild
for (it.Initialize(S, Standard_False); it.More(); it.Next()) ++aShapeCount;
}
Message_ProgressSentry aPSentry(aProgress, "Converting SubShapes", 0, aShapeCount, 1);
Message_ProgressScope aPS(theProgress, "Converting SubShapes", aShapeCount);
//
for (it.Initialize(S, Standard_False); it.More() && aPSentry.More(); it.Next(), aPSentry.Next()) {
for (it.Initialize(S, Standard_False); it.More() && aPS.More(); it.Next()) {
// always call Rebuild
Standard_Boolean isSubNewGeom = Standard_False;
Standard_Boolean subrebuilt = Rebuild(it.Value(), M, isSubNewGeom, aProgress);
Standard_Boolean subrebuilt = Rebuild(it.Value(), M, isSubNewGeom, aPS.Next());
rebuild = subrebuilt || rebuild ;
theNewGeom = theNewGeom || isSubNewGeom;
}
if (!aPSentry.More())
if (!aPS.More())
{
// The processing was broken
return Standard_False;

View File

@@ -29,17 +29,16 @@
#include <TopoDS_Vertex.hxx>
#include <Standard_Boolean.hxx>
#include <Message_ProgressIndicator.hxx>
#include <NCollection_DataMap.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_ShapeMapHasher.hxx>
#include <TopLoc_Location.hxx>
#include <Message_ProgressRange.hxx>
class Standard_NullObject;
class Standard_NoSuchObject;
class TopoDS_Shape;
class BRepTools_Modification;
class Message_ProgressIndicator;
class Geom_Curve;
class Geom_Surface;
@@ -64,7 +63,8 @@ public:
Standard_EXPORT void Init (const TopoDS_Shape& S);
//! Performs the modifications described by <M>.
Standard_EXPORT void Perform (const Handle(BRepTools_Modification)& M, const Handle(Message_ProgressIndicator)& aProgress = NULL);
Standard_EXPORT void Perform (const Handle(BRepTools_Modification)& M,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Returns Standard_True if the modification has
//! been computed successfully.
@@ -109,7 +109,7 @@ private:
Standard_EXPORT Standard_Boolean Rebuild (const TopoDS_Shape& S,
const Handle(BRepTools_Modification)& M,
Standard_Boolean& theNewGeom,
const Handle(Message_ProgressIndicator)& aProgress = NULL);
const Message_ProgressRange& theProgress = Message_ProgressRange());
Standard_EXPORT void CreateNewVertices(
const TopTools_IndexedDataMapOfShapeListOfShape& theMVE,

View File

@@ -39,8 +39,7 @@
#include <BRepTools.hxx>
#include <BRepTools_ShapeSet.hxx>
#include <GeomTools.hxx>
#include <Message_ProgressIndicator.hxx>
#include <Message_ProgressSentry.hxx>
#include <Message_ProgressScope.hxx>
#include <Poly.hxx>
#include <Poly_Polygon2D.hxx>
#include <Poly_Polygon3D.hxx>
@@ -246,32 +245,27 @@ void BRepTools_ShapeSet::DumpGeometry (Standard_OStream& OS)const
//purpose :
//=======================================================================
void BRepTools_ShapeSet::WriteGeometry (Standard_OStream& OS,
const Handle(Message_ProgressIndicator)& theProgress)
void BRepTools_ShapeSet::WriteGeometry(Standard_OStream& OS, const Message_ProgressRange& theProgress)
{
//OCC19559
Message_ProgressSentry aPS(theProgress, "Writing geometry", 0, 6, 1);
myCurves2d.Write (OS, theProgress);
if (!aPS.More())
return;
aPS.Next();
myCurves.Write (OS, theProgress);
if (!aPS.More())
return;
aPS.Next();
WritePolygon3D (OS, true, theProgress);
if (!aPS.More())
return;
aPS.Next();
WritePolygonOnTriangulation (OS, true, theProgress);
if (!aPS.More())
return;
aPS.Next();
mySurfaces.Write (OS, theProgress);
if (!aPS.More())
return;
aPS.Next();
WriteTriangulation (OS, true, theProgress);
// Make nested progress scope for processing geometry
Message_ProgressScope aPS(theProgress, "Geometry", 100);
myCurves2d.Write(OS, aPS.Next(20));
if (aPS.UserBreak()) return;
myCurves.Write(OS, aPS.Next(20));
if (aPS.UserBreak()) return;
WritePolygon3D(OS, Standard_True, aPS.Next(10));
if (aPS.UserBreak()) return;
WritePolygonOnTriangulation(OS, Standard_True, aPS.Next(10));
if (aPS.UserBreak()) return;
mySurfaces.Write(OS, aPS.Next(20));
if (aPS.UserBreak()) return;
WriteTriangulation(OS, Standard_True, aPS.Next(20));
}
@@ -280,35 +274,27 @@ void BRepTools_ShapeSet::WriteGeometry (Standard_OStream& OS,
//purpose :
//=======================================================================
void BRepTools_ShapeSet::ReadGeometry (Standard_IStream& IS,
const Handle(Message_ProgressIndicator) &theProgress)
void BRepTools_ShapeSet::ReadGeometry(Standard_IStream& IS, const Message_ProgressRange& theProgress)
{
//OCC19559
Message_ProgressSentry aPS(theProgress, "Reading geometry", 0, 6, 1);
myCurves2d.Read(IS, theProgress);
if (!aPS.More())
return;
aPS.Next();
myCurves.Read(IS, theProgress);
if (!aPS.More())
return;
aPS.Next();
ReadPolygon3D(IS, theProgress);
if (!aPS.More())
return;
aPS.Next();
ReadPolygonOnTriangulation(IS, theProgress);
if (!aPS.More())
return;
aPS.Next();
mySurfaces.Read(IS, theProgress);
if (!aPS.More())
return;
aPS.Next();
ReadTriangulation(IS, theProgress);
if (!aPS.More())
return;
aPS.Next();
// Make nested progress scope for processing geometry
Message_ProgressScope aPS(theProgress, "Geometry", 100);
myCurves2d.Read(IS, aPS.Next(20));
if (aPS.UserBreak()) return;
myCurves.Read(IS, aPS.Next(20));
if (aPS.UserBreak()) return;
ReadPolygon3D(IS, aPS.Next(15));
if (aPS.UserBreak()) return;
ReadPolygonOnTriangulation(IS, aPS.Next(15));
if (aPS.UserBreak()) return;
mySurfaces.Read(IS, aPS.Next(15));
if (aPS.UserBreak()) return;
ReadTriangulation(IS, aPS.Next(15));
}
//=======================================================================
@@ -1168,13 +1154,13 @@ void BRepTools_ShapeSet::Check(const TopAbs_ShapeEnum T,
//purpose :
//=======================================================================
void BRepTools_ShapeSet::WritePolygonOnTriangulation (Standard_OStream& OS,
const Standard_Boolean Compact,
const Handle(Message_ProgressIndicator)& theProgress)const
void BRepTools_ShapeSet::WritePolygonOnTriangulation(Standard_OStream& OS,
const Standard_Boolean Compact,
const Message_ProgressRange& theProgress)const
{
Standard_Integer i, j, nbpOntri = myNodes.Extent();
Message_ProgressSentry PS(theProgress, "Polygons On Triangulation", 0, nbpOntri, 1);
Message_ProgressScope aPS(theProgress, "Polygons On Triangulation", nbpOntri);
if (Compact)
OS << "PolygonOnTriangulations " << nbpOntri << "\n";
else {
@@ -1185,7 +1171,7 @@ void BRepTools_ShapeSet::WritePolygonOnTriangulation (Standard_OStream&
Handle(Poly_PolygonOnTriangulation) Poly;
Handle(TColStd_HArray1OfReal) Param;
for (i=1; i<=nbpOntri && PS.More(); i++, PS.Next()) {
for (i=1; i<=nbpOntri && aPS.More(); i++, aPS.Next()) {
Poly = Handle(Poly_PolygonOnTriangulation)::DownCast(myNodes(i));
const TColStd_Array1OfInteger& Nodes = Poly->Nodes();
if (!Compact) {
@@ -1233,8 +1219,8 @@ void BRepTools_ShapeSet::DumpPolygonOnTriangulation(Standard_OStream& OS)const
//purpose :
//=======================================================================
void BRepTools_ShapeSet::ReadPolygonOnTriangulation (Standard_IStream& IS,
const Handle(Message_ProgressIndicator) &theProgress)
void BRepTools_ShapeSet::ReadPolygonOnTriangulation(Standard_IStream& IS,
const Message_ProgressRange& theProgress)
{
char buffer[255];
IS >> buffer;
@@ -1246,8 +1232,8 @@ void BRepTools_ShapeSet::ReadPolygonOnTriangulation (Standard_IStream& IS,
Handle(Poly_PolygonOnTriangulation) Poly;
IS >> nbpol;
//OCC19559
Message_ProgressSentry PS(theProgress, "Polygons On Triangulation", 0, nbpol, 1);
for (i=1; i<=nbpol&& PS.More(); i++, PS.Next()) {
Message_ProgressScope aPS(theProgress, "Polygons On Triangulation", nbpol);
for (i=1; i<=nbpol&& aPS.More(); i++, aPS.Next()) {
IS >> nbnodes;
TColStd_Array1OfInteger Nodes(1, nbnodes);
for (j = 1; j <= nbnodes; j++) {
@@ -1287,13 +1273,13 @@ void BRepTools_ShapeSet::ReadPolygonOnTriangulation (Standard_IStream& IS,
//purpose :
//=======================================================================
void BRepTools_ShapeSet::WritePolygon3D (Standard_OStream& OS,
const Standard_Boolean Compact,
const Handle(Message_ProgressIndicator) &theProgress)const
void BRepTools_ShapeSet::WritePolygon3D(Standard_OStream& OS,
const Standard_Boolean Compact,
const Message_ProgressRange& theProgress)const
{
Standard_Integer i, j, nbpol = myPolygons3D.Extent();
Message_ProgressSentry PS(theProgress, "3D Polygons", 0, nbpol, 1);
Message_ProgressScope aPS(theProgress, "3D Polygons", nbpol);
if (Compact)
OS << "Polygon3D " << nbpol << "\n";
@@ -1304,7 +1290,7 @@ void BRepTools_ShapeSet::WritePolygon3D (Standard_OStream& OS,
}
Handle(Poly_Polygon3D) P;
for (i = 1; i <= nbpol && PS.More(); i++, PS.Next()) {
for (i = 1; i <= nbpol && aPS.More(); i++, aPS.Next()) {
P = Handle(Poly_Polygon3D)::DownCast(myPolygons3D(i));
if (Compact) {
OS << P->NbNodes() << " ";
@@ -1365,8 +1351,7 @@ void BRepTools_ShapeSet::DumpPolygon3D(Standard_OStream& OS)const
//purpose :
//=======================================================================
void BRepTools_ShapeSet::ReadPolygon3D (Standard_IStream& IS,
const Handle(Message_ProgressIndicator)& theProgress)
void BRepTools_ShapeSet::ReadPolygon3D(Standard_IStream& IS, const Message_ProgressRange& theProgress)
{
char buffer[255];
// Standard_Integer i, j, p, val, nbpol, nbnodes, hasparameters;
@@ -1378,8 +1363,8 @@ void BRepTools_ShapeSet::ReadPolygon3D (Standard_IStream&
Handle(Poly_Polygon3D) P;
IS >> nbpol;
//OCC19559
Message_ProgressSentry PS(theProgress, "3D Polygons", 0, nbpol, 1);
for (i=1; i<=nbpol && PS.More(); i++, PS.Next()) {
Message_ProgressScope aPS(theProgress, "3D Polygons", nbpol);
for (i=1; i<=nbpol && aPS.More(); i++, aPS.Next()) {
IS >> nbnodes;
IS >> hasparameters;
TColgp_Array1OfPnt Nodes(1, nbnodes);
@@ -1412,12 +1397,12 @@ void BRepTools_ShapeSet::ReadPolygon3D (Standard_IStream&
void BRepTools_ShapeSet::WriteTriangulation(Standard_OStream& OS,
const Standard_Boolean Compact,
const Handle(Message_ProgressIndicator) &theProgress)const
const Message_ProgressRange& theProgress)const
{
Standard_Integer i, j, nbNodes, nbtri = myTriangulations.Extent();
Standard_Integer nbTriangles = 0, n1, n2, n3;
Message_ProgressSentry PS(theProgress, "Triangulations", 0, nbtri, 1);
Message_ProgressScope aPS(theProgress, "Triangulations", nbtri);
if (Compact)
OS << "Triangulations " << nbtri << "\n";
@@ -1428,7 +1413,7 @@ void BRepTools_ShapeSet::WriteTriangulation(Standard_OStream& OS,
}
Handle(Poly_Triangulation) T;
for (i = 1; i <= nbtri && PS.More(); i++, PS.Next()) {
for (i = 1; i <= nbtri && aPS.More(); i++, aPS.Next()) {
T = Handle(Poly_Triangulation)::DownCast(myTriangulations(i));
if (Compact) {
@@ -1514,8 +1499,7 @@ void BRepTools_ShapeSet::DumpTriangulation(Standard_OStream& OS)const
//purpose :
//=======================================================================
void BRepTools_ShapeSet::ReadTriangulation (Standard_IStream& IS,
const Handle(Message_ProgressIndicator) &theProgress)
void BRepTools_ShapeSet::ReadTriangulation(Standard_IStream& IS, const Message_ProgressRange& theProgress)
{
char buffer[255];
// Standard_Integer i, j, val, nbtri;
@@ -1531,8 +1515,8 @@ void BRepTools_ShapeSet::ReadTriangulation (Standard_IStream& IS,
IS >> nbtri;
//OCC19559
Message_ProgressSentry PS(theProgress, "Triangulations", 0, nbtri, 1);
for (i=1; i<=nbtri && PS.More();i++, PS.Next()) {
Message_ProgressScope aPS(theProgress, "Triangulations", nbtri);
for (i=1; i<=nbtri && aPS.More();i++, aPS.Next()) {
IS >> nbNodes >> nbTriangles >> hasUV;
GeomTools::GetReal(IS, d);

View File

@@ -67,28 +67,23 @@ public:
//! Writes the geometry of me on the stream <OS> in a
//! format that can be read back by Read.
Standard_EXPORT virtual void WriteGeometry
(Standard_OStream& OS,
const Handle(Message_ProgressIndicator) &theProgress = NULL) Standard_OVERRIDE;
Standard_EXPORT virtual void WriteGeometry (Standard_OStream& OS,
const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
//! Reads the geometry of me from the stream <IS>.
Standard_EXPORT virtual void ReadGeometry
(Standard_IStream& IS,
const Handle(Message_ProgressIndicator) &theProgress = NULL) Standard_OVERRIDE;
Standard_EXPORT virtual void ReadGeometry (Standard_IStream& IS,
const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
//! Dumps the geometry of <S> on the stream <OS>.
Standard_EXPORT virtual void DumpGeometry
(const TopoDS_Shape& S, Standard_OStream& OS) const Standard_OVERRIDE;
Standard_EXPORT virtual void DumpGeometry (const TopoDS_Shape& S, Standard_OStream& OS) const Standard_OVERRIDE;
//! Writes the geometry of <S> on the stream <OS> in a
//! format that can be read back by Read.
Standard_EXPORT virtual void WriteGeometry
(const TopoDS_Shape& S, Standard_OStream& OS) const Standard_OVERRIDE;
Standard_EXPORT virtual void WriteGeometry (const TopoDS_Shape& S, Standard_OStream& OS) const Standard_OVERRIDE;
//! Reads the geometry of a shape of type <T> from the
//! stream <IS> and returns it in <S>.
Standard_EXPORT virtual void ReadGeometry
(const TopAbs_ShapeEnum T, Standard_IStream& IS, TopoDS_Shape& S) Standard_OVERRIDE;
Standard_EXPORT virtual void ReadGeometry (const TopAbs_ShapeEnum T, Standard_IStream& IS, TopoDS_Shape& S) Standard_OVERRIDE;
//! Inserts the shape <S2> in the shape <S1>. This
//! method must be redefined to use the correct
@@ -99,17 +94,15 @@ public:
//! Reads the 3d polygons of me
//! from the stream <IS>.
Standard_EXPORT void ReadPolygon3D
(Standard_IStream& IS,
const Handle(Message_ProgressIndicator) &theProgress = NULL);
Standard_EXPORT void ReadPolygon3D (Standard_IStream& IS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Writes the 3d polygons
//! on the stream <OS> in a format that can
//! be read back by Read.
Standard_EXPORT void WritePolygon3D
(Standard_OStream& OS,
const Standard_Boolean Compact = Standard_True,
const Handle(Message_ProgressIndicator) &theProgress = NULL) const;
Standard_EXPORT void WritePolygon3D (Standard_OStream& OS,
const Standard_Boolean Compact = Standard_True,
const Message_ProgressRange& theProgress = Message_ProgressRange()) const;
//! Dumps the 3d polygons
//! on the stream <OS>.
@@ -117,17 +110,15 @@ public:
//! Reads the triangulation of me
//! from the stream <IS>.
Standard_EXPORT void ReadTriangulation
(Standard_IStream& IS,
const Handle(Message_ProgressIndicator) &theProgress = NULL);
Standard_EXPORT void ReadTriangulation (Standard_IStream& IS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Writes the triangulation
//! on the stream <OS> in a format that can
//! be read back by Read.
Standard_EXPORT void WriteTriangulation
(Standard_OStream& OS,
const Standard_Boolean Compact = Standard_True,
const Handle(Message_ProgressIndicator) &theProgress = NULL) const;
Standard_EXPORT void WriteTriangulation (Standard_OStream& OS,
const Standard_Boolean Compact = Standard_True,
const Message_ProgressRange& theProgress = Message_ProgressRange()) const;
//! Dumps the triangulation
//! on the stream <OS>.
@@ -135,24 +126,33 @@ public:
//! Reads the polygons on triangulation of me
//! from the stream <IS>.
Standard_EXPORT void ReadPolygonOnTriangulation
(Standard_IStream& IS,
const Handle(Message_ProgressIndicator) &theProgress = NULL);
Standard_EXPORT void ReadPolygonOnTriangulation (Standard_IStream& IS,
const Message_ProgressRange& theProgress = Message_ProgressRange());
//! Writes the polygons on triangulation
//! on the stream <OS> in a format that can
//! be read back by Read.
Standard_EXPORT void WritePolygonOnTriangulation
(Standard_OStream& OS,
const Standard_Boolean Compact = Standard_True,
const Handle(Message_ProgressIndicator) &theProgress = NULL) const;
Standard_EXPORT void WritePolygonOnTriangulation (Standard_OStream& OS,
const Standard_Boolean Compact = Standard_True,
const Message_ProgressRange& theProgress = Message_ProgressRange()) const;
//! Dumps the polygons on triangulation
//! on the stream <OS>.
Standard_EXPORT void DumpPolygonOnTriangulation (Standard_OStream& OS) const;
protected:
private:
BRep_Builder myBuilder;
GeomTools_SurfaceSet mySurfaces;
GeomTools_CurveSet myCurves;