0024428: Implementation of LGPL license
[occt.git] / src / BRepPrimAPI / BRepPrimAPI_MakeBox.cdl
CommitLineData
b311480e 1-- Created on: 1993-07-21
2-- Created by: Remi LEQUETTE
3-- Copyright (c) 1993-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class MakeBox from BRepPrimAPI inherits MakeShape from BRepBuilderAPI
18
19 ---Purpose: Describes functions to build parallelepiped boxes.
20 -- A MakeBox object provides a framework for:
21 -- - defining the construction of a box,
22 -- - implementing the construction algorithm, and
23 -- - consulting the result.
24
25uses
26 Ax2 from gp,
27 Pnt from gp,
28 Face from TopoDS,
29 Shell from TopoDS,
30 Solid from TopoDS,
31 Wedge from BRepPrim
32
33raises
34 DomainError from Standard,
35 OutOfRange from Standard,
36 NotDone from StdFail
37
38is
39
40 Create(dx, dy, dz : Real)
41 returns MakeBox from BRepPrimAPI
42 ---Purpose: Make a box with a corner at 0,0,0 and the other dx,dy,dz
43 ---Level: Public
44 raises
45 DomainError from Standard; -- if dx,dy,dz <= Precision::Confusion()
46
47 Create(P : Pnt from gp; dx, dy, dz : Real)
48 returns MakeBox from BRepPrimAPI
49 ---Purpose: Make a box with a corner at P and size dx, dy, dz.
50 ---Level: Public
51 raises
52 DomainError from Standard; -- if dx,dy,dz <= Precision::Confusion()
53
54
55 Create(P1,P2 : Pnt from gp)
56 returns MakeBox from BRepPrimAPI
57 ---Purpose: Make a box with corners P1,P2.
58 ---Level: Public
59 raises
60 DomainError from Standard; -- if dx,dy,dz <= Precision::Confusion()
61
62
63 Create(Axes : Ax2 from gp; dx, dy, dz : Real)
64 returns MakeBox from BRepPrimAPI
65 ---Purpose: Ax2 is the left corner and the axis.
66 ---Level: Public
67 raises
68 DomainError from Standard; -- if dx,dy,dz <= Precision::Confusion()
69
70 ---Purpose: Constructs a box such that its sides are parallel to the axes of
71 -- - the global coordinate system, or
72 -- - the local coordinate system Axis. and
73 -- - with a corner at (0, 0, 0) and of size (dx, dy, dz), or
74 -- - with a corner at point P and of size (dx, dy, dz), or
75 -- - with corners at points P1 and P2.
76 -- Exceptions
77 -- Standard_DomainError if: dx, dy, dz are less than or equal to
78 -- Precision::Confusion(), or
79 -- - the vector joining the points P1 and P2 has a
80 -- component projected onto the global coordinate
81 -- system less than or equal to Precision::Confusion().
82 -- In these cases, the box would be flat.
83
84 Wedge(me : in out) returns Wedge from BRepPrim
85 ---Purpose: Returns the internal algorithm.
86 --
87 ---C++: return &
88 ---Level: Public
89 is static;
90
91
92 ----------------------------------------
93 -- Results
94 ----------------------------------------
95
96 Build(me : in out)
97 ---Purpose: Stores the solid in myShape.
98 ---Level: Public
99 is redefined;
100
101
102 Shell(me : in out) returns Shell from TopoDS
103 ---C++: return const &
104 ---C++: alias "Standard_EXPORT operator TopoDS_Shell();"
105 ---Purpose: Returns the constructed box as a shell.
106 is static;
107
108 Solid(me : in out) returns Solid from TopoDS
109 ---C++: return const &
110 ---C++: alias "Standard_EXPORT operator TopoDS_Solid();"
111 ---Purpose: Returns the constructed box as a solid.
112 is static;
113
114
115 BottomFace (me : in out) returns Face from TopoDS;
116 ---Purpose : Returns ZMin face
117 ---C++: return const &
118
119
120 BackFace (me : in out) returns Face from TopoDS;
121 ---Purpose : Returns XMin face
122 ---C++: return const &
123
124
125 FrontFace (me : in out) returns Face from TopoDS;
126 ---Purpose : Returns XMax face
127 ---C++: return const &
128
129
130 LeftFace (me : in out) returns Face from TopoDS;
131 ---Purpose : Returns YMin face
132 ---C++: return const &
133
134
135 RightFace (me : in out) returns Face from TopoDS;
136 ---Purpose : Returns YMax face
137 ---C++: return const &
138
139
140 TopFace (me : in out) returns Face from TopoDS;
141 ---Purpose : Returns ZMax face
142 ---C++: return const &
143
144
145fields
146
147 myWedge : Wedge from BRepPrim;
148
149end MakeBox;