0029915: Porting to VC 2017 : Regressions in Modeling Algorithms on VC 2017
[occt.git] / src / IGESSolid / IGESSolid_Block.hxx
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_Block_HeaderFile
18 #define _IGESSolid_Block_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <gp_XYZ.hxx>
24 #include <IGESData_IGESEntity.hxx>
25 #include <Standard_Real.hxx>
26 class gp_XYZ;
27 class gp_Pnt;
28 class gp_Dir;
29
30
31 class IGESSolid_Block;
32 DEFINE_STANDARD_HANDLE(IGESSolid_Block, IGESData_IGESEntity)
33
34 //! defines Block, Type <150> Form Number <0>
35 //! in package IGESSolid
36 //! The Block is a rectangular parallelopiped, defined with
37 //! one vertex at (X1, Y1, Z1) and three edges lying along
38 //! the local +X, +Y, +Z axes.
39 class IGESSolid_Block : public IGESData_IGESEntity
40 {
41
42 public:
43
44   
45   Standard_EXPORT IGESSolid_Block();
46   
47   //! This method is used to set the fields of the class Block
48   //! - aSize   : Length in each local directions
49   //! - aCorner : Corner point coordinates. Default (0,0,0)
50   //! - aXAxis  : Unit vector defining local X-axis
51   //! default (1,0,0)
52   //! - aZAxis  : Unit vector defining local Z-axis
53   //! default (0,0,1)
54   Standard_EXPORT void Init (const gp_XYZ& aSize, const gp_XYZ& aCorner, const gp_XYZ& aXAxis, const gp_XYZ& aZAxis);
55   
56   //! returns the size of the block
57   Standard_EXPORT gp_XYZ Size() const;
58   
59   //! returns the length of the Block along the local X-direction
60   Standard_EXPORT Standard_Real XLength() const;
61   
62   //! returns the length of the Block along the local Y-direction
63   Standard_EXPORT Standard_Real YLength() const;
64   
65   //! returns the length of the Block along the local Z-direction
66   Standard_EXPORT Standard_Real ZLength() const;
67   
68   //! returns the corner point coordinates of the Block
69   Standard_EXPORT gp_Pnt Corner() const;
70   
71   //! returns the corner point coordinates of the Block after applying
72   //! the TransformationMatrix
73   Standard_EXPORT gp_Pnt TransformedCorner() const;
74   
75   //! returns the direction defining the local X-axis
76   Standard_EXPORT gp_Dir XAxis() const;
77   
78   //! returns the direction defining the local X-axis after applying
79   //! TransformationMatrix
80   Standard_EXPORT gp_Dir TransformedXAxis() const;
81   
82   //! returns the direction defining the local Y-axis
83   //! it is the cross product of ZAxis and XAxis
84   Standard_EXPORT gp_Dir YAxis() const;
85   
86   //! returns the direction defining the local Y-axis after applying
87   //! TransformationMatrix
88   Standard_EXPORT gp_Dir TransformedYAxis() const;
89   
90   //! returns the direction defining the local X-axis
91   Standard_EXPORT gp_Dir ZAxis() const;
92   
93   //! returns the direction defining the local Z-axis after applying
94   //! TransformationMatrix
95   Standard_EXPORT gp_Dir TransformedZAxis() const;
96
97
98
99
100   DEFINE_STANDARD_RTTIEXT(IGESSolid_Block,IGESData_IGESEntity)
101
102 protected:
103
104
105
106
107 private:
108
109
110   gp_XYZ theSize;
111   gp_XYZ theCorner;
112   gp_XYZ theXAxis;
113   gp_XYZ theZAxis;
114
115
116 };
117
118
119
120
121
122
123
124 #endif // _IGESSolid_Block_HeaderFile