From: gka Date: Tue, 15 Sep 2020 12:03:35 +0000 (+0300) Subject: #314 Integration of the Message_ProgressIndicator in the BRep_Mesh and Express_Mesh X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=06a184038d1b2aa84a36140560fafa0bccfedbdb;p=occt-copy.git #314 Integration of the Message_ProgressIndicator in the BRep_Mesh and Express_Mesh Second patch for binaries compatibility with 3rd party products --- diff --git a/src/BRepMesh/BRepMesh_DiscretRoot.hxx b/src/BRepMesh/BRepMesh_DiscretRoot.hxx index 788747321a..cbdda70e77 100644 --- a/src/BRepMesh/BRepMesh_DiscretRoot.hxx +++ b/src/BRepMesh/BRepMesh_DiscretRoot.hxx @@ -46,8 +46,12 @@ public: return myIsDone; } + //! Compute triangulation for set shape. + Standard_EXPORT virtual void Perform () =0; + + //! Compute triangulation for set shape. - Standard_EXPORT virtual void Perform (const Handle(Message_ProgressIndicator) &theProgress = NULL) = 0; + Standard_EXPORT virtual void Perform (const Handle(Message_ProgressIndicator) &theProgress ) = 0; DEFINE_STANDARD_RTTIEXT(BRepMesh_DiscretRoot,Standard_Transient) diff --git a/src/BRepMesh/BRepMesh_FastDiscret.hxx b/src/BRepMesh/BRepMesh_FastDiscret.hxx index fb4512e760..b7691afd76 100644 --- a/src/BRepMesh/BRepMesh_FastDiscret.hxx +++ b/src/BRepMesh/BRepMesh_FastDiscret.hxx @@ -130,7 +130,7 @@ public: //! Triangulate a face previously recorded for //! processing by call to Add(). Can be executed in //! parallel threads. - Standard_EXPORT void Process(const TopoDS_Face& theFace, Message_ProgressSentry& theProgrEntry = NULL) const; + Standard_EXPORT void Process(const TopoDS_Face& theFace, Message_ProgressSentry& theProgrEntry) const; void operator () (const BRepMesh_FaceSentry& aFaceSentry) const { diff --git a/src/BRepMesh/BRepMesh_IncrementalMesh.cxx b/src/BRepMesh/BRepMesh_IncrementalMesh.cxx index 40d4f8905b..9a5cd9cb5e 100644 --- a/src/BRepMesh/BRepMesh_IncrementalMesh.cxx +++ b/src/BRepMesh/BRepMesh_IncrementalMesh.cxx @@ -103,6 +103,17 @@ BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh( const TopoDS_Shape& theSh Perform(); } +//======================================================================= +//function : Constructor +//purpose : +//======================================================================= +BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh (const TopoDS_Shape& theShape, + const BRepMesh_FastDiscret::Parameters& theParameters) : + myParameters(theParameters) +{ + myShape = theShape; + Perform(); +} //======================================================================= //function : Constructor //purpose : @@ -206,6 +217,17 @@ void BRepMesh_IncrementalMesh::collectFaces() //function : Perform //purpose : //======================================================================= +void BRepMesh_IncrementalMesh::Perform() +{ + Handle(Message_ProgressIndicator) aProgress; + Perform(aProgress); +} + +//======================================================================= +//function : Perform +//purpose : +//======================================================================= + void BRepMesh_IncrementalMesh::Perform(const Handle(Message_ProgressIndicator) &theProgress) { init(); diff --git a/src/BRepMesh/BRepMesh_IncrementalMesh.hxx b/src/BRepMesh/BRepMesh_IncrementalMesh.hxx index 5cd50633ee..0f7601b4b9 100644 --- a/src/BRepMesh/BRepMesh_IncrementalMesh.hxx +++ b/src/BRepMesh/BRepMesh_IncrementalMesh.hxx @@ -64,12 +64,23 @@ public: //! @name mesher API //! Automatically calls method Perform. //! @param theShape shape to be meshed. //! @param theParameters - parameters of meshing + Standard_EXPORT BRepMesh_IncrementalMesh (const TopoDS_Shape& theShape, + const BRepMesh_FastDiscret::Parameters& theParameters); + + //! Constructor. + //! Automatically calls method Perform. + //! @param theShape shape to be meshed. + //! @param theParameters - parameters of meshing + //! @param theProgress - progress indicator Standard_EXPORT BRepMesh_IncrementalMesh (const TopoDS_Shape& theShape, const BRepMesh_FastDiscret::Parameters& theParameters, - const Handle(Message_ProgressIndicator) &theProgress = NULL); + const Handle(Message_ProgressIndicator) &theProgress); + + // //! Performs meshing ot the shape. + Standard_EXPORT virtual void Perform() Standard_OVERRIDE; //! Performs meshing ot the shape. - Standard_EXPORT virtual void Perform(const Handle(Message_ProgressIndicator) &theProgress = NULL) Standard_OVERRIDE; + Standard_EXPORT virtual void Perform(const Handle(Message_ProgressIndicator) &theProgress) Standard_OVERRIDE; public: //! @name accessing to parameters.