b311480e |
1 | // Copyright (c) 1995-1999 Matra Datavision |
973c2be1 |
2 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
3 | // |
973c2be1 |
4 | // This file is part of Open CASCADE Technology software library. |
b311480e |
5 | // |
d5f74e42 |
6 | // This library is free software; you can redistribute it and/or modify it under |
7 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
8 | // by the Free Software Foundation, with special exception defined in the file |
9 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
10 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
11 | // |
973c2be1 |
12 | // Alternatively, this file may be used under the terms of Open CASCADE |
13 | // commercial license or contractual agreement. |
b311480e |
14 | |
7fd59977 |
15 | |
7fd59977 |
16 | #include <Geom2d_BezierCurve.hxx> |
42cf5bc1 |
17 | #include <Geom2d_Line.hxx> |
18 | #include <Geom2dAdaptor_Curve.hxx> |
19 | #include <Geom2dGcc_CurveTool.hxx> |
7fd59977 |
20 | #include <gp_Pnt.hxx> |
21 | #include <gp_Pnt2d.hxx> |
7fd59977 |
22 | #include <gp_Vec.hxx> |
42cf5bc1 |
23 | #include <gp_Vec2d.hxx> |
7fd59977 |
24 | |
25 | //Template a respecter |
7fd59977 |
26 | Standard_Real Geom2dGcc_CurveTool:: |
27 | EpsX (const Geom2dAdaptor_Curve& C , |
28 | const Standard_Real Tol) { |
29 | return C.Resolution(Tol); |
30 | } |
31 | |
32 | Standard_Integer Geom2dGcc_CurveTool:: |
33 | NbSamples (const Geom2dAdaptor_Curve& /*C*/) { |
34 | return 20; |
35 | } |
36 | |
37 | gp_Pnt2d Geom2dGcc_CurveTool::Value (const Geom2dAdaptor_Curve& C, |
38 | const Standard_Real U) { |
39 | return C.Value(U); |
40 | } |
41 | |
42 | Standard_Real |
43 | Geom2dGcc_CurveTool::FirstParameter (const Geom2dAdaptor_Curve& C) { |
44 | return C.FirstParameter(); |
45 | } |
46 | |
47 | Standard_Real |
48 | Geom2dGcc_CurveTool::LastParameter (const Geom2dAdaptor_Curve& C) { |
49 | return C.LastParameter(); |
50 | } |
51 | |
52 | void Geom2dGcc_CurveTool::D1 (const Geom2dAdaptor_Curve& C, |
53 | const Standard_Real U, |
54 | gp_Pnt2d& P, |
55 | gp_Vec2d& T) { |
56 | |
57 | C.D1(U,P,T); |
58 | } |
59 | |
60 | void Geom2dGcc_CurveTool::D2 (const Geom2dAdaptor_Curve& C, |
61 | const Standard_Real U, |
62 | gp_Pnt2d& P, |
63 | gp_Vec2d& T, |
64 | gp_Vec2d& N) { |
65 | |
66 | C.D2(U,P,T,N); |
67 | } |
68 | |
69 | void Geom2dGcc_CurveTool::D3 (const Geom2dAdaptor_Curve& C , |
70 | const Standard_Real U , |
71 | gp_Pnt2d& P , |
72 | gp_Vec2d& T , |
73 | gp_Vec2d& N , |
74 | gp_Vec2d& dN) { |
75 | |
76 | C.D3(U,P,T,N,dN); |
77 | } |
78 | |
79 | |
80 | |