7fd59977 |
1 | -- File: BRepBuilderAPI_MakeSolid.cdl |
2 | -- Created: Wed Jul 21 16:06:45 1993 |
3 | -- Author: Remi LEQUETTE |
4 | -- <rle@nonox> |
5 | ---Copyright: Matra Datavision 1993 |
6 | |
7 | |
8 | class MakeSolid from BRepBuilderAPI inherits MakeShape from BRepBuilderAPI |
9 | |
10 | ---Purpose: Describes functions to build a solid from shells. |
11 | -- A solid is made of one shell, or a series of shells, which |
12 | -- do not intersect each other. One of these shells |
13 | -- constitutes the outside skin of the solid. It may be closed |
14 | -- (a finite solid) or open (an infinite solid). Other shells |
15 | -- form hollows (cavities) in these previous ones. Each |
16 | -- must bound a closed volume. |
17 | -- A MakeSolid object provides a framework for: |
18 | -- - defining and implementing the construction of a solid, and |
19 | -- - consulting the result. |
20 | |
21 | uses |
22 | Solid from TopoDS, |
23 | CompSolid from TopoDS, |
24 | Shell from TopoDS, |
25 | Shape from TopoDS, |
26 | MakeSolid from BRepLib |
27 | |
28 | raises |
29 | NotDone from StdFail |
30 | |
31 | is |
32 | |
33 | Create |
34 | ---Purpose: Initializes the construction of a solid. An empty solid is |
35 | -- considered to cover the whole space. The Add function |
36 | -- is used to define shells to bound it. |
37 | returns MakeSolid from BRepBuilderAPI; |
38 | |
39 | ---------------------------------------------- |
40 | -- From Compsolid |
41 | ---------------------------------------------- |
42 | |
43 | Create(S : CompSolid from TopoDS) |
44 | ---Purpose: Make a solid from a CompSolid. |
45 | ---Level: Public |
46 | returns MakeSolid from BRepBuilderAPI; |
47 | |
48 | -- this algorithm removes all inner faces amd make solid from compsolid |
49 | |
50 | ---------------------------------------------- |
51 | -- From shells |
52 | ---------------------------------------------- |
53 | |
54 | Create(S : Shell from TopoDS) |
55 | ---Purpose: Make a solid from a shell. |
56 | ---Level: Public |
57 | returns MakeSolid from BRepBuilderAPI; |
58 | |
59 | |
60 | Create(S1,S2 : Shell from TopoDS) |
61 | ---Purpose: Make a solid from two shells. |
62 | ---Level: Public |
63 | returns MakeSolid from BRepBuilderAPI; |
64 | |
65 | Create(S1,S2,S3 : Shell from TopoDS) |
66 | ---Purpose: Make a solid from three shells. |
67 | ---Level: Public |
68 | returns MakeSolid from BRepBuilderAPI; |
69 | |
70 | ---Purpose: Constructs a solid |
71 | -- - covering the whole space, or |
72 | -- - from shell S, or |
73 | -- - from two shells S1 and S2, or |
74 | -- - from three shells S1, S2 and S3, or |
75 | -- Warning |
76 | -- No check is done to verify the conditions of coherence |
77 | -- of the resulting solid. In particular, S1, S2 (and S3) must |
78 | -- not intersect each other. |
79 | -- Besides, after all shells have been added using the Add |
80 | -- function, one of these shells should constitute the outside |
81 | -- skin of the solid; it may be closed (a finite solid) or open |
82 | -- (an infinite solid). Other shells form hollows (cavities) in |
83 | -- these previous ones. Each must bound a closed volume. |
84 | |
85 | ---------------------------------------------- |
86 | -- From solid and shells |
87 | ---------------------------------------------- |
88 | |
89 | Create(So : Solid from TopoDS) |
90 | ---Purpose: Make a solid from a solid. Usefull for adding later. |
91 | ---Level: Public |
92 | returns MakeSolid from BRepBuilderAPI; |
93 | |
94 | Create(So : Solid from TopoDS; S : Shell from TopoDS) |
95 | ---Purpose: Add a shell to a solid. |
96 | ---Level: Public |
97 | returns MakeSolid from BRepBuilderAPI; |
98 | |
99 | ---Purpose: |
100 | -- Constructs a solid: |
101 | -- - from the solid So, to which shells can be added, or |
102 | -- - by adding the shell S to the solid So. |
103 | -- Warning |
104 | -- No check is done to verify the conditions of coherence |
105 | -- of the resulting solid. In particular S must not intersect the solid S0. |
106 | -- Besides, after all shells have been added using the Add |
107 | -- function, one of these shells should constitute the outside |
108 | -- skin of the solid. It may be closed (a finite solid) or open |
109 | -- (an infinite solid). Other shells form hollows (cavities) in |
110 | -- the previous ones. Each must bound a closed volume. |
111 | |
112 | ---------------------------------------------- |
113 | -- Auxiliary methods |
114 | ---------------------------------------------- |
115 | |
116 | Add(me : in out; S : Shell from TopoDS) |
117 | ---Purpose: Adds the shell to the current solid. |
118 | -- Warning |
119 | -- No check is done to verify the conditions of coherence |
120 | -- of the resulting solid. In particular, S must not intersect |
121 | -- other shells of the solid under construction. |
122 | -- Besides, after all shells have been added, one of |
123 | -- these shells should constitute the outside skin of the |
124 | -- solid. It may be closed (a finite solid) or open (an |
125 | -- infinite solid). Other shells form hollows (cavities) in |
126 | -- these previous ones. Each must bound a closed volume. |
127 | is static; |
128 | |
129 | ---------------------------------------------- |
130 | -- Results |
131 | ---------------------------------------------- |
132 | |
133 | IsDone(me) returns Boolean |
134 | ---Purpose: Returns true if the solid is built. |
135 | -- For this class, a solid under construction is always valid. |
136 | -- If no shell has been added, it could be a whole-space |
137 | -- solid. However, no check was done to verify the |
138 | -- conditions of coherence of the resulting solid. |
139 | is redefined; |
140 | |
141 | Solid(me) returns Solid from TopoDS |
142 | ---Purpose: Returns the new Solid. |
143 | -- |
144 | ---C++: return const & |
145 | ---C++: alias "Standard_EXPORT operator TopoDS_Solid() const;" |
146 | ---Level: Public |
147 | raises |
148 | NotDone from StdFail |
149 | is static; |
150 | |
151 | IsDeleted (me: in out; S : Shape from TopoDS) |
152 | returns Boolean |
153 | is redefined; |
154 | |
155 | fields |
156 | |
157 | myMakeSolid : MakeSolid from BRepLib; |
158 | |
159 | end MakeSolid; |