summaryrefslogtreecommitdiff
path: root/inc/BRepFeat_LocalOperation.hxx
blob: 698c2822d015e16603600603c61fee01b1ce9187 (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
// 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_LocalOperation_HeaderFile
#define _BRepFeat_LocalOperation_HeaderFile

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

#ifndef _BRepFeat_Builder_HeaderFile
#include <BRepFeat_Builder.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
class StdFail_NotDone;
class Standard_ConstructionError;
class TopoDS_Shape;
class TopTools_ListOfShape;


//! One of the most significant <br>
//! aspects of BRepFeat functionality is the use of local operations as <br>
//! opposed to global ones. In a global operation, you would first <br>
//! construct a form of the type you wanted in your final feature, and <br>
//! then remove matter so that it could fit into your initial basis <br>
//! object. In a local operation, however, you specify the domain <br>
//! of the feature construction with aspects of the shape on which the <br>
//! feature is being created. These semantics are expressed in terms <br>
//! of a member shape of the basis shape from which - or up to which <br>
//! - matter will be added or removed. As a result, local <br>
//! operations make calculations simpler and faster than global operations. <br>
//! In BRepFeat, the semantics of local operations define features <br>
//! constructed from a contour or a part of the basis shape referred to as the tool. <br>
class BRepFeat_LocalOperation  : public BRepFeat_Builder {
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); 
  }

  //! Builds the framework to store the topological shape <br>
//! which is to be created by the local operation. <br>
//! Initializes the empty constructor. <br>
      BRepFeat_LocalOperation();
  //! Builds the framework to store the topological shape <br>
//! which is to be created by the local operation. <br>
//! Initializes shape S for a local operation. <br>
//! The exception ConstructionError is raised if <S> is a null shape. <br>
      BRepFeat_LocalOperation(const TopoDS_Shape& S);
  //! Builds the framework to store the topological shape <br>
//! which is to be created by the local operation. <br>
//! Initializes S1 and S2 for a local operation. <br>
//! The exception ConstructionError is raised if <S> is a null shape. <br>
      BRepFeat_LocalOperation(const TopoDS_Shape& S1,const TopoDS_Shape& S2);
  //! Performs the local operation on the formerly given <br>
//!          shape,  with the tool <T>.  <L>  defines  a set of <br>
//!          faces  of  the shape.  The list  may not be empty. <br>
//!          The boolean <Fuse> gives the type of operation. If <br>
//!          set to  Standard_True, the operation  is a fusion. <br>
//!          If  set  to Standard_False,   the operation   is a <br>
//!          cutting one. <br>
//! <br>
//!          The Perform process stops just before constructing <br>
//!          any result in order to authorize  the selection of <br>
//!          parts of the tool.  After a call to Perform, it is <br>
//!          possible   to call     BuilPartsOfTool,       then <br>
//!          RemovePart/ActivatePart to select valid parts, and <br>
//!          it  is necessary to  call PerformResult to get any <br>
//!          result. <br>
        void Perform(const TopoDS_Shape& T,const TopTools_ListOfShape& L,const Standard_Boolean Fuse) ;
  //! Performs the local operation on the formerly given <br>
//!          shape and tool.  <LShape>  defines a set  of faces <br>
//!          of the shape, <LTool> a set of  faces of the tool. <br>
//!          The boolean  <Fuse> gives the  type of  operation. <br>
//!          If  set  to   Standard_True,  the operation  is  a <br>
//!          fusion.   If  set to Standard_False, the operation <br>
//!          is a cutting one.  If <LShape> (resp.  <LTool>) is <br>
//!          empty, the whole shape (resp.  tool) is used. <br>
//! <br>
//!          The Perform process stops just before constructing <br>
//!          any result in  order to authorize the selection of <br>
//!          parts of the tool.  After a call to Perform, it is <br>
//!          possible     to   call     BuilPartsOfTool,   then <br>
//!          RemovePart/ActivatePart to select valid parts, and <br>
//!          it is necessary  to call PerformResult to  get any <br>
//!          result. <br>
        void Perform(const TopTools_ListOfShape& LShape,const TopTools_ListOfShape& LTool,const Standard_Boolean Fuse) ;
  //! Constructs the primitive which serves as the tool for the <br>
//! feature construction. Gives faces concerned by the <br>
//! construction and builds by performing one of the <br>
//! Boolean operations on the two intersecting shapes. <br>
//!    Raises NotDone from StdFail if no call to Perform has been done. <br>
        void BuildPartsOfTool() ;
  //! Returns  the list of  the  parts of tool.  Each of <br>
//!          these parts is a TopoDS_Shell. <br>
//! Raises NotDone  if no  call to BuildPartsOfTool has been done. <br>
       const TopTools_ListOfShape& PartsOfTool() const;
  //! Removes <S> from the list of valid parts of tool. <br>
//! Raises NotDone  if no  call to BuildPartsOfTool has <br>
//! been done. <br>
        void RemovePart(const TopoDS_Shape& S) ;
  //! By default, all tool parts are valid for the local operation. <br>
//!        This method removes <S>  from  the list  of  invalid parts  of <br>
//!          tool. By default, all parts  of tool are valid for <br>
//!          the local operation. <br>
        void ActivatePart(const TopoDS_Shape& S) ;
  //! Builds the    resulting shape  (redefined     from <br>
//!          MakeShape). Invalidates the  given parts  of tools <br>
//!          if  any,   and performs the  result   of the local <br>
//!          operation. <br>
  Standard_EXPORT   virtual  void Build() ;





protected:





private:





};


#include <BRepFeat_LocalOperation.lxx>



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


#endif