0023024: Update headers of OCCT files
[occt.git] / src / BRepLProp / BRepLProp_CurveTool.cxx
1 // Created on: 1994-02-24
2 // Created by: Laurent BOURESCHE
3 // Copyright (c) 1994-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
23 #include <BRepLProp_CurveTool.ixx>
24
25 //=======================================================================
26 //function : Value
27 //purpose  : 
28 //=======================================================================
29
30 void BRepLProp_CurveTool::Value(const BRepAdaptor_Curve& C, 
31                                 const Standard_Real U, 
32                                 gp_Pnt& P)
33 {
34   P = C.Value(U);
35 }
36
37
38 //=======================================================================
39 //function : D1
40 //purpose  : 
41 //=======================================================================
42
43 void BRepLProp_CurveTool::D1(const BRepAdaptor_Curve& C, 
44                              const Standard_Real U, 
45                              gp_Pnt& P, 
46                              gp_Vec& V1)
47 {
48   C.D1(U,P,V1);
49 }
50
51
52 //=======================================================================
53 //function : D2
54 //purpose  : 
55 //=======================================================================
56
57 void BRepLProp_CurveTool::D2(const BRepAdaptor_Curve& C, 
58                              const Standard_Real U, 
59                              gp_Pnt& P, 
60                              gp_Vec& V1, 
61                              gp_Vec& V2)
62 {
63   C.D2(U,P,V1,V2);
64 }
65
66
67 //=======================================================================
68 //function : D3
69 //purpose  : 
70 //=======================================================================
71
72 void BRepLProp_CurveTool::D3(const BRepAdaptor_Curve& C, 
73                              const Standard_Real U, 
74                              gp_Pnt& P, 
75                              gp_Vec& V1, 
76                              gp_Vec& V2, 
77                              gp_Vec& V3)
78 {
79   C.D3(U,P,V1,V2,V3);
80 }
81
82
83 //=======================================================================
84 //function : Continuity
85 //purpose  : 
86 //=======================================================================
87
88 Standard_Integer BRepLProp_CurveTool::Continuity(const BRepAdaptor_Curve& C)
89 {
90   GeomAbs_Shape s = C.Continuity();
91   switch (s) {
92   case GeomAbs_C0:
93     return 0;
94   case GeomAbs_C1:
95     return 1;
96   case GeomAbs_C2:
97     return 2;
98   case GeomAbs_C3:
99     return 3;
100   case GeomAbs_G1:
101     return 0;
102   case GeomAbs_G2:
103     return 0;
104   case GeomAbs_CN:
105     return 3;
106   };
107   return 0;
108 }
109
110
111 //=======================================================================
112 //function : FirstParameter
113 //purpose  : 
114 //=======================================================================
115
116 Standard_Real BRepLProp_CurveTool::FirstParameter(const BRepAdaptor_Curve& C)
117 {
118   return C.FirstParameter();
119 }
120
121
122 //=======================================================================
123 //function : LastParameter
124 //purpose  : 
125 //=======================================================================
126
127 Standard_Real BRepLProp_CurveTool::LastParameter(const BRepAdaptor_Curve& C)
128 {
129   return C.LastParameter();
130 }
131
132