1 // Created by: Peter KURNEV
2 // Copyright (c) 2010-2014 OPEN CASCADE SAS
3 // Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
4 // Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
5 // EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
7 // This file is part of Open CASCADE Technology software library.
9 // This library is free software; you can redistribute it and/or modify it under
10 // the terms of the GNU Lesser General Public License version 2.1 as published
11 // by the Free Software Foundation, with special exception defined in the file
12 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
13 // distribution for complete text of the license and disclaimer of any warranty.
15 // Alternatively, this file may be used under the terms of Open CASCADE
16 // commercial license or contractual agreement.
18 #ifndef _BOPAlgo_BuilderArea_HeaderFile
19 #define _BOPAlgo_BuilderArea_HeaderFile
21 #include <Standard.hxx>
22 #include <Standard_DefineAlloc.hxx>
23 #include <Standard_Handle.hxx>
25 #include <BOPAlgo_Algo.hxx>
26 #include <NCollection_BaseAllocator.hxx>
27 #include <TopTools_ListOfShape.hxx>
28 #include <TopTools_IndexedMapOfOrientedShape.hxx>
29 class IntTools_Context;
32 //! The root class for algorithms to build
33 //! faces/solids from set of edges/faces
34 class BOPAlgo_BuilderArea : public BOPAlgo_Algo
40 //! Sets the context for the algorithms
41 Standard_EXPORT void SetContext (const Handle(IntTools_Context)& theContext) {
42 myContext = theContext;
45 //! Returns the input shapes
46 Standard_EXPORT const TopTools_ListOfShape& Shapes() const {
50 //! Sets the shapes for building areas
51 Standard_EXPORT void SetShapes(const TopTools_ListOfShape& theLS) {
55 //! Returns the found loops
56 Standard_EXPORT const TopTools_ListOfShape& Loops() const {
60 //! Returns the found areas
61 Standard_EXPORT const TopTools_ListOfShape& Areas() const {
65 //! Defines the preventing of addition of internal parts into result.
66 //! The default value is FALSE, i.e. the internal parts are added into result.
67 Standard_EXPORT void SetAvoidInternalShapes(const Standard_Boolean theAvoidInternal) {
68 myAvoidInternalShapes = theAvoidInternal;
71 //! Returns the AvoidInternalShapes flag
72 Standard_EXPORT Standard_Boolean IsAvoidInternalShapes() const {
73 return myAvoidInternalShapes;
78 Standard_EXPORT BOPAlgo_BuilderArea();
79 Standard_EXPORT virtual ~BOPAlgo_BuilderArea();
81 Standard_EXPORT BOPAlgo_BuilderArea(const Handle(NCollection_BaseAllocator)& theAllocator);
83 Standard_EXPORT virtual void PerformShapesToAvoid() = 0;
85 Standard_EXPORT virtual void PerformLoops() = 0;
87 Standard_EXPORT virtual void PerformAreas() = 0;
89 Standard_EXPORT virtual void PerformInternalShapes() = 0;
92 Handle(IntTools_Context) myContext;
93 TopTools_ListOfShape myShapes;
94 TopTools_ListOfShape myLoops;
95 TopTools_ListOfShape myLoopsInternal;
96 TopTools_ListOfShape myAreas;
97 TopTools_IndexedMapOfOrientedShape myShapesToAvoid;
98 Standard_Boolean myAvoidInternalShapes;
104 #endif // _BOPAlgo_BuilderArea_HeaderFile