mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-05-15 02:20:48 +05:00
NPAL15230: Too much memory allocation.
This commit is contained in:
parent
f21ce85944
commit
fc0f3a279c
@ -99,6 +99,13 @@ is
|
|||||||
--
|
--
|
||||||
-- protected methods
|
-- protected methods
|
||||||
--
|
--
|
||||||
|
--
|
||||||
|
PerformInternal(me:out;
|
||||||
|
theDSF: DSFiller from NMTTools)
|
||||||
|
---Purpose: Performs calculations using prepared DSFiller
|
||||||
|
-- object theDSF
|
||||||
|
is protected;
|
||||||
|
--
|
||||||
PrepareHistory (me:out)
|
PrepareHistory (me:out)
|
||||||
---Purpose: Prepare information for history support
|
---Purpose: Prepare information for history support
|
||||||
is redefined protected;
|
is redefined protected;
|
||||||
@ -241,7 +248,7 @@ fields
|
|||||||
mySameDomainShapes: IndexedDataMapOfShapeShape from TopTools is protected;
|
mySameDomainShapes: IndexedDataMapOfShapeShape from TopTools is protected;
|
||||||
-- solids
|
-- solids
|
||||||
myDraftSolids : IndexedDataMapOfShapeShape from TopTools is protected;
|
myDraftSolids : IndexedDataMapOfShapeShape from TopTools is protected;
|
||||||
|
myEntryPoint : Integer from Standard is protected;
|
||||||
--
|
--
|
||||||
end Builder;
|
end Builder;
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
{
|
{
|
||||||
myNbTypes=9;
|
myNbTypes=9;
|
||||||
myDSFiller=NULL;
|
myDSFiller=NULL;
|
||||||
|
myEntryPoint=0; // Entry point through PerformWithFiller ()
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ~
|
//function : ~
|
||||||
@ -59,6 +60,12 @@
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
GEOMAlgo_Builder::~GEOMAlgo_Builder()
|
GEOMAlgo_Builder::~GEOMAlgo_Builder()
|
||||||
{
|
{
|
||||||
|
if (myEntryPoint==1) {
|
||||||
|
if (myDSFiller) {
|
||||||
|
delete myDSFiller;
|
||||||
|
myDSFiller=NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : AddCompound
|
//function : AddCompound
|
||||||
@ -253,18 +260,33 @@
|
|||||||
aBB.Add(aCS, aS);
|
aBB.Add(aCS, aS);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
if (myDSFiller) {
|
||||||
|
delete myDSFiller;
|
||||||
|
myDSFiller=NULL;
|
||||||
|
}
|
||||||
NMTTools_DSFiller* pDSF=new NMTTools_DSFiller;
|
NMTTools_DSFiller* pDSF=new NMTTools_DSFiller;
|
||||||
//
|
//
|
||||||
pDSF->SetCompositeShape(aCS);
|
pDSF->SetCompositeShape(aCS);
|
||||||
pDSF->Perform();
|
pDSF->Perform();
|
||||||
//
|
//
|
||||||
PerformWithFiller(*pDSF);
|
myEntryPoint=1;
|
||||||
|
PerformInternal(*pDSF);
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : PerformWithFiller
|
//function : PerformWithFiller
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_Builder::PerformWithFiller(const NMTTools_DSFiller& theDSF)
|
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;
|
myErrorStatus=0;
|
||||||
//
|
//
|
||||||
|
@ -137,6 +137,10 @@ protected:
|
|||||||
// Methods 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>
|
//! Prepare information for history support <br>
|
||||||
Standard_EXPORT virtual void PrepareHistory() ;
|
Standard_EXPORT virtual void PrepareHistory() ;
|
||||||
|
|
||||||
@ -220,6 +224,7 @@ TopTools_IndexedDataMapOfShapeListOfShape myInParts;
|
|||||||
BRepAlgo_Image mySplitFaces;
|
BRepAlgo_Image mySplitFaces;
|
||||||
TopTools_IndexedDataMapOfShapeShape mySameDomainShapes;
|
TopTools_IndexedDataMapOfShapeShape mySameDomainShapes;
|
||||||
TopTools_IndexedDataMapOfShapeShape myDraftSolids;
|
TopTools_IndexedDataMapOfShapeShape myDraftSolids;
|
||||||
|
Standard_Integer myEntryPoint;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user