0022627: Change OCCT memory management defaults
[occt.git] / src / BRepFeat / BRepFeat_LocalOperation.cdl
1 -- File:        BRepFeat_LocalOperation.cdl
2 -- Created:     Tue Jun 13 11:27:01 1995
3 -- Author:      Jacques GOUSSARD
4 --              <jag@bravox>
5 ---Copyright:    Matra Datavision 1995
6
7
8 class LocalOperation from BRepFeat inherits Builder from BRepFeat
9
10         ---Purpose: One of the most significant
11         -- aspects of BRepFeat functionality is the use of local operations as
12         -- opposed to global ones. In a global operation, you would first
13         -- construct a form of the type you wanted in your final feature, and
14         -- then remove matter so that it could fit into your initial basis
15         -- object. In a local operation, however, you specify the domain
16         -- of the feature construction with aspects of the shape on which the
17         -- feature is being created. These semantics are expressed in terms
18         -- of a member shape of the basis shape from which - or up to which
19         -- - matter will be added or removed. As a result, local
20         -- operations make calculations simpler and faster than global operations.
21         -- In BRepFeat, the semantics of local operations define features
22         -- constructed from a contour or a part of the basis shape referred to as the tool.
23
24 uses 
25     Shape       from TopoDS,
26     ListOfShape from TopTools
27
28 raises
29     NotDone           from StdFail,
30     ConstructionError from Standard
31
32 is
33
34     Create
35         ---Purpose: Builds the framework to store the topological shape
36         -- which is to be created by the local operation.
37         -- Initializes the empty constructor.
38         returns LocalOperation from BRepFeat;
39         ---C++: inline  
40
41          
42     Create(S: Shape from TopoDS)
43         ---C++: inline
44         ---Purpose: Builds the framework to store the topological shape
45         -- which is to be created by the local operation.
46         -- Initializes shape S for a local operation.
47         -- The exception ConstructionError is raised if <S> is a null shape.
48         returns LocalOperation from BRepFeat
49         raises ConstructionError from Standard;
50
51
52     Create(S1,S2: Shape from TopoDS)
53         ---C++: inline
54         ---Purpose: Builds the framework to store the topological shape
55         -- which is to be created by the local operation.
56         -- Initializes S1 and S2 for a local operation.
57         -- The exception ConstructionError is raised if <S> is a null shape.
58         returns LocalOperation from BRepFeat
59         raises ConstructionError from Standard;
60
61 --  Init(me: in out; S: Shape from TopoDS) is inherited from BRepFeat_Builder.
62
63 --  Init(me: in out; S,T: Shape from TopoDS) is inherited from BRepFeat_Builder.
64
65
66     Perform(me: in out; T    : Shape from TopoDS;
67                         L    : ListOfShape from TopTools;
68                         Fuse : Boolean from Standard)
69         ---Purpose: Performs the local operation on the formerly given
70         --          shape,  with the tool <T>.  <L>  defines  a set of
71         --          faces  of  the shape.  The list  may not be empty.
72         --          The boolean <Fuse> gives the type of operation. If
73         --          set to  Standard_True, the operation  is a fusion.
74         --          If  set  to Standard_False,   the operation   is a
75         --          cutting one.
76         --          
77         --          The Perform process stops just before constructing
78         --          any result in order to authorize  the selection of
79         --          parts of the tool.  After a call to Perform, it is
80         --          possible   to call     BuilPartsOfTool,       then
81         --          RemovePart/ActivatePart to select valid parts, and
82         --          it  is necessary to  call PerformResult to get any
83         --          result. 
84         ---C++: inline
85
86         raises ConstructionError from Standard
87         --- The exception is raised if <T> is null or same as the shape.
88         is static;
89
90
91
92     Perform(me: in out; LShape : ListOfShape from TopTools;
93                         LTool  : ListOfShape from TopTools;
94                         Fuse   : Boolean from Standard)
95
96         ---Purpose: Performs the local operation on the formerly given
97         --          shape and tool.  <LShape>  defines a set  of faces
98         --          of the shape, <LTool> a set of  faces of the tool.
99         --          The boolean  <Fuse> gives the  type of  operation.
100         --          If  set  to   Standard_True,  the operation  is  a
101         --          fusion.   If  set to Standard_False, the operation
102         --          is a cutting one.  If <LShape> (resp.  <LTool>) is
103         --          empty, the whole shape (resp.  tool) is used. 
104         --          
105         --          The Perform process stops just before constructing
106         --          any result in  order to authorize the selection of
107         --          parts of the tool.  After a call to Perform, it is
108         --          possible     to   call     BuilPartsOfTool,   then
109         --          RemovePart/ActivatePart to select valid parts, and
110         --          it is necessary  to call PerformResult to  get any
111         --          result.  
112         ---C++: inline
113
114         raises ConstructionError from Standard
115         --- The exception is raised if <T> is a null shape.
116         is static;
117
118
119
120     BuildPartsOfTool(me: in out)
121         ---Purpose: Constructs the primitive which serves as the tool for the
122         -- feature construction. Gives faces concerned by the
123         -- construction and builds by performing one of the
124         -- Boolean operations on the two intersecting shapes.
125         --    Raises NotDone from StdFail if no call to Perform has been done.
126                 ---C++: inline
127                 raises NotDone from StdFail
128                 is static;
129     
130
131     PartsOfTool(me)
132         ---Purpose: Returns  the list of  the  parts of tool.  Each of
133         --          these parts is a TopoDS_Shell.
134         -- Raises NotDone  if no  call to BuildPartsOfTool has been done. 
135     returns ListOfShape from TopTools
136         ---C++: return const&
137         ---C++: inline
138         raises NotDone from StdFail
139         
140         is static;
141
142
143     RemovePart(me: in out; S: Shape from TopoDS)
144         ---Purpose: Removes <S> from the list of valid parts of tool.
145         -- Raises NotDone  if no  call to BuildPartsOfTool has
146         -- been done. 
147                 ---C++: inline
148                 raises NotDone from StdFail
149                 is static;
150
151
152     ActivatePart(me: in out; S: Shape from TopoDS)
153         ---Purpose: By default, all tool parts are valid for the local operation.
154         --        This method removes <S>  from  the list  of  invalid parts  of
155         --          tool. By default, all parts  of tool are valid for
156         --          the local operation.
157         ---C++: inline
158         raises NotDone from StdFail
159         -- The exception is raised if no  call to BuildPartsOfTool has
160         -- been done. 
161         is static;
162         
163 --- Redefinition of BRepBuilderAPI_MakeShape methods
164 --  
165 --  
166
167     Build(me: in out)
168         ---Purpose: Builds the    resulting shape  (redefined     from
169         --          MakeShape). Invalidates the  given parts  of tools
170         --          if  any,   and performs the  result   of the local
171         --          operation.
172
173         is redefined;
174
175 end LocalOperation;