1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
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
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.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
16 #include <Geom2d_BezierCurve.hxx>
17 #include <Geom2d_Line.hxx>
18 #include <Geom2dAdaptor_Curve.hxx>
19 #include <Geom2dGcc_CurveTool.hxx>
21 #include <gp_Pnt2d.hxx>
23 #include <gp_Vec2d.hxx>
25 //Template a respecter
26 Standard_Real Geom2dGcc_CurveTool::
27 EpsX (const Geom2dAdaptor_Curve& C ,
28 const Standard_Real Tol) {
29 return C.Resolution(Tol);
32 Standard_Integer Geom2dGcc_CurveTool::
33 NbSamples (const Geom2dAdaptor_Curve& /*C*/) {
37 gp_Pnt2d Geom2dGcc_CurveTool::Value (const Geom2dAdaptor_Curve& C,
38 const Standard_Real U) {
43 Geom2dGcc_CurveTool::FirstParameter (const Geom2dAdaptor_Curve& C) {
44 return C.FirstParameter();
48 Geom2dGcc_CurveTool::LastParameter (const Geom2dAdaptor_Curve& C) {
49 return C.LastParameter();
52 void Geom2dGcc_CurveTool::D1 (const Geom2dAdaptor_Curve& C,
53 const Standard_Real U,
60 void Geom2dGcc_CurveTool::D2 (const Geom2dAdaptor_Curve& C,
61 const Standard_Real U,
69 void Geom2dGcc_CurveTool::D3 (const Geom2dAdaptor_Curve& C ,
70 const Standard_Real U ,