0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / BRepOffsetAPI / BRepOffsetAPI_MakeThickSolid.hxx
1 // Created on: 1996-02-13
2 // Created by: Yves FRICAUD
3 // Copyright (c) 1996-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _BRepOffsetAPI_MakeThickSolid_HeaderFile
18 #define _BRepOffsetAPI_MakeThickSolid_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <BRepOffsetAPI_MakeOffsetShape.hxx>
25 #include <TopTools_ListOfShape.hxx>
26 #include <Standard_Real.hxx>
27 #include <BRepOffset_Mode.hxx>
28 #include <Standard_Boolean.hxx>
29 #include <GeomAbs_JoinType.hxx>
30 class TopoDS_Shape;
31
32
33 //! Describes functions to build hollowed solids.
34 //! A hollowed solid is built from an initial solid and a set of
35 //! faces on this solid, which are to be removed. The
36 //! remaining faces of the solid become the walls of the
37 //! hollowed solid, their thickness defined at the time of construction.
38 //! the solid is built from an initial
39 //! solid  <S> and a  set of  faces {Fi} from  <S>,
40 //! builds a   solid  composed  by two shells closed  by
41 //! the {Fi}. First shell <SS>   is composed by all
42 //! the faces of <S> expected {Fi}.  Second shell is
43 //! the offset shell of <SS>.
44 //! A MakeThickSolid object provides a framework for:
45 //! - defining the cross-section of a hollowed solid,
46 //! - implementing the construction algorithm, and
47 //! - consulting the result.
48 class BRepOffsetAPI_MakeThickSolid  : public BRepOffsetAPI_MakeOffsetShape
49 {
50 public:
51
52   DEFINE_STANDARD_ALLOC
53
54   
55   Standard_EXPORT BRepOffsetAPI_MakeThickSolid();
56   
57   //! Constructs a hollowed solid from
58   //! the solid S by removing the set of faces ClosingFaces from S, where:
59   //! Offset defines the thickness of the walls. Its sign indicates
60   //! which side of the surface of the solid the hollowed shape is built on;
61   //! - Tol defines the tolerance criterion for coincidence in generated shapes;
62   //! - Mode defines the construction type of parallels applied to free
63   //! edges of shape S. Currently, only one construction type is
64   //! implemented, namely the one where the free edges do not generate
65   //! parallels; this corresponds to the default value BRepOffset_Skin;
66   //! Intersection specifies how the algorithm must work in order to
67   //! limit the parallels to two adjacent shapes:
68   //! - if Intersection is false (default value), the intersection
69   //! is calculated with the parallels to the two adjacent shapes,
70   //! -     if Intersection is true, the intersection is calculated by
71   //! taking account of all parallels generated; this computation
72   //! method is more general as it avoids self-intersections
73   //! generated in the offset shape from features of small dimensions
74   //! on shape S, however this method has not been completely
75   //! implemented and therefore is not recommended for use;
76   //! -     SelfInter tells the algorithm whether a computation to
77   //! eliminate self-intersections needs to be applied to the
78   //! resulting shape. However, as this functionality is not yet
79   //! implemented, you should use the default value (false);
80   //! - Join defines how to fill the holes that may appear between
81   //! parallels to the two adjacent faces. It may take values
82   //! GeomAbs_Arc or GeomAbs_Intersection:
83   //! - if Join is equal to GeomAbs_Arc, then pipes are generated
84   //! between two free edges of two adjacent parallels,
85   //! and spheres are generated on "images" of vertices;
86   //! it is the default value,
87   //! - if Join is equal to GeomAbs_Intersection,
88   //! then the parallels to the two adjacent faces are
89   //! enlarged and intersected, so that there are no free
90   //! edges on parallels to faces.
91   //! Warnings
92   //! Since the algorithm of MakeThickSolid is based on
93   //! MakeOffsetShape algorithm, the warnings are the same as for
94   //! MakeOffsetShape.
95   Standard_EXPORT BRepOffsetAPI_MakeThickSolid(const TopoDS_Shape& S, const TopTools_ListOfShape& ClosingFaces, const Standard_Real Offset, const Standard_Real Tol, const BRepOffset_Mode Mode = BRepOffset_Skin, const Standard_Boolean Intersection = Standard_False, const Standard_Boolean SelfInter = Standard_False, const GeomAbs_JoinType Join = GeomAbs_Arc);
96   
97   //! Builds the resulting shape (redefined from MakeOffsetShape).
98   Standard_EXPORT virtual void Build() Standard_OVERRIDE;
99   
100   //! Returns the list  of shapes modified from the shape
101   //! <S>.
102   Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S) Standard_OVERRIDE;
103
104
105
106
107 protected:
108
109
110
111
112
113 private:
114
115
116
117
118
119 };
120
121
122
123
124
125
126
127 #endif // _BRepOffsetAPI_MakeThickSolid_HeaderFile