NPAL15230: Too much memory allocation.

This commit is contained in:
jfa 2007-03-19 12:26:03 +00:00
parent f21ce85944
commit fc0f3a279c
3 changed files with 36 additions and 2 deletions

View File

@ -99,6 +99,13 @@ is
--
-- protected methods
--
--
PerformInternal(me:out;
theDSF: DSFiller from NMTTools)
---Purpose: Performs calculations using prepared DSFiller
-- object theDSF
is protected;
--
PrepareHistory (me:out)
---Purpose: Prepare information for history support
is redefined protected;
@ -241,7 +248,7 @@ fields
mySameDomainShapes: IndexedDataMapOfShapeShape from TopTools is protected;
-- solids
myDraftSolids : IndexedDataMapOfShapeShape from TopTools is protected;
myEntryPoint : Integer from Standard is protected;
--
end Builder;

View File

@ -52,6 +52,7 @@
{
myNbTypes=9;
myDSFiller=NULL;
myEntryPoint=0; // Entry point through PerformWithFiller ()
}
//=======================================================================
//function : ~
@ -59,6 +60,12 @@
//=======================================================================
GEOMAlgo_Builder::~GEOMAlgo_Builder()
{
if (myEntryPoint==1) {
if (myDSFiller) {
delete myDSFiller;
myDSFiller=NULL;
}
}
}
//=======================================================================
//function : AddCompound
@ -253,18 +260,33 @@
aBB.Add(aCS, aS);
}
//
if (myDSFiller) {
delete myDSFiller;
myDSFiller=NULL;
}
NMTTools_DSFiller* pDSF=new NMTTools_DSFiller;
//
pDSF->SetCompositeShape(aCS);
pDSF->Perform();
//
PerformWithFiller(*pDSF);
myEntryPoint=1;
PerformInternal(*pDSF);
}
//=======================================================================
//function : PerformWithFiller
//purpose :
//=======================================================================
void GEOMAlgo_Builder::PerformWithFiller(const NMTTools_DSFiller& theDSF)
{
myEntryPoint=0;
//
PerformInternal(theDSF);
}
//=======================================================================
//function : PerformInternal
//purpose :
//=======================================================================
void GEOMAlgo_Builder::PerformInternal(const NMTTools_DSFiller& theDSF)
{
myErrorStatus=0;
//

View File

@ -137,6 +137,10 @@ protected:
// Methods PROTECTED
//
//! Performs calculations using prepared DSFiller <br>
//! object theDSF <br>
Standard_EXPORT void PerformInternal(const NMTTools_DSFiller& theDSF) ;
//! Prepare information for history support <br>
Standard_EXPORT virtual void PrepareHistory() ;
@ -220,6 +224,7 @@ TopTools_IndexedDataMapOfShapeListOfShape myInParts;
BRepAlgo_Image mySplitFaces;
TopTools_IndexedDataMapOfShapeShape mySameDomainShapes;
TopTools_IndexedDataMapOfShapeShape myDraftSolids;
Standard_Integer myEntryPoint;
private: