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