0025609: Clean up the duplicate classes in TKBO project
[occt.git] / src / BOPAlgo / BOPAlgo_BuilderSolid.hxx
CommitLineData
42cf5bc1 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
6//
7// This file is part of Open CASCADE Technology software library.
8//
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.
14//
15// Alternatively, this file may be used under the terms of Open CASCADE
16// commercial license or contractual agreement.
17
18#ifndef _BOPAlgo_BuilderSolid_HeaderFile
19#define _BOPAlgo_BuilderSolid_HeaderFile
20
21#include <Standard.hxx>
22#include <Standard_DefineAlloc.hxx>
23#include <Standard_Handle.hxx>
24
25#include <TopoDS_Solid.hxx>
26#include <BOPAlgo_BuilderArea.hxx>
1155d05a 27#include <NCollection_BaseAllocator.hxx>
28#include <TopTools_DataMapOfShapeBox.hxx>
42cf5bc1 29class TopoDS_Solid;
30
31
32//! The algorithm to build solids from set of faces
33class BOPAlgo_BuilderSolid : public BOPAlgo_BuilderArea
34{
35public:
36
37 DEFINE_STANDARD_ALLOC
38
39
40 Standard_EXPORT BOPAlgo_BuilderSolid();
41Standard_EXPORT virtual ~BOPAlgo_BuilderSolid();
42
1155d05a 43 Standard_EXPORT BOPAlgo_BuilderSolid(const Handle(NCollection_BaseAllocator)& theAllocator);
42cf5bc1 44
45 //! Sets the source solid <theSolid>
46 Standard_EXPORT void SetSolid (const TopoDS_Solid& theSolid);
47
48 //! Returns the source solid
49 Standard_EXPORT const TopoDS_Solid& Solid() const;
50
51 //! Performs the algorithm
52 Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
53
b7cd7c2b 54 //! Returns the map of solid/box pairs
1155d05a 55 const TopTools_DataMapOfShapeBox& GetBoxesMap() const
b7cd7c2b 56 {
57 return myBoxes;
58 }
59
42cf5bc1 60protected:
42cf5bc1 61
62 //! Collect the faces that
63 //! a) are internal
64 //! b) are the same and have different orientation
65 Standard_EXPORT virtual void PerformShapesToAvoid() Standard_OVERRIDE;
66
67 //! Build draft shells
68 //! a)myLoops - draft shells that consist of
69 //! boundary faces
70 //! b)myLoopsInternal - draft shells that contains
71 //! inner faces
72 Standard_EXPORT virtual void PerformLoops() Standard_OVERRIDE;
73
74 //! Build draft solids that contains boundary faces
75 Standard_EXPORT virtual void PerformAreas() Standard_OVERRIDE;
76
77 //! Build finalized solids with internal shells
78 Standard_EXPORT virtual void PerformInternalShapes() Standard_OVERRIDE;
79
80
81 TopoDS_Solid mySolid;
82
83
84private:
85
1155d05a 86 TopTools_DataMapOfShapeBox myBoxes; // Boxes of the produced solids
42cf5bc1 87
88};
89
42cf5bc1 90#endif // _BOPAlgo_BuilderSolid_HeaderFile