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