summaryrefslogtreecommitdiff
path: root/inc/BRepFeat_Form.hxx
blob: f1191cd22224c3e40d9df89ff96f59063e09fc69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _BRepFeat_Form_HeaderFile
#define _BRepFeat_Form_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#endif
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
#endif
#ifndef _BRepFeat_PerfSelection_HeaderFile
#include <BRepFeat_PerfSelection.hxx>
#endif
#ifndef _TopoDS_Face_HeaderFile
#include <TopoDS_Face.hxx>
#endif
#ifndef _TopTools_DataMapOfShapeShape_HeaderFile
#include <TopTools_DataMapOfShapeShape.hxx>
#endif
#ifndef _BRepFeat_StatusError_HeaderFile
#include <BRepFeat_StatusError.hxx>
#endif
#ifndef _BRepBuilderAPI_MakeShape_HeaderFile
#include <BRepBuilderAPI_MakeShape.hxx>
#endif
#ifndef _Handle_Geom_Curve_HeaderFile
#include <Handle_Geom_Curve.hxx>
#endif
#ifndef _Handle_BOP_HistoryCollector_HeaderFile
#include <Handle_BOP_HistoryCollector.hxx>
#endif
#ifndef _Handle_TopOpeBRepBuild_HBuilder_HeaderFile
#include <Handle_TopOpeBRepBuild_HBuilder.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
class TopTools_ListOfShape;
class TopoDS_Shape;
class TColGeom_SequenceOfCurve;
class Geom_Curve;
class LocOpe_Gluer;
class BRepAlgoAPI_BooleanOperation;
class BOP_HistoryCollector;
class TopOpeBRepBuild_HBuilder;


//!  Provides general functions to build form features. <br>
//! Form features can be depressions or protrusions and include the following types: <br>
//! -          Cylinder <br>
//! -          Draft Prism <br>
//! -          Prism <br>
//! -          Revolved feature <br>
//! -          Pipe <br>
//! In each case, you have a choice of operation type between the following: <br>
//! -          removing matter (a Boolean cut: Fuse setting 0) <br>
//! -          adding matter (Boolean fusion: Fuse setting 1) <br>
//! The semantics of form feature creation is based on the construction of shapes: <br>
//! -      along a length <br>
//! -      up to a limiting face <br>
//! -      from a limiting face to a  height <br>
//! -      above and/or below a plane <br>
//! The shape defining construction of the feature can be either the <br>
//! supporting edge or the concerned area of a face. <br>
//! In case of the supporting edge, this contour can be attached to a <br>
//! face of the basis shape by binding. When the contour is bound to this <br>
//! face, the information that the contour will slide on the face <br>
//! becomes available to the relevant class methods. In case of the <br>
//! concerned area of a face, you could, for example, cut it out and <br>
//! move it to a different height which will define the limiting face of a <br>
//! protrusion or depression. <br>
//! Topological definition with local operations of this sort makes <br>
//! calculations simpler and faster than a global operation. The latter <br>
//! would entail a second phase of removing unwanted matter to get the same result. <br>
class BRepFeat_Form  : public BRepBuilderAPI_MakeShape {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  //! returns the list of generated Faces. <br>
  Standard_EXPORT   virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& F) ;
  //! returns a list of the created faces <br>
//!          from the shape <S>. <br>
  Standard_EXPORT   virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ;
  
  Standard_EXPORT   virtual  Standard_Boolean IsDeleted(const TopoDS_Shape& S) ;
  //! Returns the list  of shapes created  at the bottom  of <br>
//!          the created form.  It may be an empty list. <br>
  Standard_EXPORT    const TopTools_ListOfShape& FirstShape() const;
  //! Returns  the list of shapes  created at the top of the <br>
//!          created form.  It may be an empty list. <br>
  Standard_EXPORT    const TopTools_ListOfShape& LastShape() const;
  //! Returns a list of the limiting and glueing edges <br>
