1 // Created on: 1992-10-22
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
23 #include IntCurveCurve_hxx
25 #include <GeomAbs_CurveType.hxx>
26 #include <GeomAbs_Shape.hxx>
28 #include <gp_Lin2d.hxx>
29 #include <gp_Circ2d.hxx>
30 #include <gp_Elips2d.hxx>
31 #include <gp_Parab2d.hxx>
32 #include <gp_Hypr2d.hxx>
34 #include <TColStd_Array1OfReal.hxx>
36 #define IS_C2_COMPOSITE 0
37 //============================================================
38 inline GeomAbs_CurveType Geom2dInt_CurveTool::GetType(const IntCurveCurve& C) {
41 //============================================================
42 inline gp_Lin2d Geom2dInt_CurveTool::Line (const IntCurveCurve& C) {
45 //============================================================
46 inline gp_Circ2d Geom2dInt_CurveTool::Circle (const IntCurveCurve& C) {
49 //============================================================
50 inline gp_Elips2d Geom2dInt_CurveTool::Ellipse (const IntCurveCurve& C) {
53 //============================================================
54 inline gp_Parab2d Geom2dInt_CurveTool::Parabola (const IntCurveCurve& C) {
57 //============================================================
58 inline gp_Hypr2d Geom2dInt_CurveTool::Hyperbola (const IntCurveCurve& C) {
59 return(C.Hyperbola());
61 //============================================================
62 inline gp_Pnt2d Geom2dInt_CurveTool::Value (const IntCurveCurve& C,
63 const Standard_Real U) {
66 //============================================================
67 inline void Geom2dInt_CurveTool::D0(const IntCurveCurve& C,
68 const Standard_Real U,
72 //============================================================
73 inline void Geom2dInt_CurveTool::D1 (const IntCurveCurve& C,
74 const Standard_Real U,
79 //============================================================
80 inline void Geom2dInt_CurveTool::D2 (const IntCurveCurve& C,
81 const Standard_Real U,
89 //============================================================
90 inline void Geom2dInt_CurveTool::D3 (const IntCurveCurve& C,
91 const Standard_Real U,
99 //============================================================
100 inline gp_Vec2d Geom2dInt_CurveTool::DN(const Adaptor2d_Curve2d& C,
101 const Standard_Real U,
102 const Standard_Integer N)
107 //============================================================
108 inline Standard_Real Geom2dInt_CurveTool::FirstParameter (const IntCurveCurve& C) {
109 return(C.FirstParameter());
111 //============================================================
112 inline Standard_Real Geom2dInt_CurveTool::LastParameter (const IntCurveCurve& C) {
113 return(C.LastParameter());
115 //============================================================
116 //== tolerance used by mathemetical algorithms
118 inline Standard_Real Geom2dInt_CurveTool::EpsX (const IntCurveCurve& ) {
121 //------------------------------------------------------------
122 inline Standard_Real Geom2dInt_CurveTool::EpsX (const IntCurveCurve& C,const Standard_Real Eps_XYZ) {
123 return(C.Resolution(Eps_XYZ));
125 //============================================================
126 inline void Geom2dInt_CurveTool::Intervals(const IntCurveCurve& C,
127 TColStd_Array1OfReal& Tab) {
129 C.Intervals(Tab,GeomAbs_C2);
131 C.Intervals(Tab,GeomAbs_C1);
134 //============================================================
135 //inline void Geom2dInt_CurveTool::GetInterval(const IntCurveCurve& C,
136 inline void Geom2dInt_CurveTool::GetInterval(const IntCurveCurve& ,
137 const Standard_Integer i,
138 const TColStd_Array1OfReal& Tab,
144 //============================================================
145 inline Standard_Integer Geom2dInt_CurveTool::NbIntervals(const IntCurveCurve& C) {
146 Standard_Integer N=1;
148 N = C.NbIntervals(GeomAbs_C2);
150 N = C.NbIntervals(GeomAbs_C1);
154 //============================================================
156 inline Standard_Integer Geom2dInt_CurveTool::Degree(const IntCurveCurve& C)