mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 10:08:35 +05:00
Added flag for computation internal shapes (manifold topology). In the SALOME/TRIPOLI module this piece of the functionality is not needed. It produces incorrect shapes and/or crashes.
This commit is contained in:
parent
335b22d949
commit
ad52e520d5
@ -52,8 +52,13 @@ is
|
||||
WarningStatus (me)
|
||||
returns Integer from Standard;
|
||||
|
||||
ComputeInternalShapes(me : in out; theFlag : Boolean from Standard)
|
||||
---Purpose: Allows to omit of creation of internal shapes (manifold topology).
|
||||
-- Needed for the SALOME/TRIPOLI module.
|
||||
|
||||
fields
|
||||
myErrorStatus : Integer from Standard is protected;
|
||||
myWarningStatus : Integer from Standard is protected;
|
||||
myComputeInternalShapes : Boolean from Standard is protected;
|
||||
|
||||
end Algo;
|
||||
|
@ -34,7 +34,8 @@
|
||||
GEOMAlgo_Algo::GEOMAlgo_Algo()
|
||||
:
|
||||
myErrorStatus(1),
|
||||
myWarningStatus(0)
|
||||
myWarningStatus(0),
|
||||
myComputeInternalShapes(Standard_True)
|
||||
{}
|
||||
//=======================================================================
|
||||
// function: ~
|
||||
@ -78,3 +79,12 @@
|
||||
// myErrorStatus
|
||||
//
|
||||
// 1 - object is just initialized
|
||||
|
||||
//=======================================================================
|
||||
//function : ComputeInternalShapes
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void GEOMAlgo_Algo::ComputeInternalShapes(const Standard_Boolean theFlag)
|
||||
{
|
||||
myComputeInternalShapes = theFlag;
|
||||
}
|
||||
|
@ -64,6 +64,7 @@ Standard_EXPORT Standard_Integer ErrorStatus() const;
|
||||
|
||||
Standard_EXPORT Standard_Integer WarningStatus() const;
|
||||
|
||||
Standard_EXPORT void ComputeInternalShapes(const Standard_Boolean theFlag);
|
||||
|
||||
|
||||
|
||||
@ -88,6 +89,7 @@ Standard_EXPORT virtual void CheckResult() ;
|
||||
//
|
||||
Standard_Integer myErrorStatus;
|
||||
Standard_Integer myWarningStatus;
|
||||
Standard_Boolean myComputeInternalShapes;
|
||||
|
||||
|
||||
private:
|
||||
|
@ -159,10 +159,12 @@ static
|
||||
if (myErrorStatus) {
|
||||
return;
|
||||
}
|
||||
if (myComputeInternalShapes) {
|
||||
PerformInternalShapes();
|
||||
if (myErrorStatus) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
//function :PerformShapesToAvoid
|
||||
@ -445,6 +447,7 @@ static
|
||||
aEFMap.Clear();
|
||||
AddedFacesMap.Clear();
|
||||
//
|
||||
if (myComputeInternalShapes) {
|
||||
aItM.Initialize(myShapesToAvoid);
|
||||
for (; aItM.More(); aItM.Next()) {
|
||||
const TopoDS_Shape& aFF=aItM.Key();
|
||||
@ -482,6 +485,7 @@ static
|
||||
}
|
||||
myLoopsInternal.Append(aShell);
|
||||
}
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
//function : PerformAreas
|
||||
|
@ -456,6 +456,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid,
|
||||
//
|
||||
// 1. Build solids for interferred source solids
|
||||
aSB.SetContext(aCtx);
|
||||
aSB.ComputeInternalShapes(myComputeInternalShapes);
|
||||
aNbS=myDraftSolids.Extent();
|
||||
for (i=1; i<=aNbS; ++i) {
|
||||
const TopoDS_Shape& aS =myDraftSolids.FindKey(i);
|
||||
|
Loading…
Reference in New Issue
Block a user