//! generated by the feature. These edges did not originally <br>
//! exist in the basis shape. <br>
//! The list provides the information necessary for <br>
//! subsequent addition of fillets. It may be an empty list. <br>
  Standard_EXPORT    const TopTools_ListOfShape& NewEdges() const;
  //! Returns a list of the tangent edges among the limiting <br>
//! and glueing edges generated by the feature. These <br>
//! edges did not originally exist in the basis shape and are <br>
//! tangent to the face against which the feature is built. <br>
//! The list provides the information necessary for <br>
//! subsequent addition of fillets. It may be an empty list. <br>
//! If an edge is tangent, no fillet is possible, and the edge <br>
//! must subsequently be removed if you want to add a fillet. <br>
  Standard_EXPORT    const TopTools_ListOfShape& TgtEdges() const;
  //! Initializes the topological construction if the basis shape is present. <br>
        void BasisShapeValid() ;
  //! Initializes the topological construction if the generated shape S is present. <br>
        void GeneratedShapeValid() ;
  
//! Initializes the topological construction if the shape is <br>
//! present from the specified integer on. <br>
        void ShapeFromValid() ;
  
//! Initializes the topological construction if the shape is <br>
//! present until the specified integer. <br>
        void ShapeUntilValid() ;
  
//! Initializes the topological construction if the glued face is present. <br>
        void GluedFacesValid() ;
  
//! Initializes the topological construction if the sketch face <br>
//! is present. If the sketch face is inside the basis shape, <br>
//! local operations such as glueing can be performed. <br>
        void SketchFaceValid() ;
  //! Initializes the topological construction if the selected face is present. <br>
        void PerfSelectionValid() ;
  
  Standard_EXPORT   virtual  void Curves(TColGeom_SequenceOfCurve& S)  = 0;
  
  Standard_EXPORT   virtual  Handle_Geom_Curve BarycCurve()  = 0;
  
  Standard_EXPORT     BRepFeat_StatusError CurrentStatusError() const;





protected:

  //! Redefines the empty constructor. <br>
      BRepFeat_Form();
  //! General perform method... <br>
  Standard_EXPORT     void GlobalPerform() ;
  
  Standard_EXPORT     void UpdateDescendants(const LocOpe_Gluer& G) ;
  
  Standard_EXPORT     void UpdateDescendants(const BRepAlgoAPI_BooleanOperation& aBOP,const TopoDS_Shape& SResult,const Standard_Boolean SkipFace = Standard_False) ;
  
  Standard_EXPORT     void UpdateDescendants(const Handle(BOP_HistoryCollector)& aHistory,const TopoDS_Shape& SResult,const Standard_Boolean SkipFace = Standard_False) ;
  
  Standard_EXPORT     void UpdateDescendants(const Handle(TopOpeBRepBuild_HBuilder)& B,const TopoDS_Shape& SResult,const Standard_Boolean SkipFace = Standard_False) ;
  
  Standard_EXPORT     Standard_Boolean TransformShapeFU(const Standard_Integer flag) ;


Standard_Boolean myFuse;
Standard_Boolean myModify;
TopTools_DataMapOfShapeListOfShape myMap;
TopoDS_Shape myFShape;
TopoDS_Shape myLShape;
TopTools_ListOfShape myNewEdges;
TopTools_ListOfShape myTgtEdges;
BRepFeat_PerfSelection myPerfSelection;
Standard_Boolean myJustGluer;
Standard_Boolean myJustFeat;
TopoDS_Shape mySbase;
TopoDS_Face mySkface;
TopoDS_Shape myGShape;
TopoDS_Shape mySFrom;
TopoDS_Shape mySUntil;
TopTools_DataMapOfShapeShape myGluedF;


private:



Standard_Boolean mySbOK;
Standard_Boolean mySkOK;
Standard_Boolean myGSOK;
Standard_Boolean mySFOK;
Standard_Boolean mySUOK;
Standard_Boolean myGFOK;
Standard_Boolean myPSOK;
BRepFeat_StatusError myStatusError;


};


#include <BRepFeat_Form.lxx>



// other Inline functions and methods (like "C++: function call" methods)


#endif