0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / BRepFill / BRepFill_PipeShell.cdl
CommitLineData
b311480e 1-- Created on: 1998-07-22
2-- Created by: Philippe MANGIN
3-- Copyright (c) 1998-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.
7fd59977 16
17class PipeShell from BRepFill inherits TShared from MMgt
18
ff8178ef 19 ---Purpose: Computes a topological shell using some wires
20 -- (spines and profiles) and diplacement option
21 -- Perform general sweeping construction
7fd59977 22uses
23 Dir from gp,
d7325741
J
24 Ax2 from gp,
25 Trsf from gp,
7fd59977 26 Function from Law,
27 ListOfShape from TopTools,
28 HArray2OfShape from TopTools,
29 Shape from TopoDS,
30 Wire from TopoDS,
31 Vertex from TopoDS,
32 TransitionStyle from BRepFill,
33 Trihedron from GeomFill,
34 PipeError from GeomFill,
35 LocationLaw from BRepFill,
36 SectionLaw from BRepFill,
37 Section from BRepFill,
38 Sweep from BRepFill,
39 DataMapOfShapeListOfShape from TopTools,
f9032cf2 40 SequenceOfSection from BRepFill,
41 TypeOfContact from BRepFill
7fd59977 42
43raises
44 DomainError from Standard,
45 NotDone from StdFail
46
47is
48 Create( Spine : Wire from TopoDS)
49 ---Level: Public
50 returns PipeShell from BRepFill;
51
52-- =================================
53-- Methodes Set
54-- =================================
55 ---Purpose: Set an sweep's mode
56 -- If no mode are setted, the mode use in MakePipe is used
57 ---See Also: GeomFill_IsCorrectedFrenet
58
59 Set(me : mutable; Frenet : Boolean = Standard_False);
60 ---Purpose: Set an Frenet or an CorrectedFrenet trihedron
61 -- to perform the sweeping
62 ---Level: Public
63 ---See Also:GeomFill_IsCorrectedFrenet
64
a31abc03 65 SetDiscrete(me : mutable);
66 ---Purpose: Set a Discrete trihedron
67 -- to perform the sweeping
68 ---Level: Public
69 ---See Also:GeomFill_IsDiscreteTrihedron
70
7fd59977 71 Set(me : mutable; Axe : Ax2 from gp);
72 ---Purpose: Set an fixed trihedron to perform the sweeping
73 -- all sections will be parallel.
74 ---Level: Public
75 ---See Also: GeomFill_IsFixed
76
77 Set(me : mutable; BiNormal : Dir from gp);
78 ---Purpose: Set an fixed BiNormal direction to perform
79 -- the sweeping
80 ---Level: Public
81 ---See Also: GeomFill_IsConstantNormal
82
83 Set(me : mutable; SpineSupport : Shape from TopoDS)
84 ---Purpose: Set support to the spine to define the BiNormal
85 -- at the spine, like the normal the surfaces.
86 -- Warning: To be effective, Each edge of the <spine> must
87 -- have an representaion on one face of<SpineSupport>
88 ---Level: Public
89 ---See Also: GeomFill_IsDarboux
90 returns Boolean;
91
92 Set(me : mutable;
93 AuxiliarySpine : Wire from TopoDS;
94 CurvilinearEquivalence : Boolean = Standard_True;
f9032cf2 95 KeepContact : TypeOfContact from BRepFill = BRepFill_NoContact );
7fd59977 96
97 ---Purpose: Set an auxiliary spine to define the Normal
98 -- For each Point of the Spine P, an Point Q is evalued
99 -- on <AuxiliarySpine>
100 -- If <CurvilinearEquivalence>
101 -- Q split <AuxiliarySpine> with the same length ratio
102 -- than P split <Spline>.
103 -- Else the plan define by P and the tangent to the <Spine>
104 -- intersect <AuxiliarySpine> in Q.
2a62d883 105 -- If <KeepContact> equals BRepFill_NoContact: The Normal is defined
106 -- by the vector PQ.
107 -- If <KeepContact> equals BRepFill_Contact: The Normal is defined to
108 -- achieve that the sweeped section is in contact to the
109 -- auxiliarySpine. The width of section is constant all along the path.
110 -- In other words, the auxiliary spine lies on the swept surface,
111 -- but not necessarily is a boundary of this surface. However,
112 -- the auxiliary spine has to be close enough to the main spine
113 -- to provide intersection with any section all along the path.
114 -- If <KeepContact> equals BRepFill_ContactOnBorder: The auxiliary spine
115 -- becomes a boundary of the swept surface and the width of section varies
116 -- along the path.
7fd59977 117
118 ---Level: Public
119
e9216c6a 120
121-- ============================================
122-- Methods to set parameters for approximation
123-- ============================================
124 SetMaxDegree(me : mutable;
125 NewMaxDegree : Integer from Standard);
126 ---Purpose: Define the maximum V degree of resulting surface
127
128 SetMaxSegments(me : mutable;
129 NewMaxSegments : Integer from Standard);
130 ---Purpose: Define the maximum number of spans in V-direction
131 -- on resulting surface
132
a31abc03 133 SetForceApproxC1(me : mutable;
134 ForceApproxC1 : Boolean from Standard);
135 ---Purpose: Set the flag that indicates attempt to approximate
136 -- a C1-continuous surface if a swept surface proved
137 -- to be C0.
138
139
7fd59977 140-- =================================
141-- Methodes to define section(s)
142-- =================================
143 ---Purpose: Give section to sweep.
144 -- Possibilities are :
145 -- - Give one or sevral profile
146 -- - Give one profile and an homotetic law.
147 -- - Automatic compute of correspondance beetween profile, and section
148 -- on the sweeped shape
149 -- - correspondance beetween profile, and section on the sweeped shape
150 -- defined by a vertex of the spine
151
152 -- -"WithCorrection" The profile is rotated to have a Normal --
153 -- parallel to the trihedron's normal and have tangent
154 -- perpendicular to the trihedron's tangent.
155
156
157 Add(me:mutable;
158 Profile : Shape from TopoDS;
159 WithContact : Boolean = Standard_False;
160 WithCorrection : Boolean = Standard_False );
161 ---Purpose: Set an section. The corespondance with the spine, will
162 -- be automaticaly performed.
163 ---Level: Public
164
165 Add(me:mutable;
166 Profile : Shape from TopoDS;
167 Location : Vertex from TopoDS;
168 WithContact : Boolean = Standard_False;
169 WithCorrection : Boolean = Standard_False)
170 ---Purpose: Set an section. The corespondance with the spine, is
171 -- given by <Location>
172
173 ---Level: Public
174 raises DomainError; -- if the <Spine> do not contain <Location>
175
176 SetLaw(me :mutable;
177 Profile : Shape from TopoDS;
178 L : Function from Law;
179 WithContact : Boolean = Standard_False;
180 WithCorrection : Boolean = Standard_False);
181 ---Purpose: Set an section and an homotetic law.
182 -- The homotetie's centers is given by point on the <Spine>.
183 ---Level: Public
184
185
186 SetLaw(me :mutable;
187 Profile : Shape from TopoDS;
188 L : Function from Law;
189 Location : Vertex from TopoDS;
190 WithContact : Boolean = Standard_False;
191 WithCorrection : Boolean = Standard_False);
192 ---Purpose: Set an section and an homotetic law.
193 -- The homotetie center is given by point on the <Spine>
194 ---Level: Public
195
196
197 Delete(me : mutable; Profile : Shape from TopoDS);
198 ---Purpose: Delete an section.
199 ---Level: Public
200
201
202-- ========================================
203-- Methodes to perform and read shape
204-- ========================================
205 IsReady(me)
206 ---Purpose: Say if <me> is ready to build the shape
207 -- return False if <me> do not have section definition
208 returns Boolean;
209
210 GetStatus(me)
211 ---Purpose: Get a status, when Simulate or Build failed.
212 returns PipeError from GeomFill;
213
214 SetTolerance(me : mutable;
215 Tol3d : Real = 1.0e-4;
216 BoundTol : Real = 1.0e-4;
217 TolAngular : Real = 1.0e-2);
218
219 SetTransition(me : mutable;
220 Mode :TransitionStyle from BRepFill
221 = BRepFill_Modified;
222 Angmin : Real = 1.0e-2;
223 Angmax : Real = 6.0)
224 ---Purpose: Set the Transition Mode to manage discontinuities
225 -- on the sweep.
226 ---Level: Public
227 is static;
228
229 Simulate(me : mutable;
230 NumberOfSection : Integer;
231 Sections : out ListOfShape from TopTools)
232 ---Purpose: Perform simulation of the sweep :
233 -- Somes Section are returned.
234 ---Level: Public
235 raises NotDone; -- If <me> it is not Ready
236
237
238 Build(me : mutable)
239 ---Purpose: Builds the resulting shape (redefined from MakeShape).
240 ---Level: Public
241 returns Boolean
242 raises NotDone -- If <me> it is not Ready
243 is static;
244
245 MakeSolid(me : mutable)
246 ---Purpose: Transform the sweeping Shell in Solid.
247 -- If the section are not closed returns False
248 ---Level: Public
249 returns Boolean
250 raises NotDone; -- If <me> is not Builded;
251
252 Shape (me)
253 ---Purpose: Returns the result Shape.
254 ---C++: return const &
255 ---Level: Public
256 returns Shape from TopoDS
257 is static;
258
73920cd4 259 ErrorOnSurface (me)
260 returns Real from Standard;
261
7fd59977 262 FirstShape (me)
263 ---Purpose: Returns the TopoDS Shape of the bottom of the sweep.
264 ---C++: return const &
265 ---Level: Public
266 returns Shape from TopoDS
267 is static;
268
269 LastShape (me)
270 ---Purpose: Returns the TopoDS Shape of the top of the sweep.
271 ---C++: return const &
272 ---Level: Public
273 returns Shape from TopoDS
274 is static;
275
276 Generated (me: mutable;
277 S : Shape from TopoDS;
278 L : out ListOfShape from TopTools)
279 ---Purpose: Returns the list of shapes generated from the
280 -- shape <S>.
281 ---Level: Public
282 is static;
283
284 Prepare(me: mutable) is private;
285
286 Place(me : mutable;
287 Sec : Section from BRepFill;
288 W : out Wire from TopoDS;
d7325741 289 Trsf : out Trsf from gp;
7fd59977 290 param : out Real from Standard) is private;
291
292 ResetLoc(me : mutable) is private;
f9032cf2 293
7fd59977 294 BuildHistory(me: mutable; theSweep: Sweep from BRepFill)
295 is private;
296
297fields
298 mySpine : Wire from TopoDS;
299 myFirst : Shape from TopoDS;
300 myLast : Shape from TopoDS;
301 myShape : Shape from TopoDS;
302 mySeq : SequenceOfSection from BRepFill;
303
304 myGenMap : DataMapOfShapeListOfShape from TopTools;
305
306 myTol3d : Real;
307 myBoundTol : Real;
a31abc03 308 myTolAngular : Real;
7fd59977 309 angmin, angmax : Real;
e9216c6a 310 myMaxDegree : Integer;
311 myMaxSegments : Integer;
a31abc03 312 myForceApproxC1 : Boolean;
7fd59977 313
314 myLaw : Function from Law;
f9032cf2 315 myIsAutomaticLaw : Boolean from Standard;
7fd59977 316 myLocation : LocationLaw from BRepFill;
317 mySection : SectionLaw from BRepFill;
318 myFaces : HArray2OfShape from TopTools;
319 myTrihedron : Trihedron from GeomFill;
320 myTransition : TransitionStyle from BRepFill;
321 myStatus : PipeError from GeomFill;
73920cd4 322 myErrorOnSurf : Real from Standard;
323
7fd59977 324end PipeShell;
325
326
327
328
329