0022627: Change OCCT memory management defaults
[occt.git] / src / BRepOffsetAPI / BRepOffsetAPI_MakePipeShell.cdl
CommitLineData
7fd59977 1-- File: BRepOffsetAPI_MakePipeShell.cdl
2-- Created: Wed Apr 8 11:52:57 1998
3-- Author: Philippe MANGIN
4-- <pmn@sgi29>
5---Copyright: Matra Datavision 1998
6
7
8class MakePipeShell from BRepOffsetAPI inherits MakeSweep from BRepPrimAPI
9
10 ---Purpose: This class provides for a framework to construct a shell
11 -- or a solid along a spine consisting in a wire.
12 -- To produce a solid, the initial wire must be closed.
13 -- Two approaches are used:
14 -- - definition by section
15 -- - by a section and a scaling law
16 -- - by addition of successive intermediary sections
17 -- - definition by sweep mode.
18 -- - pseudo-Frenet
19 -- - constant
20 -- - binormal constant
21 -- - normal defined by a surface support
22 -- - normal defined by a guiding contour.
23 -- The two global approaches can also be combined.
24 -- You can also close the surface later in order to form a solid.
25 -- Warning: In this version some limitation exist
26 -- -- We can add only 1 Section (else Standard_NotImplemented is raised
27 -- -- Mode with auxilary spine is incompatible with hometetic laws
28 -- -- Mode with auxilary spine and keep contact produce only CO surface.
29 -- -- Transition treatement is implemented only with the option <BRepBuilderAPI_Transformed>
30 -- Normaly all these limitations have to be deleted in mext version.
31uses
32 Dir from gp,
33 Ax2 from gp,
34 Function from Law,
35 ListOfShape from TopTools,
36 Shape from TopoDS,
37 Wire from TopoDS,
38 Vertex from TopoDS,
39 TransitionMode from BRepBuilderAPI,
40 PipeError from BRepBuilderAPI,
41 PipeShell from BRepFill
42
43raises
44 DomainError from Standard,
45 NotDone from StdFail
46
47is
48 Create( Spine : Wire from TopoDS)
49 --- Purpose: Constructs the shell-generating framework defined by the wire Spine.
50 returns MakePipeShell from BRepOffsetAPI;
51
52 ---Purpose: Sets an sweep's mode
53 -- If no mode are setted, the mode use in MakePipe is used
54 ---See Also: GeomFill_IsCorrectedFrenet
55
56 SetMode(me : in out; IsFrenet : Boolean = Standard_False);
57 ---Purpose: Sets a Frenet or a CorrectedFrenet trihedron
58 -- to perform the sweeping
59 -- If IsFrenet is false, a corrected Frenet trihedron is used.
60
61 SetMode(me : in out; Axe : Ax2 from gp);
62 ---Purpose: Sets a fixed trihedron to perform the sweeping
63 -- all sections will be parallel.
64
65
66 SetMode(me : in out; BiNormal : Dir from gp);
67 ---Purpose: Sets a fixed BiNormal direction to perform the --
68 -- sweeping. Angular relations beetween the
69 -- section(s) and <BiNormal> will be constant
70
71
72 SetMode(me : in out; SpineSupport : Shape from TopoDS)
73 ---Purpose: Sets support to the spine to define the BiNormal of
74 -- the trihedron, like the normal to the surfaces.
75 -- Warning: To be effective, Each edge of the <spine> must
76 -- have an representaion on one face of<SpineSupport>
77 returns Boolean;
78
79 SetMode(me : in out;
80 AuxiliarySpine : Wire from TopoDS;
81 CurvilinearEquivalence : Boolean;
82 KeepContact : Boolean = Standard_False );
83
84 ---Purpose: Sets an auxiliary spine to define the Normal
85 -- For each Point of the Spine P, an Point Q is evalued
86 -- on <AuxiliarySpine>
87 -- If <CurvilinearEquivalence>
88 -- Q split <AuxiliarySpine> with the same length ratio
89 -- than P split <Spline>.
90 -- Else the plan define by P and the tangent to the <Spine>
91 -- intersect <AuxiliarySpine> in Q.
92 -- If <KeepContact> the Normal is defined to assume like the sweeped
93 -- section is in contact to the <AuxiliarySpine>
94 -- Else the Normal is defined by the vector PQ.
95
96 ---Level: Public
97
98-- =================================
99-- Methodes to define section(s)
100-- =================================
101 ---Purpose: Give section to sweep.
102 -- Possibilities are :
103 -- - Give one or sevral section
104 -- - Give one profile and an homotetic law.
105 -- - Automatic compute of correspondance beetween spine, and section
106 -- on the sweeped shape
107 -- - correspondance beetween spine, and section on the sweeped shape
108 -- defined by a vertex of the spine
109
110 -- Option is :
111 -- -"WithContact" : The section is translated to be in
112 -- contact with the spine
113
114 -- -"WithCorrection" The section is rotated to have a Normal --
115 -- parallel to the trihedron's normal and have tangent
116 -- perpendicular to the trihedron's tangent.
117
118
119 Add(me:in out;
120 Profile : Shape from TopoDS;
121 WithContact : Boolean = Standard_False;
122 WithCorrection : Boolean = Standard_False );
123 ---Purpose: Adds the section Profile to this framework. First and last
124 -- sections may be punctual, so the shape Profile may be
125 -- both wire and vertex. Correspondent point on spine is
126 -- computed automatically.
127 -- If WithContact is true, the section is translated to be in
128 -- contact with the spine.
129 -- If WithCorrection is true, the section is rotated to be
130 -- orthogonal to the spine?s tangent in the correspondent
131 -- point. This option has no sense if the section is punctual
132 -- (Profile is of type TopoDS_Vertex).
133
134 Add(me:in out;
135 Profile : Shape from TopoDS;
136 Location : Vertex from TopoDS;
137 WithContact : Boolean = Standard_False;
138 WithCorrection : Boolean = Standard_False)
139 ---Purpose: Adds the section Profile to this framework.
140 -- Correspondent point on the spine is given by Location.
141 -- Warning:
142 -- To be effective, it is not recommended to combine methods Add and SetLaw.
143 raises DomainError;
144
145 SetLaw(me :in out;
146 Profile : Shape from TopoDS;
147 L : Function from Law;
148 WithContact : Boolean = Standard_False;
149 WithCorrection : Boolean = Standard_False);
150 ---Purpose: Sets the evolution law defined by the wire Profile with
151 -- its position (Location, WithContact, WithCorrection
152 -- are the same options as in methods Add) and a
153 -- homotetic law defined by the function L.
154 -- Warning:
155 -- To be effective, it is not recommended to combine methods Add and SetLaw.
156
157
158 SetLaw(me :in out;
159 Profile : Shape from TopoDS;
160 L : Function from Law;
161 Location : Vertex from TopoDS;
162 WithContact : Boolean = Standard_False;
163 WithCorrection : Boolean = Standard_False);
164 ---Purpose: Sets the evolution law defined by the wire Profile with
165 -- its position (Location, WithContact, WithCorrection
166 -- are the same options as in methods Add) and a
167 -- homotetic law defined by the function L.
168 -- Warning:
169 -- To be effective, it is not recommended to combine methods Add and SetLaw.
170
171 Delete(me : in out; Profile : Shape) ;
172 ---Purpose: Removes the section Profile from this framework.
173
174-- ========================================
175-- Methodes to perform and read shape
176-- ========================================
177 IsReady(me)
178 ---Purpose: Returns true if this tool object is ready to build the
179 -- shape, i.e. has a definition for the wire section Profile.
180 returns Boolean;
181
182 GetStatus(me)
183 ---Purpose: Get a status, when Simulate or Build failed. It can be
184 -- BRepBuilderAPI_PipeDone,
185 -- BRepBuilderAPI_PipeNotDone,
186 -- BRepBuilderAPI_PlaneNotIntersectGuide,
187 -- BRepBuilderAPI_ImpossibleContact.
188 returns PipeError from BRepBuilderAPI;
189
190
191 SetTolerance(me : in out;
192 Tol3d : Real = 1.0e-4;
193 BoundTol : Real = 1.0e-4;
194 TolAngular : Real = 1.0e-2);
195 ---Purpose: Sets the following tolerance values
196 -- - 3D tolerance Tol3d
197 -- - boundary tolerance BoundTol
198 -- - angular tolerance TolAngular.
199
200 SetTransitionMode(me : in out;
201 Mode :TransitionMode from BRepBuilderAPI = BRepBuilderAPI_Transformed)
202 ---Purpose: Sets the transition mode to manage discontinuities on
203 -- the swept shape caused by fractures on the spine. The
204 -- transition mode can be BRepBuilderAPI_Transformed
205 -- (default value), BRepBuilderAPI_RightCorner,
206 -- BRepBuilderAPI_RoundCorner:
207 -- - RepBuilderAPI_Transformed:
208 -- discontinuities are treated by
209 -- modification of the sweeping mode. The
210 -- pipe is "transformed" at the fractures of
211 -- the spine. This mode assumes building a
212 -- self-intersected shell.
213 -- - BRepBuilderAPI_RightCorner:
214 -- discontinuities are treated like right
215 -- corner. Two pieces of the pipe
216 -- corresponding to two adjacent
217 -- segments of the spine are extended
218 -- and intersected at a fracture of the spine.
219 -- - BRepBuilderAPI_RoundCorner:
220 -- discontinuities are treated like round
221 -- corner. The corner is treated as rotation
222 -- of the profile around an axis which
223 -- passes through the point of the spine?s
224 -- fracture. This axis is based on cross
225 -- product of directions tangent to the
226 -- adjacent segments of the spine at their common point.
227 -- Warnings
228 -- The mode BRepBuilderAPI_RightCorner provides a
229 -- valid result if intersection of two pieces of the pipe
230 -- (corresponding to two adjacent segments of the spine)
231 -- in the neighborhood of the spine?s fracture is
232 -- connected and planar. This condition can be violated if
233 -- the spine is non-linear in some neighborhood of the
234 -- fracture or if the profile was set with a scaling law.
235 -- The last mode, BRepBuilderAPI_RoundCorner, will
236 -- assuredly provide a good result only if a profile was set
237 -- with option WithCorrection = True, i.e. it is strictly
238 -- orthogonal to the spine.
239
240 is static;
241
242 Simulate(me : in out;
243 NumberOfSection : Integer;
244 Result : out ListOfShape from TopTools)
245 ---Purpose: Simulates the resulting shape by calculating its
246 -- cross-sections. The spine is devided by this
247 -- cross-sections into (NumberOfSection - 1) equal
248 -- parts, the number of cross-sections is
249 -- NumberOfSection. The cross-sections are wires and
250 -- they are returned in the list Result.
251 -- This gives a rapid preview of the resulting shape,
252 -- which will be obtained using the settings you have provided.
253 -- Raises NotDone if <me> it is not Ready
254 raises NotDone;
255
256 Build(me : in out)
257 ---Purpose: Builds the resulting shape (redefined from MakeShape).
258 ---Level: Public
259 raises NotDone -- If <me> it is not Ready
260 is redefined;
261
262 MakeSolid(me : in out)
263 ---Purpose: Transforms the sweeping Shell in Solid.
264 -- If a propfile is not closed returns False
265 returns Boolean
266 raises NotDone;
267
268 FirstShape (me : in out)
269 ---Purpose: Returns the TopoDS Shape of the bottom of the sweep.
270 returns Shape from TopoDS
271 is redefined;
272
273 LastShape (me : in out)
274 ---Purpose: Returns the TopoDS Shape of the top of the sweep.
275 returns Shape from TopoDS
276 is redefined;
277
278 Generated (me: in out; S : Shape from TopoDS)
279 ---Purpose: Returns a list of new shapes generated from the shape
280 -- S by the shell-generating algorithm.
281 -- This function is redefined from BRepOffsetAPI_MakeShape::Generated.
282 -- S can be an edge of the given Spine (see Constructor),
283 -- it can be an edge or a boundary vertex of a shape
284 -- returned by the method FirstShape(), it can also be a
285 -- Profile (see method Add()) closest to the beginning or
286 -- the end of the Spine.
287 -- If S is an edge of the given Spine, then method
288 -- Generated() returns a list of generated faces and a list
289 -- of edges from a free boundary (if it exists) of the
290 -- resulting shell.
291 -- If S is an edge of the start shape (see FirstShape()),
292 -- method Generated() returns a list of faces generated
293 -- along the whole spine from the given edge.
294 -- If S is a boundary vertex of the start shape (see
295 -- FirstShape()), method Generated() returns a list of
296 -- edges from the free boundary of the resulting shell,
297 -- generated along the whole spine.
298 -- If S is a Profile closest to the beginning of the Spine,
299 -- method Generated() returns the start shape, that can
300 -- also be obtained by method FirstShape().
301 -- If S is a Profile closest to the end of the Spine, method
302 -- Generated() returns the end shape, that can also be
303 -- obtained by method LastShape().
304 ---C++: return const &
305 returns ListOfShape from TopTools
306 is redefined;
307
308fields
309 myPipe : PipeShell from BRepFill;
310
311end MakePipeShell;
312
313
314