0022312: Translation of french commentaries in OCCT files
[occt.git] / src / GC / GC_MakeArcOfParabola.cxx
1 // File:        GC_MakeArcOfParabola.cxx
2 // Created:     Fri Oct  2 16:31:46 1992
3 // Author:      Remi GILET
4 //              <reg@topsn3>
5
6 #include <GC_MakeArcOfParabola.ixx>
7 #include <Geom_Parabola.hxx>
8 #include <StdFail_NotDone.hxx>
9 #include <ElCLib.hxx>
10
11 GC_MakeArcOfParabola::GC_MakeArcOfParabola(const gp_Parab& Parab ,
12                                              const gp_Pnt&   P1    ,
13                                              const gp_Pnt&   P2    ,
14                                              const Standard_Boolean  Sense  ) 
15 {
16   Standard_Real Alpha1 = ElCLib::Parameter(Parab,P1);
17   Standard_Real Alpha2 = ElCLib::Parameter(Parab,P2);
18   Handle(Geom_Parabola) P = new Geom_Parabola(Parab);
19   TheArc = new Geom_TrimmedCurve(P,Alpha1,Alpha2,Sense);
20   TheError = gce_Done;
21 }
22
23 GC_MakeArcOfParabola::GC_MakeArcOfParabola(const gp_Parab& Parab ,
24                                              const gp_Pnt&   P     ,
25                                              const Standard_Real      Alpha ,
26                                              const Standard_Boolean  Sense  ) 
27 {
28   Standard_Real Alphafirst = ElCLib::Parameter(Parab,P);
29   Handle(Geom_Parabola) Parabola = new Geom_Parabola(Parab);
30   TheArc = new Geom_TrimmedCurve(Parabola,Alphafirst,Alpha,Sense);
31   TheError = gce_Done;
32 }
33
34 GC_MakeArcOfParabola::GC_MakeArcOfParabola(const gp_Parab& Parab ,
35                                              const Standard_Real      Alpha1 ,
36                                              const Standard_Real      Alpha2 ,
37                                              const Standard_Boolean   Sense  ) 
38 {
39   Handle(Geom_Parabola) P = new Geom_Parabola(Parab);
40   TheArc = new Geom_TrimmedCurve(P,Alpha1,Alpha2,Sense);
41   TheError = gce_Done;
42 }
43
44 const Handle(Geom_TrimmedCurve)& GC_MakeArcOfParabola::Value() const
45
46   StdFail_NotDone_Raise_if(!TheError == gce_Done,"");
47   return TheArc;
48 }
49
50 const Handle(Geom_TrimmedCurve)& GC_MakeArcOfParabola::Operator() const 
51 {
52   return Value();
53 }
54
55 GC_MakeArcOfParabola::operator Handle(Geom_TrimmedCurve) () const
56 {
57   return Value();
58 }
59