0024023: Revamp the OCCT Handle -- GC
[occt.git] / src / GCE2d / GCE2d_MakeArcOfCircle.cdl
CommitLineData
b311480e 1-- Created on: 1992-09-28
2-- Created by: Remi GILET
3-- Copyright (c) 1992-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 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
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class MakeArcOfCircle from GCE2d inherits Root from GCE2d
18 ---Purpose: Implements construction algorithms for an arc of
19 -- circle in the plane. The result is a Geom2d_TrimmedCurve curve.
20 -- A MakeArcOfCircle object provides a framework for:
21 -- - defining the construction of the arc of circle,
22 -- - implementing the construction algorithm, and
23 -- - consulting the results. In particular, the Value
24 -- function returns the constructed arc of circle.
25
26uses Pnt2d from gp,
27 Circ2d from gp,
28 Vec2d from gp,
29 Real from Standard,
30 Boolean from Standard,
31 TrimmedCurve from Geom2d
32
33raises NotDone from StdFail
34
35is
36
37Create(Circ : Circ2d from gp ;
38 Alpha1, Alpha2 : Real from Standard ;
39 Sense : Boolean from Standard = Standard_True)
40 returns MakeArcOfCircle;
41 ---Purpose: Makes an arc of circle (TrimmedCurve from Geom2d) from
42 -- a circle between two parameters Alpha1 and Alpha2.
43 -- The two parameters are angles. The parameters are
44 -- in radians.
45
46Create(Circ : Circ2d from gp ;
47 P : Pnt2d from gp ;
48 Alpha : Real from Standard ;
49 Sense : Boolean from Standard = Standard_True)
50 returns MakeArcOfCircle;
51 ---Purpose: Makes an arc of circle (TrimmedCurve from Geom2d) from
52 -- a circle between point <P> and the parameter
53 -- Alpha. Alpha is given in radians.
54
55Create(Circ : Circ2d from gp ;
56 P1 : Pnt2d from gp ;
57 P2 : Pnt2d from gp ;
58 Sense : Boolean from Standard = Standard_True)
59 returns MakeArcOfCircle;
60 ---Purpose: Makes an arc of circle (TrimmedCurve from Geom2d) from
61 -- a circle between two points P1 and P2.
62
63Create(P1 : Pnt2d from gp ;
64 P2 : Pnt2d from gp ;
65 P3 : Pnt2d from gp )
66 returns MakeArcOfCircle;
67 ---Purpose: Makes an arc of circle (TrimmedCurve from Geom2d) from
68 -- three points P1,P2,P3 between two points P1 and P3,
69 -- and passing through the point P2.
70
71Create(P1 : Pnt2d from gp ;
72 V : Vec2d from gp ;
73 P2 : Pnt2d from gp )
74 returns MakeArcOfCircle;
75 ---Purpose: Makes an arc of circle (TrimmedCurve from Geom2d) from
76 -- two points P1,P2 and the tangente to the solution at
77 -- the point P1.
78
79Value(me) returns TrimmedCurve from Geom2d
80 raises NotDone
81 is static;
82 ---C++: return const&
83 ---Purpose: Returns the constructed arc of circle.
84 -- Exceptions StdFail_NotDone if no arc of circle is constructed.
83eaf3e8 85 ---C++: alias "operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }"
7fd59977 86
87fields
88
89 TheArc : TrimmedCurve from Geom2d;
90 --The solution from Geom2d.
91
92end MakeArcOfCircle;