Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:32

0001 // Created on: 1992-09-28
0002 // Created by: Remi GILET
0003 // Copyright (c) 1992-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 _GCE2d_MakeArcOfEllipse_HeaderFile
0018 #define _GCE2d_MakeArcOfEllipse_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <GCE2d_Root.hxx>
0025 #include <Geom2d_TrimmedCurve.hxx>
0026 
0027 class gp_Elips2d;
0028 class gp_Pnt2d;
0029 
0030 
0031 //! Implements construction algorithms for an arc of
0032 //! ellipse in the plane. The result is a Geom2d_TrimmedCurve curve.
0033 //! A MakeArcOfEllipse object provides a framework for:
0034 //! -   defining the construction of the arc of ellipse,
0035 //! -   implementing the construction algorithm, and
0036 //! -   consulting the results. In particular, the Value
0037 //! function returns the constructed arc of ellipse.
0038 class GCE2d_MakeArcOfEllipse  : public GCE2d_Root
0039 {
0040 public:
0041 
0042   DEFINE_STANDARD_ALLOC
0043 
0044   
0045   //! Make an arc of Ellipse (TrimmedCurve from Geom2d) from
0046   //! a Ellipse between two parameters Alpha1 and Alpha2.
0047   Standard_EXPORT GCE2d_MakeArcOfEllipse(const gp_Elips2d& Elips, const Standard_Real Alpha1, const Standard_Real Alpha2, const Standard_Boolean Sense = Standard_True);
0048   
0049   //! Make an arc of Ellipse (TrimmedCurve from Geom2d) from
0050   //! a Ellipse between point <P> and the parameter
0051   //! Alpha.
0052   Standard_EXPORT GCE2d_MakeArcOfEllipse(const gp_Elips2d& Elips, const gp_Pnt2d& P, const Standard_Real Alpha, const Standard_Boolean Sense = Standard_True);
0053   
0054   //! Make an arc of Ellipse (TrimmedCurve from Geom2d) from
0055   //! a Ellipse between two points P1 and P2.
0056   //! Please, note: The orientation of the arc is:
0057   //! -   the trigonometric sense if Sense is not defined or
0058   //! is true (default value), or
0059   //! -   the opposite sense if Sense is false.
0060   //! -   Alpha1, Alpha2 and Alpha are angle values, given in radians.
0061   //! -   IsDone always returns true.
0062   Standard_EXPORT GCE2d_MakeArcOfEllipse(const gp_Elips2d& Elips, const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Standard_Boolean Sense = Standard_True);
0063   
0064   //! Returns the constructed arc of ellipse.
0065   Standard_EXPORT const Handle(Geom2d_TrimmedCurve)& Value() const;
0066 
0067   operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
0068 
0069 private:
0070   Handle(Geom2d_TrimmedCurve) TheArc;
0071 };
0072 
0073 #endif // _GCE2d_MakeArcOfEllipse_HeaderFile