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 <Adaptor3d_OffsetCurve.hxx>
17 #include <Extrema_POnCurv2d.hxx>
18 #include <Geom2d_BezierCurve.hxx>
19 #include <Geom2d_BSplineCurve.hxx>
20 #include <Geom2d_Circle.hxx>
21 #include <Geom2d_Ellipse.hxx>
22 #include <Geom2d_Hyperbola.hxx>
23 #include <Geom2d_Line.hxx>
24 #include <Geom2d_Parabola.hxx>
25 #include <Geom2dGcc_CurveToolGeo.hxx>
26 #include <GeomAbs_CurveType.hxx>
28 #include <gp_Circ2d.hxx>
29 #include <gp_Elips2d.hxx>
30 #include <gp_Hypr2d.hxx>
31 #include <gp_Lin2d.hxx>
32 #include <gp_Parab2d.hxx>
33 #include <gp_Pnt2d.hxx>
35 #include <gp_Vec2d.hxx>
36 #include <Standard_Failure.hxx>
38 GeomAbs_CurveType Geom2dGcc_CurveToolGeo::
39 TheType(const Adaptor3d_OffsetCurve& ) {
40 return GeomAbs_OtherCurve;
43 gp_Lin2d Geom2dGcc_CurveToolGeo::
44 Line (const Adaptor3d_OffsetCurve& ) {
45 cout << "Not implemented" << endl;
49 gp_Circ2d Geom2dGcc_CurveToolGeo::
50 Circle (const Adaptor3d_OffsetCurve& ) {
51 cout << "Not implemented" << endl;
55 gp_Elips2d Geom2dGcc_CurveToolGeo::
56 Ellipse (const Adaptor3d_OffsetCurve& ) {
57 cout << "Not implemented" << endl;
61 gp_Parab2d Geom2dGcc_CurveToolGeo::
62 Parabola (const Adaptor3d_OffsetCurve& ) {
63 cout << "Not implemented" << endl;
67 gp_Hypr2d Geom2dGcc_CurveToolGeo::
68 Hyperbola (const Adaptor3d_OffsetCurve& ) {
69 cout << "Not implemented" << endl;
74 Geom2dGcc_CurveToolGeo::EpsX (const Adaptor3d_OffsetCurve& /*C*/,
75 const Standard_Real Tol) {
80 Geom2dGcc_CurveToolGeo::NbSamples (const Adaptor3d_OffsetCurve& C) {
81 GeomAbs_CurveType typC = C.GetType();
82 Standard_Integer nbs = 20;
83 if(typC == GeomAbs_Line)
85 else if(typC == GeomAbs_BezierCurve)
86 nbs = 3 + C.Bezier()->NbPoles();
87 else if(typC == GeomAbs_BSplineCurve) {
88 Handle(Geom2d_BSplineCurve) BSC = C.BSpline();
97 Geom2dGcc_CurveToolGeo::FirstParameter (const Adaptor3d_OffsetCurve& C) {
98 return C.FirstParameter();
102 Geom2dGcc_CurveToolGeo::LastParameter (const Adaptor3d_OffsetCurve& C) {
103 return C.LastParameter();
107 Geom2dGcc_CurveToolGeo::Value (const Adaptor3d_OffsetCurve& C,
108 const Standard_Real U) {
113 void Geom2dGcc_CurveToolGeo::D1(const Adaptor3d_OffsetCurve& C,
114 const Standard_Real U,
120 void Geom2dGcc_CurveToolGeo::D2(const Adaptor3d_OffsetCurve& C,
121 const Standard_Real U,
128 Standard_Boolean Geom2dGcc_CurveToolGeo::
129 IsComposite (const Adaptor3d_OffsetCurve& ) {
130 return Standard_False;
133 Standard_Integer Geom2dGcc_CurveToolGeo::
134 GetIntervals (const Adaptor3d_OffsetCurve& ) {
135 cout << "Not implemented" << endl;
139 void Geom2dGcc_CurveToolGeo::
140 GetInterval (const Adaptor3d_OffsetCurve& ,
141 const Standard_Integer ,
144 cout << "Not implemented" << endl;
147 void Geom2dGcc_CurveToolGeo::
148 SetCurrentInterval ( Adaptor3d_OffsetCurve& ,
149 const Standard_Integer ) {
150 cout << "Not implemented" << endl;