7fd59977 |
1 | // File: Geom2dAdaptor_Curve.lxx |
2 | // Created: Fri Jun 4 11:03:44 1993 |
3 | // Author: Bruno DUMORTIER |
4 | // <dub@topsn3> |
5 | |
6 | |
7 | #include <gp_Pnt2d.hxx> |
8 | #include <Geom2d_Curve.hxx> |
041bfce9 |
9 | #include <Standard_NoSuchObject.hxx> |
10 | #include <Standard_NullObject.hxx> |
7fd59977 |
11 | |
12 | //======================================================================= |
13 | //function : FirstParameter |
14 | //purpose : |
15 | //======================================================================= |
16 | |
17 | inline Standard_Real Geom2dAdaptor_Curve::FirstParameter() const |
18 | { |
19 | return myFirst; |
20 | } |
21 | |
22 | //======================================================================= |
23 | //function : LastParameter |
24 | //purpose : |
25 | //======================================================================= |
26 | |
27 | inline Standard_Real Geom2dAdaptor_Curve::LastParameter() const |
28 | { |
29 | return myLast; |
30 | } |
31 | |
32 | //======================================================================= |
33 | //function : Curve |
34 | //purpose : |
35 | //======================================================================= |
36 | |
37 | inline const Handle(Geom2d_Curve)& Geom2dAdaptor_Curve::Curve() const |
38 | { |
39 | return myCurve; |
40 | } |
41 | |
42 | //======================================================================= |
43 | //function : GetType |
44 | //purpose : |
45 | //======================================================================= |
46 | |
47 | inline GeomAbs_CurveType Geom2dAdaptor_Curve::GetType() const |
48 | { |
49 | return myTypeCurve; |
50 | } |
51 | |
041bfce9 |
52 | //======================================================================= |
53 | //function : Load |
54 | //purpose : |
55 | //======================================================================= |
56 | |
57 | inline void Geom2dAdaptor_Curve::Load(const Handle(Geom2d_Curve)& C) |
58 | { |
59 | if ( C.IsNull()) Standard_NullObject::Raise(); |
60 | |
61 | load(C,C->FirstParameter(),C->LastParameter()); |
62 | } |
63 | |
64 | //======================================================================= |
65 | //function : Load |
66 | //purpose : |
67 | //======================================================================= |
68 | |
69 | inline void Geom2dAdaptor_Curve::Load(const Handle(Geom2d_Curve)& C, |
70 | const Standard_Real UFirst, |
71 | const Standard_Real ULast) |
72 | { |
73 | if ( C.IsNull()) Standard_NullObject::Raise(); |
74 | |
75 | if ( UFirst > ULast) Standard_ConstructionError::Raise(); |
76 | |
77 | load(C,UFirst,ULast); |
78 | } |