1 // Created by: Eugeny MALTCHIKOV
2 // Copyright (c) 2015 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
16 #include <BOPAlgo_CellsBuilder.hxx>
18 #include <TopoDS_Compound.hxx>
20 #include <BRep_Builder.hxx>
22 #include <TopExp_Explorer.hxx>
24 #include <BOPTools.hxx>
25 #include <BOPTools_AlgoTools.hxx>
27 #include <BOPAlgo_BuilderSolid.hxx>
29 #include <ShapeUpgrade_UnifySameDomain.hxx>
33 TopAbs_ShapeEnum TypeToExplore(const Standard_Integer theDim);
36 void MakeTypedContainers(const TopoDS_Shape& theSC,
37 const TopAbs_ShapeEnum aType,
38 TopoDS_Shape& theResult);
40 //=======================================================================
41 //function : empty constructor
43 //=======================================================================
44 BOPAlgo_CellsBuilder::BOPAlgo_CellsBuilder()
48 myIndex(100, myAllocator),
49 myMaterials(100, myAllocator),
50 myShapeMaterial(100, myAllocator),
51 myMapGenerated(100, myAllocator)
55 //=======================================================================
56 //function : empty constructor
58 //=======================================================================
59 BOPAlgo_CellsBuilder::BOPAlgo_CellsBuilder
60 (const Handle(NCollection_BaseAllocator)& theAllocator)
62 BOPAlgo_Builder(theAllocator),
64 myIndex(100, myAllocator),
65 myMaterials(100, myAllocator),
66 myShapeMaterial(100, myAllocator),
67 myMapGenerated(100, myAllocator)
71 //=======================================================================
74 //=======================================================================
75 BOPAlgo_CellsBuilder::~BOPAlgo_CellsBuilder()
81 //=======================================================================
84 //=======================================================================
85 void BOPAlgo_CellsBuilder::Clear()
87 BOPAlgo_Builder::Clear();
90 myShapeMaterial.Clear();
91 myMapGenerated.Clear();
94 //=======================================================================
95 //function : GetAllParts
97 //=======================================================================
98 const TopoDS_Shape& BOPAlgo_CellsBuilder::GetAllParts() const
103 //=======================================================================
106 //=======================================================================
107 void BOPAlgo_CellsBuilder::Prepare()
109 BOPAlgo_Builder::Prepare();
111 myFlagHistory=Standard_False;
114 //=======================================================================
115 // function: CheckData
117 //=======================================================================
118 void BOPAlgo_CellsBuilder::CheckData()
120 BOPAlgo_Builder::CheckData();
125 // additional check for the arguments to be of the same dimension.
126 Standard_Integer aDim1, aDimi;
127 BOPCol_ListIteratorOfListOfShape aIt;
129 aIt.Initialize(myArguments);
130 const TopoDS_Shape& aS1 = aIt.Value();
131 aDim1 = BOPTools_AlgoTools::Dimension(aS1);
133 for (aIt.Next(); aIt.More(); aIt.Next()) {
134 const TopoDS_Shape& aSi = aIt.Value();
135 aDimi = BOPTools_AlgoTools::Dimension(aSi);
137 if (aDim1 != aDimi) {
138 myErrorStatus = 201; // non-homogenous arguments
144 //=======================================================================
145 //function : PerformInternal1
147 //=======================================================================
148 void BOPAlgo_CellsBuilder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller)
150 BOPAlgo_Builder::PerformInternal1(theFiller);
156 // save the splits to <myAllParts>
159 // index all the parts to its origins
162 // and nullify <myShape> for building the result;
163 RemoveAllFromResult();
165 myFlagHistory = Standard_True;
168 //=======================================================================
169 //function : TakeAllParts
171 //=======================================================================
172 void BOPAlgo_CellsBuilder::TakeAllParts()
174 Standard_Integer aDim;
178 aDim = BOPTools_AlgoTools::Dimension(myArguments.First());
179 myType = TypeToExplore(aDim);
181 aBB.MakeCompound(aC);
182 TopExp_Explorer aExp(myShape, myType);
183 for (; aExp.More(); aExp.Next()) {
184 const TopoDS_Shape& aS = aExp.Current();
190 //=======================================================================
191 //function : IndexParts
193 //=======================================================================
194 void BOPAlgo_CellsBuilder::IndexParts()
196 BOPCol_ListIteratorOfListOfShape aIt, aItIm;
197 TopExp_Explorer aExp;
199 aIt.Initialize(myArguments);
200 for (; aIt.More(); aIt.Next()) {
201 const TopoDS_Shape& aS = aIt.Value();
203 aExp.Init(aS, myType);
204 for (; aExp.More(); aExp.Next()) {
205 const TopoDS_Shape& aST = aExp.Current();
206 if (!myImages.IsBound(aST)) {
207 BOPCol_ListOfShape aLS;
209 myIndex.Add(aST, aLS);
213 const BOPCol_ListOfShape& aLSIm = myImages.Find(aST);
214 aItIm.Initialize(aLSIm);
215 for (; aItIm.More(); aItIm.Next()) {
216 const TopoDS_Shape& aSTIm = aItIm.Value();
218 if (myIndex.Contains(aSTIm)) {
219 BOPCol_ListOfShape& aLS = myIndex.ChangeFromKey(aSTIm);
223 BOPCol_ListOfShape aLS;
225 myIndex.Add(aSTIm, aLS);
227 } // for (; aItIm.More(); aItIm.Next()) {
228 } // for (; aExp.More(); aExp.Next()) {
229 } // for (; aIt.More(); aIt.Next()) {
232 //=======================================================================
233 //function : AddToResult
235 //=======================================================================
236 void BOPAlgo_CellsBuilder::AddToResult(const BOPCol_ListOfShape& theLSToTake,
237 const BOPCol_ListOfShape& theLSToAvoid,
238 const Standard_Integer theMaterial,
239 const Standard_Boolean theUpdate)
242 BOPCol_ListOfShape aParts;
243 FindParts(theLSToTake, theLSToAvoid, aParts);
244 if (aParts.IsEmpty()) {
248 Standard_Boolean bChanged;
250 BOPCol_MapOfShape aResParts;
251 TopExp_Explorer aExp;
252 BOPCol_ListIteratorOfListOfShape aIt;
254 bChanged = Standard_False;
255 // collect result parts to avoid multiple adding of the same parts
256 aExp.Init(myShape, myType);
257 for (; aExp.More(); aExp.Next()) {
258 const TopoDS_Shape& aPart = aExp.Current();
259 aResParts.Add(aPart);
261 // add parts to result
262 aIt.Initialize(aParts);
263 for (; aIt.More(); aIt.Next()) {
264 const TopoDS_Shape& aPart = aIt.Value();
265 if (aResParts.Add(aPart)) {
266 aBB.Add(myShape, aPart);
267 bChanged = Standard_True;
271 // update the material
272 if (theMaterial != 0) {
273 BOPCol_ListOfShape aLSP;
274 aIt.Initialize(aParts);
275 for (; aIt.More(); aIt.Next()) {
276 const TopoDS_Shape& aPart = aIt.Value();
277 if (!myShapeMaterial.IsBound(aPart)) {
278 myShapeMaterial.Bind(aPart, theMaterial);
281 } // for (; aIt.More(); aIt.Next()) {
284 if (myMaterials.IsBound(theMaterial)) {
285 BOPCol_ListOfShape& aLS = myMaterials.ChangeFind(theMaterial);
287 } // if (myMaterials.IsBound(theMaterial)) {
289 myMaterials.Bind(theMaterial, aLSP);
291 } // if (aLSP.Extent()) {
292 } // if (theMaterial != 0) {
300 RemoveInternalBoundaries();
304 //=======================================================================
305 //function : AddAllToResult
307 //=======================================================================
308 void BOPAlgo_CellsBuilder::AddAllToResult(const Standard_Integer theMaterial,
309 const Standard_Boolean theUpdate)
311 TopoDS_Compound aResult;
313 BOPCol_ListOfShape aLSM;
315 aBB.MakeCompound(aResult);
316 myShapeMaterial.Clear();
318 myMapGenerated.Clear();
320 TopoDS_Iterator aIt(myAllParts);
321 for (; aIt.More(); aIt.Next()) {
322 const TopoDS_Shape& aPart = aIt.Value();
323 aBB.Add(aResult, aPart);
325 if (theMaterial != 0) {
326 myShapeMaterial.Bind(aPart, theMaterial);
333 if (theMaterial != 0) {
334 myMaterials.Bind(theMaterial, aLSM);
341 RemoveInternalBoundaries();
345 //=======================================================================
346 //function : RemoveFromResult
348 //=======================================================================
349 void BOPAlgo_CellsBuilder::RemoveFromResult(const BOPCol_ListOfShape& theLSToTake,
350 const BOPCol_ListOfShape& theLSToAvoid)
353 BOPCol_ListOfShape aParts;
354 FindParts(theLSToTake, theLSToAvoid, aParts);
355 if (aParts.IsEmpty()) {
359 BOPCol_MapOfShape aPartsToRemove;
360 BOPCol_ListIteratorOfListOfShape aItP, aItM;
362 // collect parts into the map and remove parts from materials
363 aItP.Initialize(aParts);
364 for (; aItP.More(); aItP.Next()) {
365 const TopoDS_Shape& aPart = aItP.Value();
366 aPartsToRemove.Add(aPart);
368 if (myShapeMaterial.IsBound(aPart)) {
369 Standard_Integer iMaterial = myShapeMaterial.Find(aPart);
370 if (!myMaterials.IsBound(iMaterial)) {
371 myShapeMaterial.UnBind(aPart);
375 BOPCol_ListOfShape& aLSM = myMaterials.ChangeFind(iMaterial);
377 aItM.Initialize(aLSM);
378 for (; aItM.More(); aItM.Next()) {
379 const TopoDS_Shape& aSM = aItM.Value();
380 if (aSM.IsSame(aPart)) {
383 } // if (aSM.IsSame(aPart)) {
384 } // for (; aItM.More(); aItM.Next()) {
386 myShapeMaterial.UnBind(aPart);
387 } // if (myShapeMaterial.IsBound(aPart)) {
388 } // for (; aItP.More(); aItP.Next()) {
390 Standard_Boolean bChanged;
391 TopoDS_Compound aResult;
393 TopoDS_Iterator aIt1, aIt2;
394 TopAbs_ShapeEnum aType;
396 aBB.MakeCompound(aResult);
397 bChanged = Standard_False;
399 aIt1.Initialize(myShape);
400 for (; aIt1.More(); aIt1.Next()) {
401 const TopoDS_Shape& aS = aIt1.Value();
402 aType = aS.ShapeType();
404 if (aType == myType) {
406 if (aPartsToRemove.Contains(aS)) {
407 bChanged = Standard_True;
410 aBB.Add(aResult, aS);
411 } // if (aType == myType) {
414 Standard_Boolean bNotEmpty;
416 aBB.MakeCompound(aSC);
418 bNotEmpty = Standard_False;
420 for (; aIt2.More(); aIt2.Next()) {
421 const TopoDS_Shape& aSS = aIt2.Value();
422 if (aPartsToRemove.Contains(aSS)) {
423 bChanged = Standard_True;
427 bNotEmpty = Standard_True;
428 } // for (; aIt2.More(); aIt2.Next()) {
431 MakeTypedContainers(aSC, myType, aResult);
434 } // for (; aIt1.More(); aIt1.Next()) {
443 //=======================================================================
444 //function : RemoveAllFromResult
446 //=======================================================================
447 void BOPAlgo_CellsBuilder::RemoveAllFromResult()
453 aBB.MakeCompound(aC);
457 myShapeMaterial.Clear();
458 myMapGenerated.Clear();
463 //=======================================================================
464 //function : RemoveInternalBoundaries
466 //=======================================================================
467 void BOPAlgo_CellsBuilder::RemoveInternalBoundaries()
469 if (myMaterials.IsEmpty()) {
473 Standard_Integer iMaterial, iErr;
474 TopoDS_Compound aResult;
476 TopExp_Explorer aExp;
477 BOPCol_ListIteratorOfListOfShape aItS;
478 BOPCol_DataMapIteratorOfDataMapOfIntegerListOfShape aItM;
480 aBB.MakeCompound(aResult);
481 aExp.Init(myShape, myType);
482 for (; aExp.More(); aExp.Next()) {
483 const TopoDS_Shape& aS = aExp.Current();
484 if (!myShapeMaterial.IsBound(aS)) {
485 aBB.Add(aResult, aS);
489 aItM.Initialize(myMaterials);
490 for (; aItM.More(); aItM.Next()) {
491 iMaterial = aItM.Key();
493 BOPCol_ListOfShape aLSNew;
494 BOPCol_ListOfShape& aLS = myMaterials(iMaterial);
495 iErr = RemoveInternals(aLS, aLSNew);
496 if (iErr || aLSNew.IsEmpty()) {
497 myErrorStatus = 202; // unable to remove internal boundaries
501 // update materials maps and add new shapes to result
503 aItS.Initialize(aLSNew);
504 for (; aItS.More(); aItS.Next()) {
505 const TopoDS_Shape& aS = aItS.Value();
506 aBB.Add(aResult, aS);
507 if (!myShapeMaterial.IsBound(aS)) {
508 myShapeMaterial.Bind(aS, iMaterial);
518 //=======================================================================
519 //function : FindPart
521 //=======================================================================
522 void BOPAlgo_CellsBuilder::FindParts(const BOPCol_ListOfShape& theLSToTake,
523 const BOPCol_ListOfShape& theLSToAvoid,
524 BOPCol_ListOfShape& theParts)
526 if (theLSToTake.IsEmpty()) {
530 Standard_Boolean bFound;
531 Standard_Integer aNbS;
532 BOPCol_ListIteratorOfListOfShape aItIm, aItArgs;
533 BOPCol_MapOfShape aMSToTake, aMSToAvoid, aMS;
534 TopExp_Explorer aExp;
536 aItArgs.Initialize(theLSToAvoid);
537 for (; aItArgs.More(); aItArgs.Next()) {
538 const TopoDS_Shape& aS = aItArgs.Value();
542 aItArgs.Initialize(theLSToTake);
543 for (; aItArgs.More(); aItArgs.Next()) {
544 const TopoDS_Shape& aS = aItArgs.Value();
548 aNbS = aMSToTake.Extent();
550 const TopoDS_Shape& aSToTake = theLSToTake.First();
551 aExp.Init(aSToTake, myType);
552 for (; aExp.More(); aExp.Next()) {
553 const TopoDS_Shape& aST = aExp.Current();
554 BOPCol_ListOfShape aLSTIm;
555 if (!myImages.IsBound(aST)) {
558 aLSTIm = myImages.Find(aST);
561 aItIm.Initialize(aLSTIm);
562 for (; aItIm.More(); aItIm.Next()) {
563 const TopoDS_Shape& aPart = aItIm.Value();
565 if (!myIndex.Contains(aPart)) {
569 const BOPCol_ListOfShape& aLS = myIndex.FindFromKey(aPart);
570 if (aLS.Extent() < aNbS) {
575 aItArgs.Initialize(aLS);
576 for (bFound = Standard_True; aItArgs.More() && bFound; aItArgs.Next()) {
577 const TopoDS_Shape& aS = aItArgs.Value();
578 bFound = !aMSToAvoid.Contains(aS);
586 aItArgs.Initialize(theLSToTake);
587 for (; aItArgs.More() && bFound; aItArgs.Next()) {
588 const TopoDS_Shape& aS = aItArgs.Value();
589 bFound = aMS.Contains(aS);
593 theParts.Append(aPart);
595 } // for (; aItIm.More(); aItIm.Next()) {
596 } // for (; aExp.More(); aExp.Next()) {
599 //=======================================================================
600 //function : MakeContainers
602 //=======================================================================
603 void BOPAlgo_CellsBuilder::MakeContainers()
605 TopoDS_Compound aResult;
608 aBB.MakeCompound(aResult);
609 MakeTypedContainers(myShape, myType, aResult);
613 //=======================================================================
614 //function : RemoveInternals
616 //=======================================================================
617 Standard_Integer BOPAlgo_CellsBuilder::RemoveInternals(const BOPCol_ListOfShape& theLS,
618 BOPCol_ListOfShape& theLSNew)
620 Standard_Integer iErr = 0;
621 if (theLS.Extent() < 2) {
626 BOPCol_ListIteratorOfListOfShape aIt;
627 TopExp_Explorer aExp;
629 TopAbs_ShapeEnum aType = theLS.First().ShapeType();
631 if (aType == TopAbs_EDGE ||
632 aType == TopAbs_FACE) {
638 BOPTools_AlgoTools::MakeContainer
639 ((aType == TopAbs_FACE) ? TopAbs_SHELL : TopAbs_WIRE, aShape);
641 aIt.Initialize(theLS);
642 for (; aIt.More(); aIt.Next()) {
643 const TopoDS_Shape& aS = aIt.Value();
648 Standard_Boolean bFaces, bEdges;
650 bFaces = (aType == TopAbs_FACE);
651 bEdges = (aType == TopAbs_EDGE);
653 ShapeUpgrade_UnifySameDomain anUnify (aShape, bEdges, bFaces);
655 const TopoDS_Shape& aSNew = anUnify.Shape();
657 aExp.Init(aSNew, aType);
658 for (; aExp.More(); aExp.Next()) {
659 const TopoDS_Shape& aSn = aExp.Current();
660 theLSNew.Append(aSn);
663 // fill map of generated shapes
664 BOPCol_IndexedMapOfShape aMG;
665 Standard_Integer i, aNb;
667 BOPTools::MapShapes(aShape, TopAbs_VERTEX, aMG);
668 BOPTools::MapShapes(aShape, TopAbs_EDGE, aMG);
669 BOPTools::MapShapes(aShape, TopAbs_FACE, aMG);
672 for (i = 1; i <= aNb; ++i) {
673 const TopoDS_Shape& aSS = aMG(i);
674 const TopoDS_Shape& aSNew = anUnify.Generated(aSS);
675 if (!aSNew.IsNull() && !aSS.IsSame(aSNew)) {
676 myMapGenerated.Bind(aSS, aSNew);
680 else if (aType == TopAbs_SOLID) {
681 // build all solids from the faces
682 BOPCol_ListOfShape aLSF;
684 aIt.Initialize(theLS);
685 for (; aIt.More(); aIt.Next()) {
686 const TopoDS_Shape& aS = aIt.Value();
688 aExp.Init(aS, TopAbs_FACE);
689 for (; aExp.More(); aExp.Next()) {
690 const TopoDS_Shape& aF = aExp.Current();
695 BOPAlgo_BuilderSolid aBS;
699 iErr = aBS.ErrorStatus();
704 theLSNew = aBS.Areas();
705 if (theLSNew.Extent() == 1) {
709 // result is a list of solids. we need to select external faces.
710 BOPCol_IndexedDataMapOfShapeListOfShape aDMFS;
711 BOPCol_ListOfShape aLFNew;
712 Standard_Integer i, aNb;
714 // map faces and solids
715 BOPCol_ListIteratorOfListOfShape aIt(theLSNew);
716 for (; aIt.More(); aIt.Next()) {
717 const TopoDS_Shape& aS = aIt.Value();
719 aExp.Init(aS, TopAbs_FACE);
720 for (; aExp.More(); aExp.Next()) {
721 const TopoDS_Shape& aF = aExp.Current();
722 if (aDMFS.Contains(aF)) {
723 BOPCol_ListOfShape& aLFS = aDMFS.ChangeFromKey(aF);
727 BOPCol_ListOfShape aLFS;
734 // select faces attached to only one solid
735 aNb = aDMFS.Extent();
736 for (i = 1; i <= aNb; ++i) {
737 const BOPCol_ListOfShape& aLS = aDMFS(i);
738 if (aLS.Extent() == 1) {
739 const TopoDS_Shape& aF = aDMFS.FindKey(i);
744 if (aNb == aLFNew.Extent()) {
749 BOPAlgo_BuilderSolid aBS1;
750 aBS1.SetShapes(aLFNew);
753 iErr = aBS1.ErrorStatus();
758 theLSNew = aBS1.Areas();
764 //=======================================================================
765 //function : IsDeleted
767 //=======================================================================
768 Standard_Boolean BOPAlgo_CellsBuilder::IsDeleted(const TopoDS_Shape& theS)
770 Standard_Boolean bRet = Standard_True;
775 TopAbs_ShapeEnum aType = theS.ShapeType();
776 if (!(aType==TopAbs_EDGE || aType==TopAbs_FACE ||
777 aType==TopAbs_VERTEX || aType==TopAbs_SOLID)) {
781 Standard_Boolean bHasImage, bHasGenerated;
783 bHasImage = myImages.IsBound(theS);
784 bHasGenerated = myMapGenerated.IsBound(theS);
785 if (!bHasImage && !bHasGenerated) {
786 bRet = !myMapShape.Contains(theS);
791 const TopoDS_Shape& aSG = myMapGenerated.Find(theS);
792 if (myMapShape.Contains(aSG)) {
793 bRet = Standard_False;
799 const BOPCol_ListOfShape& aLSp = myImages.Find(theS);
800 BOPCol_ListIteratorOfListOfShape aIt(aLSp);
801 for (; aIt.More(); aIt.Next()) {
802 const TopoDS_Shape& aSp = aIt.Value();
803 const TopoDS_Shape& aSpR = myShapesSD.IsBound(aSp) ?
804 myShapesSD.Find(aSp) : aSp;
806 const TopoDS_Shape& aSpRG = myMapGenerated.IsBound(aSpR) ?
807 myMapGenerated.Find(aSpR) : aSpR;
808 if (myMapShape.Contains(aSpRG)) {
809 bRet = Standard_False;
818 //=======================================================================
819 //function : Generated
821 //=======================================================================
822 const TopTools_ListOfShape& BOPAlgo_CellsBuilder::Generated(const TopoDS_Shape& theS)
824 myHistShapes.Clear();
829 TopAbs_ShapeEnum aType = theS.ShapeType();
830 if (!(aType==TopAbs_EDGE || aType==TopAbs_FACE || aType==TopAbs_VERTEX)) {
834 Standard_Boolean bHasGenerated = myMapGenerated.IsBound(theS);
836 const TopoDS_Shape& aSG = myMapGenerated.Find(theS);
837 if (myMapShape.Contains(aSG)) {
838 myHistShapes.Append(aSG);
843 Standard_Boolean bHasImage = myImages.IsBound(theS);
848 BOPCol_MapOfShape aMFence;
849 const BOPCol_ListOfShape& aLSp = myImages.Find(theS);
850 BOPCol_ListIteratorOfListOfShape aIt(aLSp);
851 for (; aIt.More(); aIt.Next()) {
852 const TopoDS_Shape aSp = aIt.Value();
853 const TopoDS_Shape& aSpR = myShapesSD.IsBound(aSp) ?
854 myShapesSD.Find(aSp) : aSp;
856 if (myMapGenerated.IsBound(aSpR)) {
857 const TopoDS_Shape& aSG = myMapGenerated.Find(aSpR);
858 if (myMapShape.Contains(aSG)) {
859 if (aMFence.Add(aSG)) {
860 myHistShapes.Append(aSG);
869 //=======================================================================
870 //function : MakeTypedContainers
872 //=======================================================================
873 void MakeTypedContainers(const TopoDS_Shape& theSC,
874 const TopAbs_ShapeEnum aType,
875 TopoDS_Shape& theResult)
877 TopAbs_ShapeEnum aContainerType, aConnexityType, aPartType;
882 aContainerType = TopAbs_WIRE;
883 aConnexityType = TopAbs_VERTEX;
887 aContainerType = TopAbs_SHELL;
888 aConnexityType = TopAbs_EDGE;
892 aContainerType = TopAbs_COMPSOLID;
893 aConnexityType = TopAbs_FACE;
900 BOPCol_ListOfShape aLCB;
901 BOPTools_AlgoTools::MakeConnexityBlocks(theSC, aConnexityType, aPartType, aLCB);
902 if (aLCB.IsEmpty()) {
907 TopExp_Explorer aExp;
908 BOPCol_ListIteratorOfListOfShape aItCB;
910 aItCB.Initialize(aLCB);
911 for (; aItCB.More(); aItCB.Next()) {
913 BOPTools_AlgoTools::MakeContainer(aContainerType, aRCB);
915 const TopoDS_Shape& aCB = aItCB.Value();
916 aExp.Init(aCB, aPartType);
917 for (; aExp.More(); aExp.Next()) {
918 const TopoDS_Shape& aCBS = aExp.Current();
922 if (aContainerType == TopAbs_SHELL) {
923 BOPTools_AlgoTools::OrientFacesOnShell(aRCB);
926 aBB.Add(theResult, aRCB);
930 //=======================================================================
931 //function : TypeToExplore
933 //=======================================================================
934 TopAbs_ShapeEnum TypeToExplore(const Standard_Integer theDim)
936 TopAbs_ShapeEnum aRet;