0027111: Add generalized copy constructor in handle class for old compilers
[occt.git] / src / GCE2d / GCE2d_MakeArcOfCircle.hxx
CommitLineData
42cf5bc1 1// Created on: 1992-09-28
2// Created by: Remi GILET
3// Copyright (c) 1992-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _GCE2d_MakeArcOfCircle_HeaderFile
18#define _GCE2d_MakeArcOfCircle_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <GCE2d_Root.hxx>
d1a67b9d 25#include <Geom2d_TrimmedCurve.hxx>
26
42cf5bc1 27class StdFail_NotDone;
28class gp_Circ2d;
29class gp_Pnt2d;
30class gp_Vec2d;
31
32
33//! Implements construction algorithms for an arc of
34//! circle in the plane. The result is a Geom2d_TrimmedCurve curve.
35//! A MakeArcOfCircle object provides a framework for:
36//! - defining the construction of the arc of circle,
37//! - implementing the construction algorithm, and
38//! - consulting the results. In particular, the Value
39//! function returns the constructed arc of circle.
40class GCE2d_MakeArcOfCircle : public GCE2d_Root
41{
42public:
43
44 DEFINE_STANDARD_ALLOC
45
46
47 //! Makes an arc of circle (TrimmedCurve from Geom2d) from
48 //! a circle between two parameters Alpha1 and Alpha2.
49 //! The two parameters are angles. The parameters are
50 //! in radians.
51 Standard_EXPORT GCE2d_MakeArcOfCircle(const gp_Circ2d& Circ, const Standard_Real Alpha1, const Standard_Real Alpha2, const Standard_Boolean Sense = Standard_True);
52
53 //! Makes an arc of circle (TrimmedCurve from Geom2d) from
54 //! a circle between point <P> and the parameter
55 //! Alpha. Alpha is given in radians.
56 Standard_EXPORT GCE2d_MakeArcOfCircle(const gp_Circ2d& Circ, const gp_Pnt2d& P, const Standard_Real Alpha, const Standard_Boolean Sense = Standard_True);
57
58 //! Makes an arc of circle (TrimmedCurve from Geom2d) from
59 //! a circle between two points P1 and P2.
60 Standard_EXPORT GCE2d_MakeArcOfCircle(const gp_Circ2d& Circ, const gp_Pnt2d& P1, const gp_Pnt2d& P2, const Standard_Boolean Sense = Standard_True);
61
62 //! Makes an arc of circle (TrimmedCurve from Geom2d) from
63 //! three points P1,P2,P3 between two points P1 and P3,
64 //! and passing through the point P2.
65 Standard_EXPORT GCE2d_MakeArcOfCircle(const gp_Pnt2d& P1, const gp_Pnt2d& P2, const gp_Pnt2d& P3);
66
67 //! Makes an arc of circle (TrimmedCurve from Geom2d) from
68 //! two points P1,P2 and the tangente to the solution at
69 //! the point P1.
70 Standard_EXPORT GCE2d_MakeArcOfCircle(const gp_Pnt2d& P1, const gp_Vec2d& V, const gp_Pnt2d& P2);
71
72 //! Returns the constructed arc of circle.
73 //! Exceptions StdFail_NotDone if no arc of circle is constructed.
74 Standard_EXPORT const Handle(Geom2d_TrimmedCurve)& Value() const;
42cf5bc1 75
d1a67b9d 76 operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
42cf5bc1 77
78private:
42cf5bc1 79 Handle(Geom2d_TrimmedCurve) TheArc;
42cf5bc1 80};
81
42cf5bc1 82#endif // _GCE2d_MakeArcOfCircle_HeaderFile