1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0029719: Modeling Algorithms - GeomPlate_BuildPlateSurface has no progress information and is not abortable

The Message_ProgressIndicator handle is added as a parameter to the function LU_Decompose and the the member functions of math_Gauss, Plate_Plate and GeomPlate_BuildPlateSurface classes.
This commit is contained in:
drazmyslovich
2018-04-23 17:52:43 +03:00
committed by bugmaster
parent 25c35042b6
commit 9f785738a1
8 changed files with 104 additions and 37 deletions

View File

@@ -72,6 +72,7 @@
#include <TColgp_SequenceOfVec.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_SequenceOfInteger.hxx>
#include <Message_ProgressIndicator.hxx>
#include <stdio.h>
// pour la verif G2
@@ -455,7 +456,7 @@ void GeomPlate_BuildPlateSurface::
//fonction : Perform
// Calcul la surface de remplissage avec les contraintes chargees
//---------------------------------------------------------
void GeomPlate_BuildPlateSurface::Perform()
void GeomPlate_BuildPlateSurface::Perform(const Handle(Message_ProgressIndicator) & aProgress)
{
#ifdef OCCT_DEBUG
// Chronmetrage
@@ -488,7 +489,7 @@ void GeomPlate_BuildPlateSurface::Perform()
// Surface Initiale
//======================================================================
if (!mySurfInitIsGive)
ComputeSurfInit();
ComputeSurfInit(aProgress);
else {
if (NTLinCont>=2)
@@ -658,13 +659,19 @@ void GeomPlate_BuildPlateSurface::Perform()
//====================================================================
//Resolution de la surface
//====================================================================
myPlate.SolveTI(myDegree, ComputeAnisotropie());
myPlate.SolveTI(myDegree, ComputeAnisotropie(), aProgress);
if (!aProgress.IsNull() && aProgress->UserBreak())
{
return;
}
if (!myPlate.IsDone())
{
#ifdef OCCT_DEBUG
cout << "WARNING : GeomPlate : abort calcul of Plate." << endl;
#endif
return;
}
@@ -692,7 +699,13 @@ void GeomPlate_BuildPlateSurface::Perform()
//====================================================================
//Resolution de la surface
//====================================================================
myPlate.SolveTI(myDegree, ComputeAnisotropie());
myPlate.SolveTI(myDegree, ComputeAnisotropie(), aProgress);
if (!aProgress.IsNull() && aProgress->UserBreak())
{
return;
}
if (!myPlate.IsDone())
{
#ifdef OCCT_DEBUG
@@ -1354,7 +1367,7 @@ Standard_Boolean GeomPlate_BuildPlateSurface::
// il y a des contraintes ponctuelles
//-------------------------------------------------------------------------
void GeomPlate_BuildPlateSurface::ComputeSurfInit()
void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Handle(Message_ProgressIndicator) & aProgress)
{
Standard_Integer nopt=2, popt=2, Np=1;
Standard_Boolean isHalfSpace = Standard_True;
@@ -1719,7 +1732,12 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit()
//====================================================================
//Resolution de la surface
//====================================================================
myPlate.SolveTI(2, ComputeAnisotropie());
myPlate.SolveTI(2, ComputeAnisotropie(), aProgress);
if (!aProgress.IsNull() && aProgress->UserBreak())
{
return;
}
if (!myPlate.IsDone())
{
#ifdef OCCT_DEBUG

View File

@@ -46,6 +46,7 @@ class gp_Pnt;
class Geom2d_Curve;
class Adaptor3d_HCurve;
class Adaptor2d_HCurve2d;
class Message_ProgressIndicator;
@@ -130,7 +131,7 @@ public:
//! Exceptions
//! Standard_RangeError if the value of the constraint is
//! null or if plate is not done.
Standard_EXPORT void Perform();
Standard_EXPORT void Perform(const Handle(Message_ProgressIndicator) & aProgress = Handle(Message_ProgressIndicator)());
//! returns the CurveConstraints of order order
Standard_EXPORT Handle(GeomPlate_CurveConstraint) CurveConstraint (const Standard_Integer order) const;
@@ -217,7 +218,7 @@ private:
Standard_EXPORT Handle(Adaptor2d_HCurve2d) ProjectedCurve (Handle(Adaptor3d_HCurve)& Curv);
Standard_EXPORT void ComputeSurfInit();
Standard_EXPORT void ComputeSurfInit(const Handle(Message_ProgressIndicator) & aProgress);
Standard_EXPORT void Intersect (Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, Handle(GeomPlate_HArray1OfSequenceOfReal)& PntG1G1);