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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IGESSolid_Block_HeaderFile
18 #define _IGESSolid_Block_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
24 #include <IGESData_IGESEntity.hxx>
25 #include <Standard_Real.hxx>
31 class IGESSolid_Block;
32 DEFINE_STANDARD_HANDLE(IGESSolid_Block, IGESData_IGESEntity)
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
45 Standard_EXPORT IGESSolid_Block();
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
52 //! - aZAxis : Unit vector defining local Z-axis
54 Standard_EXPORT void Init (const gp_XYZ& aSize, const gp_XYZ& aCorner, const gp_XYZ& aXAxis, const gp_XYZ& aZAxis);
56 //! returns the size of the block
57 Standard_EXPORT gp_XYZ Size() const;
59 //! returns the length of the Block along the local X-direction
60 Standard_EXPORT Standard_Real XLength() const;
62 //! returns the length of the Block along the local Y-direction
63 Standard_EXPORT Standard_Real YLength() const;
65 //! returns the length of the Block along the local Z-direction
66 Standard_EXPORT Standard_Real ZLength() const;
68 //! returns the corner point coordinates of the Block
69 Standard_EXPORT gp_Pnt Corner() const;
71 //! returns the corner point coordinates of the Block after applying
72 //! the TransformationMatrix
73 Standard_EXPORT gp_Pnt TransformedCorner() const;
75 //! returns the direction defining the local X-axis
76 Standard_EXPORT gp_Dir XAxis() const;
78 //! returns the direction defining the local X-axis after applying
79 //! TransformationMatrix
80 Standard_EXPORT gp_Dir TransformedXAxis() const;
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;
86 //! returns the direction defining the local Y-axis after applying
87 //! TransformationMatrix
88 Standard_EXPORT gp_Dir TransformedYAxis() const;
90 //! returns the direction defining the local X-axis
91 Standard_EXPORT gp_Dir ZAxis() const;
93 //! returns the direction defining the local Z-axis after applying
94 //! TransformationMatrix
95 Standard_EXPORT gp_Dir TransformedZAxis() const;
100 DEFINE_STANDARD_RTTIEXT(IGESSolid_Block,IGESData_IGESEntity)
124 #endif // _IGESSolid_Block_HeaderFile