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