Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-04 09:14:58

0001 // Created on: 1993-01-09
0002 // Created by: CKY / Contract Toubro-Larsen ( SIVA )
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IGESSolid_SolidOfRevolution_HeaderFile
0018 #define _IGESSolid_SolidOfRevolution_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <gp_XYZ.hxx>
0024 #include <IGESData_IGESEntity.hxx>
0025 class gp_Pnt;
0026 class gp_Dir;
0027 
0028 //! defines SolidOfRevolution, Type <162> Form Number <0,1>
0029 //! in package IGESSolid
0030 //! This entity is defined by revolving the area determined
0031 //! by a planar curve about a specified axis through a given
0032 //! fraction of full rotation.
0033 class IGESSolid_SolidOfRevolution : public IGESData_IGESEntity
0034 {
0035 
0036 public:
0037   Standard_EXPORT IGESSolid_SolidOfRevolution();
0038 
0039   //! This method is used to set the fields of the class
0040   //! SolidOfRevolution
0041   //! - aCurve     : the curve entity that is to be revolved
0042   //! - aFract     : the fraction of full rotation (default 1.0)
0043   //! - aAxisPnt   : the point on the axis
0044   //! - aDirection : the direction of the axis
0045   Standard_EXPORT void Init(const occ::handle<IGESData_IGESEntity>& aCurve,
0046                             const double                            aFract,
0047                             const gp_XYZ&                           aAxisPnt,
0048                             const gp_XYZ&                           aDirection);
0049 
0050   //! Sets the Curve to be by default, Closed to Axis (Form 0)
0051   //! if <mode> is True, Closed to Itself (Form 1) else
0052   Standard_EXPORT void SetClosedToAxis(const bool mode);
0053 
0054   //! Returns True if Form Number = 0
0055   //! if Form no is 0, then the curve is closed to axis
0056   //! if 1, the curve is closed to itself.
0057   Standard_EXPORT bool IsClosedToAxis() const;
0058 
0059   //! returns the curve entity that is to be revolved
0060   Standard_EXPORT occ::handle<IGESData_IGESEntity> Curve() const;
0061 
0062   //! returns the fraction of full rotation that the curve is to
0063   //! be rotated
0064   Standard_EXPORT double Fraction() const;
0065 
0066   //! returns the point on the axis
0067   Standard_EXPORT gp_Pnt AxisPoint() const;
0068 
0069   //! returns the point on the axis after applying Trans.Matrix
0070   Standard_EXPORT gp_Pnt TransformedAxisPoint() const;
0071 
0072   //! returns the direction of the axis
0073   Standard_EXPORT gp_Dir Axis() const;
0074 
0075   //! returns the direction of the axis after applying
0076   //! TransformationMatrix
0077   Standard_EXPORT gp_Dir TransformedAxis() const;
0078 
0079   DEFINE_STANDARD_RTTIEXT(IGESSolid_SolidOfRevolution, IGESData_IGESEntity)
0080 
0081 private:
0082   occ::handle<IGESData_IGESEntity> theCurve;
0083   double                           theFraction;
0084   gp_XYZ                           theAxisPoint;
0085   gp_XYZ                           theAxis;
0086 };
0087 
0088 #endif // _IGESSolid_SolidOfRevolution_HeaderFile