0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / BRepAlgoAPI / BRepAlgoAPI_Section.cdl
CommitLineData
b311480e 1-- Created on: 1994-02-18
2-- Created by: Remi LEQUETTE
3-- Copyright (c) 1994-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 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
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
b311480e 16
7fd59977 17-- modified by Michael KLOKOV Wed Mar 6 15:01:25 2002
7fd59977 18
b1d15f53 19class Section from BRepAlgoAPI
20 inherits BooleanOperation from BRepAlgoAPI
49b0c452 21
22 ---Purpose:
23 -- The algorithm is to build a Secton operation between arguments and tools.
24 -- The result of Section operation consists of vertices and edges.
25 -- The result of Section operation contains:
26 -- 1. new vertices that are subjects of V/V, E/E, E/F, F/F interferences
27 -- 2. vertices that are subjects of V/E, V/F interferences
28 -- 3. new edges that are subjects of F/F interferences
29 -- 4. edges that are Common Blocks
7fd59977 30
49b0c452 31 -- The vertex is included in Section only when it is not shared
32 -- between the edges above
33 -- --
34
35 -- Default values:
36 -- - geometries built are NOT approximated.
37 -- - PCurves are NOT computed on both parts.
38
39 -- Example of use:
40 -- Standard_Boolean bRunParallel;
41 -- Standard_Integer iErr;
42 -- BRepAlgoAPI_Section aSection;
43 -- //
44 -- bRunParallel=...; // turn parallelism on/off
45 -- const TopTools_ListOfShape& aLS=...; // Arguments
46 -- const TopTools_ListOfShape& aLT=...; // Tools
47 -- //
48 -- aSection.SetRunParallel();
49 -- aSection.SetArguments(aLS);
50 -- aSection.SetTools(aLT);
51 -- aSection.Approximation(Standard_True);
52 -- //
53 -- aSection.Build(); // perform the algorithm
54 -- iErr=pBuilder->ErrorStatus();
55 -- if (iErr) {
56 -- // errors occured
57 -- return 0;
58 -- }
59 -- //
60 -- const TopoDS_Shape& aR=aSection.Shape();// the result
61 -- //...
62
63
7fd59977 64uses
65 Pln from gp,
66 Shape from TopoDS,
67 Surface from Geom,
68 Curve from Geom2d,
49b0c452 69 PaveFiller from BOPAlgo,
70 Operation from BOPAlgo,
71 ListOfShape from TopTools,
72 BaseAllocator from BOPCol
7fd59977 73
74is
b1d15f53 75 Create
76 returns Section from BRepAlgoAPI;
77 ---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_Section();"
78 --- Purpose: Empty constructor
49b0c452 79
80 Create (PF: PaveFiller from BOPAlgo)
81 returns Section from BRepAlgoAPI;
82 --- Purpose: Empty constructor
83 -- <PF> - PaveFiller object that is carried out
84
85 Create(S1 : Shape from TopoDS;
86 S2 : Shape from TopoDS;
87 PerformNow : Boolean = Standard_True)
88 returns Section from BRepAlgoAPI;
89 ---Purpose: Constructor with two shapes
90 -- <S1> -argument
91 -- <S2> -tool
92 -- <PerformNow> - the flag:
93 -- if <PerformNow>=True - the algorithm is performed immediatly
94 -- Obsolete
95
96 Create (S1 : Shape from TopoDS;
97 S2 : Shape from TopoDS;
b1d15f53 98 aDSF:PaveFiller from BOPAlgo;
99 PerformNow : Boolean = Standard_True)
100 returns Section from BRepAlgoAPI;
49b0c452 101 ---Purpose: Constructor with two shapes
102 -- <S1> -argument
103 -- <S2> -tool
104 -- <PF> - PaveFiller object that is carried out
105 -- <PerformNow> - the flag:
106 -- if <PerformNow>=True - the algorithm is performed immediatly
107 -- Obsolete
7fd59977 108
49b0c452 109 Create(S1 : Shape from TopoDS;
110 Pl : Pln from gp;
111 PerformNow : Boolean = Standard_True)
b1d15f53 112 returns Section from BRepAlgoAPI;
49b0c452 113 ---Purpose: Constructor with two shapes
114 -- <S1> - argument
115 -- <Pl> - tool
116 -- <PerformNow> - the flag:
117 -- if <PerformNow>=True - the algorithm is performed immediatly
118 -- Obsolete
b1d15f53 119
7fd59977 120
49b0c452 121 Create(S1 : Shape from TopoDS;
122 Sf : Surface from Geom;
123 PerformNow : Boolean = Standard_True)
b1d15f53 124 returns Section from BRepAlgoAPI;
49b0c452 125 ---Purpose: Constructor with two shapes
126 -- <S1> - argument
127 -- <Sf> - tool
128 -- <PerformNow> - the flag:
129 -- if <PerformNow>=True - the algorithm is performed immediatly
130 -- Obsolete
b1d15f53 131
7fd59977 132
b1d15f53 133 Create(Sf : Surface from Geom;
49b0c452 134 S2 : Shape from TopoDS;
135 PerformNow : Boolean = Standard_True)
b1d15f53 136 returns Section from BRepAlgoAPI;
49b0c452 137 ---Purpose: Constructor with two shapes
138 -- <Sf> - argument
139 -- <S2> - tool
140 -- <PerformNow> - the flag:
141 -- if <PerformNow>=True - the algorithm is performed immediatly
142 -- Obsolete
b1d15f53 143
144 Create(Sf1 : Surface from Geom;
49b0c452 145 Sf2 : Surface from Geom;
146 PerformNow : Boolean = Standard_True)
b1d15f53 147 returns Section from BRepAlgoAPI;
49b0c452 148 ---Purpose:
149 ---Purpose: Constructor with two shapes
150 -- <Sf1> - argument
151 -- <Sf2> - tool
152 -- <PerformNow> - the flag:
153 -- if <PerformNow>=True - the algorithm is performed immediatly
154 -- Obsolete
7fd59977 155
b1d15f53 156 Init1(me : out;
157 S1 : Shape from TopoDS);
49b0c452 158 ---Purpose: initialize the argument
159 -- <S1> - argument
160 -- Obsolete
161
b1d15f53 162 Init1(me : out;
49b0c452 163 Pl : Pln from gp);
164 ---Purpose: initialize the argument
165 -- <Pl> - argument
166 -- Obsolete
167
b1d15f53 168 Init1(me : out;
169 Sf : Surface from Geom);
49b0c452 170 ---Purpose: initialize the argument
171 -- <Sf> - argument
172 -- Obsolete
173
b1d15f53 174 Init2(me : out;
175 S2 : Shape from TopoDS);
49b0c452 176 ---Purpose: initialize the tool
177 -- <S2> - tool
178 -- Obsolete
179
b1d15f53 180 Init2(me : out;
181 Pl : Pln from gp);
49b0c452 182 ---Purpose: initialize the tool
183 -- <Pl> - tool
184 -- Obsolete
7fd59977 185
b1d15f53 186 Init2(me : out;
187 Sf : Surface from Geom);
49b0c452 188 ---Purpose: initialize the tool
189 -- <Sf> - tool
190 -- Obsolete
191
b1d15f53 192 Approximation(me : out;
193 B : Boolean from Standard);
49b0c452 194 ---Purpose:
195 --Defines an option for computation
196 -- of further intersections.
197 -- By default, the underlying 3D geometry attached to each
198 -- elementary edge of the result is:
199 -- - analytic where possible, provided the corresponding
200 -- geometry corresponds to a type of analytic curve defined in
201 -- - or elsewhere, given as a succession of points grouped
202 -- together in a BSpline curve of degree 1.
203 -- If Approx equals true, these edges will have an attached 3D
204 -- geometry which is a BSpline approximation of the computed
205 -- set of points.
206 -- Note that as a result, approximations will be computed
207 -- on edges built only on new intersection curves.
7fd59977 208
b1d15f53 209 ComputePCurveOn1(me : out;
210 B : Boolean from Standard);
49b0c452 211 ---Purpose:
212 -- Indicates whether the P-Curve should be (or not)
213 -- performed on the argument.
214 -- By default, no parametric 2D curve (pcurve) is defined for the
215 -- edges of the result.
216 -- If ComputePCurve1 equals true, further computations performed
217 -- to attach an P-Curve in the parametric space of the argument
218 -- to the constructed edges.
219 -- Obsolete
220
b1d15f53 221 ComputePCurveOn2(me : out;
222 B : Boolean from Standard);
49b0c452 223 ---Purpose:
224 -- Indicates whether the P-Curve should be (or not)
225 -- performed on the tool.
226 -- By default, no parametric 2D curve (pcurve) is defined for the
227 -- edges of the result.
228 -- If ComputePCurve1 equals true, further computations performed
229 -- to attach an P-Curve in the parametric space of the tool
230 -- to the constructed edges.
231 -- Obsolete
b1d15f53 232
49b0c452 233 Build(me : in out)
234 is redefined;
235 ---Purpose: Performs the algorithm
236 -- Filling interference Data Structure (if it is necessary)
237 -- Building the result of the operation.
238
b1d15f53 239 HasAncestorFaceOn1(me;
240 E : Shape from TopoDS;
241 F : out Shape from TopoDS)
242 returns Boolean from Standard;
b1d15f53 243 ---Purpose:
244 -- get the face of the first part giving section edge <E>.
245 -- Returns True on the 3 following conditions :
49b0c452 246 -- 1/ <E> is an edge returned by the Shape() metwod.
b1d15f53 247 -- 2/ First part of section performed is a shape.
248 -- 3/ <E> is built on a intersection curve (i.e <E>
249 -- is not the result of common edges)
250 -- When False, F remains untouched.
49b0c452 251 -- Obsolete
252
b1d15f53 253 HasAncestorFaceOn2(me;
254 E : Shape from TopoDS;
255 F : out Shape from TopoDS)
256 returns Boolean from Standard;
257 ---Purpose: Identifies the ancestor faces of
258 -- the intersection edge E resulting from the last
259 -- computation performed in this framework, that is, the faces of
260 -- the two original shapes on which the edge E lies:
261 -- - HasAncestorFaceOn1 gives the ancestor face in the first shape, and
262 -- - HasAncestorFaceOn2 gives the ancestor face in the second shape.
263 -- These functions return true if an ancestor face F is found, or false if not.
264 -- An ancestor face is identifiable for the edge E if the following
265 -- conditions are satisfied:
266 -- - the first part on which this algorithm performed its
267 -- last computation is a shape, that is, it was not given as
268 -- a surface or a plane at the time of construction of this
269 -- algorithm or at a later time by the Init1 function,
270 -- - E is one of the elementary edges built by the
271 -- last computation of this section algorithm.
272 -- To use these functions properly, you have to test the returned
273 -- Boolean value before using the ancestor face: F is significant
274 -- only if the returned Boolean value equals true.
49b0c452 275 -- Obsolete
b1d15f53 276
49b0c452 277 --
278 -- protected methods
279 --
280 Init(me: out;
281 PerformNow : Boolean)
282 is protected;
283
284 SetAttributes (me:out)
285 is redefined protected;
286
7fd59977 287fields
49b0c452 288 myParametersChanged : Boolean from Standard;
7fd59977 289 myApprox : Boolean from Standard;
290 myComputePCurve1 : Boolean from Standard;
291 myComputePCurve2 : Boolean from Standard;
292
293end Section from BRepAlgoAPI;