1 -- Created on: 1993-07-21
2 -- Created by: Remi LEQUETTE
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
23 class MakeSolid from BRepBuilderAPI inherits MakeShape from BRepBuilderAPI
25 ---Purpose: Describes functions to build a solid from shells.
26 -- A solid is made of one shell, or a series of shells, which
27 -- do not intersect each other. One of these shells
28 -- constitutes the outside skin of the solid. It may be closed
29 -- (a finite solid) or open (an infinite solid). Other shells
30 -- form hollows (cavities) in these previous ones. Each
31 -- must bound a closed volume.
32 -- A MakeSolid object provides a framework for:
33 -- - defining and implementing the construction of a solid, and
34 -- - consulting the result.
38 CompSolid from TopoDS,
41 MakeSolid from BRepLib
49 ---Purpose: Initializes the construction of a solid. An empty solid is
50 -- considered to cover the whole space. The Add function
51 -- is used to define shells to bound it.
52 returns MakeSolid from BRepBuilderAPI;
54 ----------------------------------------------
56 ----------------------------------------------
58 Create(S : CompSolid from TopoDS)
59 ---Purpose: Make a solid from a CompSolid.
61 returns MakeSolid from BRepBuilderAPI;
63 -- this algorithm removes all inner faces amd make solid from compsolid
65 ----------------------------------------------
67 ----------------------------------------------
69 Create(S : Shell from TopoDS)
70 ---Purpose: Make a solid from a shell.
72 returns MakeSolid from BRepBuilderAPI;
75 Create(S1,S2 : Shell from TopoDS)
76 ---Purpose: Make a solid from two shells.
78 returns MakeSolid from BRepBuilderAPI;
80 Create(S1,S2,S3 : Shell from TopoDS)
81 ---Purpose: Make a solid from three shells.
83 returns MakeSolid from BRepBuilderAPI;
85 ---Purpose: Constructs a solid
86 -- - covering the whole space, or
88 -- - from two shells S1 and S2, or
89 -- - from three shells S1, S2 and S3, or
91 -- No check is done to verify the conditions of coherence
92 -- of the resulting solid. In particular, S1, S2 (and S3) must
93 -- not intersect each other.
94 -- Besides, after all shells have been added using the Add
95 -- function, one of these shells should constitute the outside
96 -- skin of the solid; it may be closed (a finite solid) or open
97 -- (an infinite solid). Other shells form hollows (cavities) in
98 -- these previous ones. Each must bound a closed volume.
100 ----------------------------------------------
101 -- From solid and shells
102 ----------------------------------------------
104 Create(So : Solid from TopoDS)
105 ---Purpose: Make a solid from a solid. Usefull for adding later.
107 returns MakeSolid from BRepBuilderAPI;
109 Create(So : Solid from TopoDS; S : Shell from TopoDS)
110 ---Purpose: Add a shell to a solid.
112 returns MakeSolid from BRepBuilderAPI;
115 -- Constructs a solid:
116 -- - from the solid So, to which shells can be added, or
117 -- - by adding the shell S to the solid So.
119 -- No check is done to verify the conditions of coherence
120 -- of the resulting solid. In particular S must not intersect the solid S0.
121 -- Besides, after all shells have been added using the Add
122 -- function, one of these shells should constitute the outside
123 -- skin of the solid. It may be closed (a finite solid) or open
124 -- (an infinite solid). Other shells form hollows (cavities) in
125 -- the previous ones. Each must bound a closed volume.
127 ----------------------------------------------
129 ----------------------------------------------
131 Add(me : in out; S : Shell from TopoDS)
132 ---Purpose: Adds the shell to the current solid.
134 -- No check is done to verify the conditions of coherence
135 -- of the resulting solid. In particular, S must not intersect
136 -- other shells of the solid under construction.
137 -- Besides, after all shells have been added, one of
138 -- these shells should constitute the outside skin of the
139 -- solid. It may be closed (a finite solid) or open (an
140 -- infinite solid). Other shells form hollows (cavities) in
141 -- these previous ones. Each must bound a closed volume.
144 ----------------------------------------------
146 ----------------------------------------------
148 IsDone(me) returns Boolean
149 ---Purpose: Returns true if the solid is built.
150 -- For this class, a solid under construction is always valid.
151 -- If no shell has been added, it could be a whole-space
152 -- solid. However, no check was done to verify the
153 -- conditions of coherence of the resulting solid.
156 Solid(me) returns Solid from TopoDS
157 ---Purpose: Returns the new Solid.
159 ---C++: return const &
160 ---C++: alias "Standard_EXPORT operator TopoDS_Solid() const;"
166 IsDeleted (me: in out; S : Shape from TopoDS)
172 myMakeSolid : MakeSolid from BRepLib;