b311480e |
1 | -- Created on: 1994-02-16 |
2 | -- Created by: Remi LEQUETTE |
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 | -- xab:19Nov96 correction de doc |
7fd59977 |
22 | |
23 | |
24 | |
25 | class MakeShell from BRepBuilderAPI inherits MakeShape from BRepBuilderAPI |
26 | |
27 | ---Purpose: Describes functions to build a |
28 | -- shape corresponding to the skin of a surface. |
29 | -- Note that the term shell in the class name has the same definition |
30 | -- as that of a shell in STEP, in other words the skin of a shape, |
31 | -- and not a solid model defined by surface and thickness. If you want |
32 | -- to build the second sort of shell, you must use |
33 | -- BRepOffsetAPI_MakeOffsetShape. A shell is made of a series of |
34 | -- faces connected by their common edges. |
35 | -- If the underlying surface of a face is not C2 continuous and |
36 | -- the flag Segment is True, MakeShell breaks the surface down into |
37 | -- several faces which are all C2 continuous and which are |
38 | -- connected along the non-regular curves on the surface. |
39 | -- The resulting shell contains all these faces. |
40 | -- Construction of a Shell from a non-C2 continuous Surface |
41 | -- A MakeShell object provides a framework for: |
42 | -- - defining the construction of a shell, |
43 | -- - implementing the construction algorithm, and |
44 | -- - consulting the result. |
45 | -- Warning |
46 | -- The connected C2 faces in the shell resulting from a decomposition of |
47 | -- the surface are not sewn. For a sewn result, you need to use |
48 | -- BRepOffsetAPI_Sewing. For a shell with thickness, you need to use |
49 | -- BRepOffsetAPI_MakeOffsetShape. |
50 | |
51 | uses |
52 | |
53 | Surface from Geom, |
54 | Shell from TopoDS, |
55 | Face from TopoDS, |
56 | ShellError from BRepBuilderAPI, |
57 | MakeShell from BRepLib |
58 | |
59 | |
60 | raises |
61 | NotDone from StdFail |
62 | |
63 | is |
64 | Create |
65 | ---Purpose: Constructs an empty shell framework. The Init |
66 | -- function is used to define the construction arguments. |
67 | -- Warning |
68 | -- The function Error will return |
69 | -- BRepBuilderAPI_EmptyShell if it is called before the function Init. |
70 | returns MakeShell from BRepBuilderAPI; |
71 | |
72 | ---------------------------------------------- |
73 | -- From a set of face |
74 | ---------------------------------------------- |
75 | |
76 | ---------------------------------------------- |
77 | -- From a surface |
78 | ---------------------------------------------- |
79 | |
80 | Create(S : Surface from Geom; |
81 | Segment : Boolean from Standard = Standard_False) |
82 | ---Purpose: Constructs a shell from the surface S. |
83 | returns MakeShell from BRepBuilderAPI; |
84 | |
85 | Create(S : Surface from Geom; UMin, UMax, VMin, VMax : Real; |
86 | Segment : Boolean from Standard = Standard_False) |
87 | |
88 | ---Purpose: Constructs a shell from the surface S, |
89 | -- limited in the u parametric direction by the two |
90 | -- parameter values UMin and UMax, and limited in the v |
91 | -- parametric direction by the two parameter values VMin and VMax. |
92 | returns MakeShell from BRepBuilderAPI; |
93 | |
94 | Init(me : in out; S : Surface from Geom; UMin, UMax, VMin, VMax : Real; |
95 | Segment : Boolean from Standard = Standard_False) |
96 | ---Purpose: Defines or redefines the arguments |
97 | -- for the construction of a shell. The construction is initialized |
98 | -- with the surface S, limited in the u parametric direction by the |
99 | -- two parameter values UMin and UMax, and in the v parametric |
100 | -- direction by the two parameter values VMin and VMax. |
101 | -- Warning |
102 | -- The function Error returns: |
103 | -- - BRepBuilderAPI_ShellParametersOutOfRange |
104 | -- when the given parameters are outside the bounds of the |
105 | -- surface or the basis surface if S is trimmed |
106 | is static; |
107 | |
108 | |
109 | ---------------------------------------------- |
110 | -- Results |
111 | ---------------------------------------------- |
112 | |
113 | IsDone(me) returns Boolean |
114 | ---Purpose: Returns true if the shell is built. |
115 | is redefined; |
116 | |
117 | Error(me) returns ShellError from BRepBuilderAPI |
118 | ---Purpose: Returns the construction status: |
119 | -- - BRepBuilderAPI_ShellDone if the shell is built, or |
120 | -- - another value of the BRepBuilderAPI_ShellError |
121 | -- enumeration indicating why the construction failed. |
122 | -- This is frequently BRepBuilderAPI_ShellParametersOutOfRange |
123 | -- indicating that the given parameters are outside the bounds of the surface. |
124 | is static; |
125 | |
126 | Shell(me) returns Shell from TopoDS |
127 | ---Purpose: Returns the new Shell. |
128 | -- |
129 | ---C++: return const & |
130 | ---C++: alias "Standard_EXPORT operator TopoDS_Shell() const;" |
131 | ---Level: Public |
132 | raises |
133 | NotDone from StdFail |
134 | is static; |
135 | |
136 | fields |
137 | myMakeShell : MakeShell from BRepLib; |
138 | |
139 | end MakeShell; |