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_Torus_HeaderFile
18 #define _IGESSolid_Torus_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Real.hxx>
25 #include <IGESData_IGESEntity.hxx>
31 class IGESSolid_Torus;
32 DEFINE_STANDARD_HANDLE(IGESSolid_Torus, IGESData_IGESEntity)
34 //! defines Torus, Type <160> Form Number <0>
35 //! in package IGESSolid
36 //! A Torus is a solid formed by revolving a circular disc
37 //! about a specified coplanar axis.
38 class IGESSolid_Torus : public IGESData_IGESEntity
44 Standard_EXPORT IGESSolid_Torus();
46 //! This method is used to set the fields of the class Torus
47 //! - R1 : distance from center of torus to center
48 //! of circular disc to be revolved
49 //! - R2 : radius of circular disc
50 //! - aPoint : center point coordinates (default (0,0,0))
51 //! - anAxis : unit vector in axis direction (default (0,0,1))
52 Standard_EXPORT void Init (const Standard_Real R1, const Standard_Real R2, const gp_XYZ& aPoint, const gp_XYZ& anAxisdir);
54 //! returns the distance from the center of torus to the center of
55 //! the disc to be revolved
56 Standard_EXPORT Standard_Real MajorRadius() const;
58 //! returns the radius of the disc to be revolved
59 Standard_EXPORT Standard_Real DiscRadius() const;
61 //! returns the center of torus
62 Standard_EXPORT gp_Pnt AxisPoint() const;
64 //! returns the center of torus after applying TransformationMatrix
65 Standard_EXPORT gp_Pnt TransformedAxisPoint() const;
67 //! returns direction of the axis
68 Standard_EXPORT gp_Dir Axis() const;
70 //! returns direction of the axis after applying TransformationMatrix
71 Standard_EXPORT gp_Dir TransformedAxis() const;
76 DEFINE_STANDARD_RTTIEXT(IGESSolid_Torus,IGESData_IGESEntity)
100 #endif // _IGESSolid_Torus_HeaderFile