Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-12-02 10:10:50

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 _GC_MakeArcOfParabola_HeaderFile
0018 #define _GC_MakeArcOfParabola_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <GC_Root.hxx>
0025 #include <Geom_TrimmedCurve.hxx>
0026 
0027 class gp_Parab;
0028 class gp_Pnt;
0029 
0030 //! Implements construction algorithms for parabola arcs in 3D space.
0031 //! The result is a `Geom_TrimmedCurve`.
0032 //! A MakeArcOfParabola object provides a framework for:
0033 //! -   defining the construction of the arc of parabola,
0034 //! -   implementing the construction algorithm, and
0035 //! -   consulting the results. In particular, the
0036 //! Value function returns the constructed arc of parabola.
0037 class GC_MakeArcOfParabola : public GC_Root
0038 {
0039 public:
0040   DEFINE_STANDARD_ALLOC
0041 
0042   //! Constructs an arc from angular bounds on a parabola.
0043   //! @param[in] theParab source parabola
0044   //! @param[in] theAlpha1 first angle (radians)
0045   //! @param[in] theAlpha2 second angle (radians)
0046   //! @param[in] theSense orientation of resulting arc
0047   Standard_EXPORT GC_MakeArcOfParabola(const gp_Parab& theParab,
0048                                        const double    theAlpha1,
0049                                        const double    theAlpha2,
0050                                        const bool      theSense);
0051 
0052   //! Constructs an arc from a point and angle on a parabola.
0053   //! @param[in] theParab source parabola
0054   //! @param[in] theP point on parabola
0055   //! @param[in] theAlpha target angle (radians)
0056   //! @param[in] theSense orientation of resulting arc
0057   Standard_EXPORT GC_MakeArcOfParabola(const gp_Parab& theParab,
0058                                        const gp_Pnt&   theP,
0059                                        const double    theAlpha,
0060                                        const bool      theSense);
0061 
0062   //! Constructs an arc between two points on a parabola.
0063   //! @param[in] theParab source parabola
0064   //! @param[in] theP1 first point
0065   //! @param[in] theP2 second point
0066   //! @param[in] theSense orientation of resulting arc
0067   Standard_EXPORT GC_MakeArcOfParabola(const gp_Parab& theParab,
0068                                        const gp_Pnt&   theP1,
0069                                        const gp_Pnt&   theP2,
0070                                        const bool      theSense);
0071 
0072   //! Returns the constructed arc of parabola.
0073   //! @return resulting arc
0074   Standard_EXPORT const occ::handle<Geom_TrimmedCurve>& Value() const;
0075 
0076   //! Conversion operator returning the constructed object.
0077   //! @return resulting object
0078   operator const occ::handle<Geom_TrimmedCurve>&() const { return Value(); }
0079 
0080 private:
0081   occ::handle<Geom_TrimmedCurve> TheArc;
0082 };
0083 
0084 #endif // _GC_MakeArcOfParabola_HeaderFile