GEOMAlgo_Algo::GEOMAlgo_Algo()
:
myErrorStatus(1),
- myWarningStatus(0)
+ myWarningStatus(0),
+ myComputeInternalShapes(Standard_True)
{}
//=======================================================================
// function: ~
// myErrorStatus
//
// 1 - object is just initialized
+
+//=======================================================================
+//function : ComputeInternalShapes
+//purpose :
+//=======================================================================
+ void GEOMAlgo_Algo::ComputeInternalShapes(const Standard_Boolean theFlag)
+{
+ myComputeInternalShapes = theFlag;
+}
if (myErrorStatus) {
return;
}
- PerformInternalShapes();
- if (myErrorStatus) {
- return;
+ if (myComputeInternalShapes) {
+ PerformInternalShapes();
+ if (myErrorStatus) {
+ return;
+ }
}
}
//=======================================================================
aEFMap.Clear();
AddedFacesMap.Clear();
//
- aItM.Initialize(myShapesToAvoid);
- for (; aItM.More(); aItM.Next()) {
- const TopoDS_Shape& aFF=aItM.Key();
- TopExp::MapShapesAndAncestors(aFF, TopAbs_EDGE, TopAbs_FACE, aEFMap);
- }
- //
- aItM.Initialize(myShapesToAvoid);
- for (; aItM.More(); aItM.Next()) {
- const TopoDS_Shape& aFF=aItM.Key();
- if (!AddedFacesMap.Add(aFF)) {
- continue;
+ if (myComputeInternalShapes) {
+ aItM.Initialize(myShapesToAvoid);
+ for (; aItM.More(); aItM.Next()) {
+ const TopoDS_Shape& aFF=aItM.Key();
+ TopExp::MapShapesAndAncestors(aFF, TopAbs_EDGE, TopAbs_FACE, aEFMap);
}
//
- // make a new shell
- TopoDS_Shell aShell;
- aBB.MakeShell(aShell);
- aBB.Add(aShell, aFF);
- //
- TopoDS_Iterator aItAddedF (aShell);
- for (; aItAddedF.More(); aItAddedF.Next()) {
- const TopoDS_Face& aF = *((TopoDS_Face*)(&aItAddedF.Value()));
+ aItM.Initialize(myShapesToAvoid);
+ for (; aItM.More(); aItM.Next()) {
+ const TopoDS_Shape& aFF=aItM.Key();
+ if (!AddedFacesMap.Add(aFF)) {
+ continue;
+ }
//
- TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
- for (; aEdgeExp.More(); aEdgeExp.Next()) {
- const TopoDS_Edge& aE = *((TopoDS_Edge*)(&aEdgeExp.Current()));
- const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE);
- aItF.Initialize(aLF);
- for (; aItF.More(); aItF.Next()) {
- const TopoDS_Face& aFL=*((TopoDS_Face*)(&aItF.Value()));
- if (AddedFacesMap.Add(aFL)){
- aBB.Add(aShell, aFL);
+ // make a new shell
+ TopoDS_Shell aShell;
+ aBB.MakeShell(aShell);
+ aBB.Add(aShell, aFF);
+ //
+ TopoDS_Iterator aItAddedF (aShell);
+ for (; aItAddedF.More(); aItAddedF.Next()) {
+ const TopoDS_Face& aF = *((TopoDS_Face*)(&aItAddedF.Value()));
+ //
+ TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
+ for (; aEdgeExp.More(); aEdgeExp.Next()) {
+ const TopoDS_Edge& aE = *((TopoDS_Edge*)(&aEdgeExp.Current()));
+ const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE);
+ aItF.Initialize(aLF);
+ for (; aItF.More(); aItF.Next()) {
+ const TopoDS_Face& aFL=*((TopoDS_Face*)(&aItF.Value()));
+ if (AddedFacesMap.Add(aFL)){
+ aBB.Add(aShell, aFL);
+ }
}
}
}
+ myLoopsInternal.Append(aShell);
}
- myLoopsInternal.Append(aShell);
}
}
//=======================================================================