Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-26 09:03:40

0001 // Created on: 1993-01-09
0002 // Created by: CKY / Contract Toubro-Larsen ( Kiran )
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 _IGESGeom_CircularArc_HeaderFile
0018 #define _IGESGeom_CircularArc_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <gp_XY.hxx>
0024 #include <IGESData_IGESEntity.hxx>
0025 class gp_Pnt2d;
0026 class gp_Pnt;
0027 class gp_Dir;
0028 
0029 //! defines IGESCircularArc, Type <100> Form <0>
0030 //! in package IGESGeom
0031 //! A circular arc is a connected portion of a parent circle
0032 //! which consists of more than one point. The definition space
0033 //! coordinate system is always chosen so that the circular arc
0034 //! remains in a plane either coincident with or parallel to
0035 //! the XT, YT plane.
0036 class IGESGeom_CircularArc : public IGESData_IGESEntity
0037 {
0038 
0039 public:
0040   Standard_EXPORT IGESGeom_CircularArc();
0041 
0042   //! This method is used to set the fields of the class
0043   //! CircularArc
0044   //! - aZT     : Shift above the Z plane
0045   //! - aCenter : Center of the circle of which the arc forms a part
0046   //! - aStart  : Starting point of the circular arc
0047   //! - anEnd   : Ending point of the circular arc
0048   Standard_EXPORT void Init(const double aZT,
0049                             const gp_XY& aCenter,
0050                             const gp_XY& aStart,
0051                             const gp_XY& anEnd);
0052 
0053   //! returns the center of the circle of which arc forms a part
0054   Standard_EXPORT gp_Pnt2d Center() const;
0055 
0056   //! returns the center of the circle of which arc forms a part
0057   //! after applying Transf. Matrix
0058   Standard_EXPORT gp_Pnt TransformedCenter() const;
0059 
0060   //! returns the start point of the arc
0061   Standard_EXPORT gp_Pnt2d StartPoint() const;
0062 
0063   //! returns the start point of the arc after applying Transf. Matrix
0064   Standard_EXPORT gp_Pnt TransformedStartPoint() const;
0065 
0066   //! returns the parallel displacement of the plane containing the
0067   //! arc from the XT, YT plane
0068   Standard_EXPORT double ZPlane() const;
0069 
0070   //! returns the end point of the arc
0071   Standard_EXPORT gp_Pnt2d EndPoint() const;
0072 
0073   //! returns the end point of the arc after applying Transf. Matrix
0074   Standard_EXPORT gp_Pnt TransformedEndPoint() const;
0075 
0076   //! returns the radius of the circle of which arc forms a part
0077   Standard_EXPORT double Radius() const;
0078 
0079   //! returns the angle subtended by the arc at the center in radians
0080   Standard_EXPORT double Angle() const;
0081 
0082   //! Z-Axis of circle (i.e. [0,0,1])
0083   Standard_EXPORT gp_Dir Axis() const;
0084 
0085   //! Z-Axis after applying Trans. Matrix
0086   Standard_EXPORT gp_Dir TransformedAxis() const;
0087 
0088   //! True if StartPoint = EndPoint
0089   Standard_EXPORT bool IsClosed() const;
0090 
0091   DEFINE_STANDARD_RTTIEXT(IGESGeom_CircularArc, IGESData_IGESEntity)
0092 
0093 private:
0094   double theZT;
0095   gp_XY  theCenter;
0096   gp_XY  theStart;
0097   gp_XY  theEnd;
0098 };
0099 
0100 #endif // _IGESGeom_CircularArc_HeaderFile