b311480e |
1 | -- Created on: 1994-07-12 |
2 | -- Created by: Bruno DUMORTIER |
3 | -- Copyright (c) 1994-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
10 | -- |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | -- |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | |
23 | class MakePipe from BRepOffsetAPI inherits MakeSweep from BRepPrimAPI |
24 | |
25 | ---Purpose: Describes functions to build pipes. |
26 | -- A pipe is built a basis shape (called the profile) along |
27 | -- a wire (called the spine) by sweeping. |
28 | -- The profile must not contain solids. |
29 | -- A MakePipe object provides a framework for: |
30 | -- - defining the construction of a pipe, |
31 | -- - implementing the construction algorithm, and |
32 | -- - consulting the result. |
33 | -- Warning |
34 | -- The MakePipe class implements pipe constructions |
35 | -- with G1 continuous spines only. |
36 | uses |
37 | Pipe from BRepFill, |
a31abc03 |
38 | Trihedron from GeomFill, |
7fd59977 |
39 | Wire from TopoDS, |
40 | Shape from TopoDS, |
41 | Edge from TopoDS, |
42 | ListOfShape from TopTools |
43 | |
44 | is |
45 | |
46 | |
47 | Create( Spine : Wire from TopoDS; |
48 | Profile : Shape from TopoDS ) |
49 | ---Purpose: Constructs a pipe by sweeping the shape Profile along |
50 | -- the wire Spine.The angle made by the spine with the profile is |
51 | -- maintained along the length of the pipe. |
52 | -- Warning |
53 | -- Spine must be G1 continuous; that is, on the connection |
54 | -- vertex of two edges of the wire, the tangent vectors on |
55 | -- the left and on the right must have the same direction, |
56 | -- though not necessarily the same magnitude. |
57 | -- Exceptions |
58 | -- Standard_DomainError if the profile is a solid or a |
59 | -- composite solid. |
60 | returns MakePipe from BRepOffsetAPI; |
61 | |
471ce736 |
62 | Create( Spine : Wire from TopoDS; |
63 | Profile : Shape from TopoDS; |
64 | aMode : Trihedron from GeomFill; |
65 | ForceApproxC1 : Boolean from Standard = Standard_False) |
66 | ---Purpose: the same as previous but with setting of |
67 | -- mode of sweep and the flag that indicates attempt |
68 | -- to approximate a C1-continuous surface if a swept |
69 | -- surface proved to be C0. |
70 | returns MakePipe from BRepOffsetAPI; |
7fd59977 |
71 | |
72 | Pipe(me) returns Pipe from BRepFill |
73 | ---C++: return const & |
74 | ---Level: Advanced |
75 | is static; |
76 | |
77 | |
78 | Build(me : in out) |
79 | is redefined; |
80 | ---Purpose: Builds the resulting shape (redefined from MakeShape). |
81 | ---Level: Public |
82 | |
83 | |
84 | FirstShape (me : in out) |
85 | ---Purpose: Returns the TopoDS Shape of the bottom of the prism. |
86 | returns Shape from TopoDS; |
87 | |
88 | |
89 | LastShape (me : in out) |
90 | ---Purpose: Returns the TopoDS Shape of the top of the prism. |
91 | returns Shape from TopoDS; |
92 | |
93 | |
94 | Generated (me: in out; SSpine, SProfile : Shape from TopoDS) |
95 | ---Level: Public |
96 | returns Shape from TopoDS; |
97 | |
98 | |
99 | fields |
100 | |
101 | myPipe : Pipe from BRepFill; |
102 | |
103 | end MakePipe; |