1 -- File: BRepFeat_LocalOperation.cdl
2 -- Created: Tue Jun 13 11:27:01 1995
3 -- Author: Jacques GOUSSARD
5 ---Copyright: Matra Datavision 1995
8 class LocalOperation from BRepFeat inherits Builder from BRepFeat
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.
26 ListOfShape from TopTools
30 ConstructionError from Standard
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;
42 Create(S: Shape from TopoDS)
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;
52 Create(S1,S2: Shape from TopoDS)
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;
61 -- Init(me: in out; S: Shape from TopoDS) is inherited from BRepFeat_Builder.
63 -- Init(me: in out; S,T: Shape from TopoDS) is inherited from BRepFeat_Builder.
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
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
86 raises ConstructionError from Standard
87 --- The exception is raised if <T> is null or same as the shape.
92 Perform(me: in out; LShape : ListOfShape from TopTools;
93 LTool : ListOfShape from TopTools;
94 Fuse : Boolean from Standard)
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.
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
114 raises ConstructionError from Standard
115 --- The exception is raised if <T> is a null shape.
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.
127 raises NotDone from StdFail
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&
138 raises NotDone from StdFail
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
148 raises NotDone from StdFail
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.
158 raises NotDone from StdFail
159 -- The exception is raised if no call to BuildPartsOfTool has
163 --- Redefinition of BRepBuilderAPI_MakeShape methods
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