42cf5bc1 |
1 | // Created on: 1993-01-09 |
2 | // Created by: CKY / Contract Toubro-Larsen ( SIVA ) |
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 under |
9 | // the terms of the GNU Lesser General Public License 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 | #ifndef _IGESSolid_ConeFrustum_HeaderFile |
18 | #define _IGESSolid_ConeFrustum_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <Standard_Real.hxx> |
24 | #include <gp_XYZ.hxx> |
25 | #include <IGESData_IGESEntity.hxx> |
26 | class gp_XYZ; |
27 | class gp_Pnt; |
28 | class gp_Dir; |
29 | |
30 | |
31 | class IGESSolid_ConeFrustum; |
32 | DEFINE_STANDARD_HANDLE(IGESSolid_ConeFrustum, IGESData_IGESEntity) |
33 | |
34 | //! defines ConeFrustum, Type <156> Form Number <0> |
35 | //! in package IGESSolid |
36 | //! The Cone Frustum is defined by the center of the |
37 | //! larger circular face of the frustum, its radius, a unit |
38 | //! vector in the axis direction, a height in this direction |
39 | //! and a second circular face with radius which is lesser |
40 | //! than the first face. |
41 | class IGESSolid_ConeFrustum : public IGESData_IGESEntity |
42 | { |
43 | |
44 | public: |
45 | |
46 | |
47 | Standard_EXPORT IGESSolid_ConeFrustum(); |
48 | |
49 | //! This method is used to set the fields of the class |
50 | //! ConeFrustum |
51 | //! - Ht : the Height of cone |
52 | //! - R1 : Radius of the larger face |
53 | //! - R2 : Radius of the smaller face (default 0) |
54 | //! - Center : Center of the larger face (default (0,0,0)) |
55 | //! - anAxis : Unit vector in axis direction (default (0,0,1)) |
56 | Standard_EXPORT void Init (const Standard_Real Ht, const Standard_Real R1, const Standard_Real R2, const gp_XYZ& Center, const gp_XYZ& anAxis); |
57 | |
58 | //! returns the height of the cone frustum |
59 | Standard_EXPORT Standard_Real Height() const; |
60 | |
61 | //! returns the radius of the larger face of the cone frustum |
62 | Standard_EXPORT Standard_Real LargerRadius() const; |
63 | |
64 | //! returns the radius of the second face of the cone frustum |
65 | Standard_EXPORT Standard_Real SmallerRadius() const; |
66 | |
67 | //! returns the center of the larger face of the cone frustum |
68 | Standard_EXPORT gp_Pnt FaceCenter() const; |
69 | |
70 | //! returns the center of the larger face of the cone frustum |
71 | //! after applying TransformationMatrix |
72 | Standard_EXPORT gp_Pnt TransformedFaceCenter() const; |
73 | |
74 | //! returns the direction of the axis of the cone frustum |
75 | Standard_EXPORT gp_Dir Axis() const; |
76 | |
77 | //! returns the direction of the axis of the cone frustum |
78 | //! after applying TransformationMatrix |
79 | Standard_EXPORT gp_Dir TransformedAxis() const; |
80 | |
81 | |
82 | |
83 | |
92efcf78 |
84 | DEFINE_STANDARD_RTTIEXT(IGESSolid_ConeFrustum,IGESData_IGESEntity) |
42cf5bc1 |
85 | |
86 | protected: |
87 | |
88 | |
89 | |
90 | |
91 | private: |
92 | |
93 | |
94 | Standard_Real theHeight; |
95 | Standard_Real theR1; |
96 | Standard_Real theR2; |
97 | gp_XYZ theFaceCenter; |
98 | gp_XYZ theAxis; |
99 | |
100 | |
101 | }; |
102 | |
103 | |
104 | |
105 | |
106 | |
107 | |
108 | |
109 | #endif // _IGESSolid_ConeFrustum_HeaderFile |