0023024: Update headers of OCCT files
[occt.git] / src / Geom2dLProp / Geom2dLProp_Curve2dTool.cxx
1 // Created on: 1992-08-18
2 // Created by: Herve LEGRAND
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
5 //
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
10 //
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 //
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
20
21
22 #include <Geom2dLProp_Curve2dTool.ixx>
23 #include <Geom2d_Curve.hxx>
24 #include <GeomAbs_Shape.hxx>
25
26 void  Geom2dLProp_Curve2dTool::Value(const Handle_Geom2d_Curve& C, 
27             const Standard_Real U, gp_Pnt2d& P)
28 {
29   P = C->Value(U);
30 }
31
32 void  Geom2dLProp_Curve2dTool::D1(const Handle_Geom2d_Curve& C, 
33          const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1)
34 {
35   C->D1(U, P, V1);
36 }
37
38 void  Geom2dLProp_Curve2dTool::D2(const Handle_Geom2d_Curve& C, 
39          const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2)
40 {
41   C->D2(U, P, V1, V2);
42 }
43
44 void  Geom2dLProp_Curve2dTool::D3(const Handle_Geom2d_Curve& C, 
45          const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3)
46 {
47   C->D3(U, P, V1, V2, V3);
48 }
49
50 Standard_Integer  Geom2dLProp_Curve2dTool::Continuity(const Handle_Geom2d_Curve& C)
51 {
52   GeomAbs_Shape s = C->Continuity();
53   switch (s) {
54   case GeomAbs_C0:
55     return 0;
56   case GeomAbs_C1:
57     return 1;
58   case GeomAbs_C2:
59     return 2;
60   case GeomAbs_C3:
61     return 3;
62   case GeomAbs_G1:
63     return 0;
64   case GeomAbs_G2:
65     return 0;
66   case GeomAbs_CN:
67     return 3;
68   };
69   return 0;
70 }
71
72 Standard_Real  Geom2dLProp_Curve2dTool::FirstParameter(const Handle_Geom2d_Curve& C)
73 {
74   return C->FirstParameter();
75 }
76
77 Standard_Real  Geom2dLProp_Curve2dTool::LastParameter(const Handle_Geom2d_Curve& C)
78 {
79   return C->LastParameter();
80 }
81
82
83
84