b311480e |
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 |
5 | // |
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. |
10 | // |
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. |
13 | // |
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. |
20 | |
7fd59977 |
21 | |
22 | #include <GeomAbs_CurveType.hxx> |
23 | #include <GeomAbs_Shape.hxx> |
24 | |
25 | #include <gp_Vec2d.hxx> |
26 | #include <gp_Lin2d.hxx> |
27 | #include <gp_Circ2d.hxx> |
28 | #include <gp_Elips2d.hxx> |
29 | #include <gp_Parab2d.hxx> |
30 | #include <gp_Hypr2d.hxx> |
31 | |
32 | #include <Handle_Geom2d_BezierCurve.hxx> |
33 | #include <Handle_Geom2d_BSplineCurve.hxx> |
34 | |
35 | #include <TColStd_Array1OfReal.hxx> |
36 | |
37 | #include <Adaptor2d_HCurve2d.hxx> |
38 | |
39 | |
40 | //============================================================ |
41 | inline Standard_Real IntPatch_HCurve2dTool::FirstParameter (const Handle(Adaptor2d_HCurve2d)& C) { |
42 | return(C->FirstParameter()); |
43 | } |
44 | //============================================================ |
45 | inline Standard_Real IntPatch_HCurve2dTool::LastParameter (const Handle(Adaptor2d_HCurve2d)& C) { |
46 | return(C->LastParameter()); |
47 | } |
48 | //============================================================ |
49 | inline GeomAbs_Shape IntPatch_HCurve2dTool::Continuity (const Handle(Adaptor2d_HCurve2d)& C) { |
50 | return(C->Continuity()); |
51 | } |
52 | //============================================================ |
53 | inline Standard_Integer IntPatch_HCurve2dTool::NbIntervals(const Handle(Adaptor2d_HCurve2d)& C,const GeomAbs_Shape Sh) { |
54 | return(C->NbIntervals(Sh)); |
55 | } |
56 | //============================================================ |
57 | inline void IntPatch_HCurve2dTool::Intervals(const Handle(Adaptor2d_HCurve2d)& C, |
58 | TColStd_Array1OfReal& Tab, |
59 | const GeomAbs_Shape Sh) { |
60 | C->Intervals(Tab,Sh); |
61 | } |
62 | //============================================================ |
63 | inline Standard_Boolean IntPatch_HCurve2dTool::IsClosed(const Handle(Adaptor2d_HCurve2d)& C) { |
64 | return(C->IsClosed()); |
65 | } |
66 | //============================================================ |
67 | inline Standard_Boolean IntPatch_HCurve2dTool::IsPeriodic(const Handle(Adaptor2d_HCurve2d)& C) { |
68 | return(C->IsPeriodic()); |
69 | } |
70 | //============================================================ |
71 | inline Standard_Real IntPatch_HCurve2dTool::Period(const Handle(Adaptor2d_HCurve2d)& C) { |
72 | return(C->Period()); |
73 | } |
74 | //============================================================ |
75 | inline gp_Pnt2d IntPatch_HCurve2dTool::Value (const Handle(Adaptor2d_HCurve2d)& C, |
76 | const Standard_Real U) { |
77 | return(C->Value(U)); |
78 | } |
79 | //============================================================ |
80 | inline void IntPatch_HCurve2dTool::D0(const Handle(Adaptor2d_HCurve2d)& C, |
81 | const Standard_Real U, |
82 | gp_Pnt2d& P) { |
83 | C->D0(U,P); |
84 | } |
85 | //============================================================ |
86 | inline void IntPatch_HCurve2dTool::D1 (const Handle(Adaptor2d_HCurve2d)& C, |
87 | const Standard_Real U, |
88 | gp_Pnt2d& P, |
89 | gp_Vec2d& T) { |
90 | C->D1(U,P,T); |
91 | } |
92 | //============================================================ |
93 | inline void IntPatch_HCurve2dTool::D2 (const Handle(Adaptor2d_HCurve2d)& C, |
94 | const Standard_Real U, |
95 | gp_Pnt2d& P, |
96 | gp_Vec2d& T, |
97 | gp_Vec2d& N) { |
98 | C->D2(U,P,T,N); |
99 | } |
100 | //============================================================ |
101 | inline void IntPatch_HCurve2dTool::D3 (const Handle(Adaptor2d_HCurve2d)& C, |
102 | const Standard_Real U, |
103 | gp_Pnt2d& P, |
104 | gp_Vec2d& V1, |
105 | gp_Vec2d& V2, |
106 | gp_Vec2d& V3) { |
107 | C->D3(U,P,V1,V2,V3); |
108 | } |
109 | //============================================================ |
110 | inline gp_Vec2d IntPatch_HCurve2dTool::DN (const Handle(Adaptor2d_HCurve2d)& C, |
111 | const Standard_Real U, |
112 | const Standard_Integer N) { |
113 | return(C->DN(U,N)); |
114 | } |
115 | //============================================================ |
116 | inline Standard_Real IntPatch_HCurve2dTool::Resolution(const Handle(Adaptor2d_HCurve2d)& C, |
117 | const Standard_Real R3d) { |
118 | return(C->Resolution(R3d)); |
119 | } |
120 | //============================================================ |
121 | inline GeomAbs_CurveType IntPatch_HCurve2dTool::GetType(const Handle(Adaptor2d_HCurve2d)& C) { |
122 | return(C->GetType()); |
123 | } |
124 | //============================================================ |
125 | inline gp_Lin2d IntPatch_HCurve2dTool::Line (const Handle(Adaptor2d_HCurve2d)& C) { |
126 | return(C->Line()); |
127 | } |
128 | //============================================================ |
129 | inline gp_Circ2d IntPatch_HCurve2dTool::Circle (const Handle(Adaptor2d_HCurve2d)& C) { |
130 | return(C->Circle()); |
131 | } |
132 | //============================================================ |
133 | inline gp_Elips2d IntPatch_HCurve2dTool::Ellipse (const Handle(Adaptor2d_HCurve2d)& C) { |
134 | return(C->Ellipse()); |
135 | } |
136 | //============================================================ |
137 | inline gp_Parab2d IntPatch_HCurve2dTool::Parabola (const Handle(Adaptor2d_HCurve2d)& C) { |
138 | return(C->Parabola()); |
139 | } |
140 | //============================================================ |
141 | inline gp_Hypr2d IntPatch_HCurve2dTool::Hyperbola (const Handle(Adaptor2d_HCurve2d)& C) { |
142 | return(C->Hyperbola()); |
143 | } |
144 | //============================================================ |
145 | inline Handle(Geom2d_BezierCurve) IntPatch_HCurve2dTool::Bezier (const Handle(Adaptor2d_HCurve2d)& C) { |
146 | return(C->Bezier()); |
147 | } |
148 | //============================================================ |
149 | inline Handle(Geom2d_BSplineCurve) IntPatch_HCurve2dTool::BSpline (const Handle(Adaptor2d_HCurve2d)& C) { |
150 | return(C->BSpline()); |
151 | } |
152 | //============================================================ |