b311480e |
1 | // Created on: 1992-10-22 |
2 | // Created by: Laurent BUCHARD |
3 | // Copyright (c) 1992-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
7fd59977 |
16 | |
7fd59977 |
17 | #include <GeomAbs_CurveType.hxx> |
18 | #include <GeomAbs_Shape.hxx> |
19 | |
20 | #include <gp_Vec.hxx> |
21 | #include <gp_Lin.hxx> |
22 | #include <gp_Circ.hxx> |
23 | #include <gp_Elips.hxx> |
24 | #include <gp_Parab.hxx> |
25 | #include <gp_Hypr.hxx> |
26 | |
27 | |
cb389a77 |
28 | #include <Geom_BezierCurve.hxx> |
29 | #include <Geom_BSplineCurve.hxx> |
7fd59977 |
30 | |
31 | #include <TColStd_Array1OfReal.hxx> |
32 | |
33 | //============================================================ |
04f7bd75 |
34 | inline Standard_Real BRepBlend_HCurveTool::FirstParameter (const Handle(Adaptor3d_HCurve)& C) { |
7fd59977 |
35 | return(C->FirstParameter()); |
36 | } |
37 | //============================================================ |
04f7bd75 |
38 | inline Standard_Real BRepBlend_HCurveTool::LastParameter (const Handle(Adaptor3d_HCurve)& C) { |
7fd59977 |
39 | return(C->LastParameter()); |
40 | } |
41 | //============================================================ |
04f7bd75 |
42 | inline GeomAbs_Shape BRepBlend_HCurveTool::Continuity (const Handle(Adaptor3d_HCurve)& C) { |
7fd59977 |
43 | return(C->Continuity()); |
44 | } |
45 | //============================================================ |
04f7bd75 |
46 | inline Standard_Integer BRepBlend_HCurveTool::NbIntervals(const Handle(Adaptor3d_HCurve)& C,const GeomAbs_Shape Sh) { |
7fd59977 |
47 | return(C->NbIntervals(Sh)); |
48 | } |
49 | //============================================================ |
04f7bd75 |
50 | inline void BRepBlend_HCurveTool::Intervals(const Handle(Adaptor3d_HCurve)& C, |
7fd59977 |
51 | TColStd_Array1OfReal& Tab, |
52 | const GeomAbs_Shape Sh) { |
53 | C->Intervals(Tab,Sh); |
54 | } |
55 | //============================================================ |
04f7bd75 |
56 | inline Standard_Boolean BRepBlend_HCurveTool::IsClosed(const Handle(Adaptor3d_HCurve)& C) { |
7fd59977 |
57 | return(C->IsClosed()); |
58 | } |
59 | //============================================================ |
04f7bd75 |
60 | inline Standard_Boolean BRepBlend_HCurveTool::IsPeriodic(const Handle(Adaptor3d_HCurve)& C) { |
7fd59977 |
61 | return(C->IsPeriodic()); |
62 | } |
63 | //============================================================ |
04f7bd75 |
64 | inline Standard_Real BRepBlend_HCurveTool::Period(const Handle(Adaptor3d_HCurve)& C) { |
7fd59977 |
65 | return(C->Period()); |
66 | } |
67 | //============================================================ |
04f7bd75 |
68 | inline gp_Pnt BRepBlend_HCurveTool::Value (const Handle(Adaptor3d_HCurve)& C, |
7fd59977 |
69 | const Standard_Real U) { |
70 | return(C->Value(U)); |
71 | } |
72 | //============================================================ |
04f7bd75 |
73 | inline void BRepBlend_HCurveTool::D0(const Handle(Adaptor3d_HCurve)& C, |
7fd59977 |
74 | const Standard_Real U, |
75 | gp_Pnt& P) { |
76 | C->D0(U,P); |
77 | } |
78 | //============================================================ |
04f7bd75 |
79 | inline void BRepBlend_HCurveTool::D1 (const Handle(Adaptor3d_HCurve)& C, |
7fd59977 |
80 | const Standard_Real U, |
81 | gp_Pnt& P, |
82 | gp_Vec& T) { |
83 | C->D1(U,P,T); |
84 | } |
85 | //============================================================ |
04f7bd75 |
86 | inline void BRepBlend_HCurveTool::D2 (const Handle(Adaptor3d_HCurve)& C, |
7fd59977 |
87 | const Standard_Real U, |
88 | gp_Pnt& P, |
89 | gp_Vec& T, |
90 | gp_Vec& N) { |
91 | |
92 | C->D2(U,P,T,N); |
93 | } |
94 | //============================================================ |
04f7bd75 |
95 | inline void BRepBlend_HCurveTool::D3 (const Handle(Adaptor3d_HCurve)& C, |
7fd59977 |
96 | const Standard_Real U, |
97 | gp_Pnt& P, |
98 | gp_Vec& V1, |
99 | gp_Vec& V2, |
100 | gp_Vec& V3) { |
101 | |
102 | C->D3(U,P,V1,V2,V3); |
103 | } |
104 | //============================================================ |
04f7bd75 |
105 | inline gp_Vec BRepBlend_HCurveTool::DN (const Handle(Adaptor3d_HCurve)& C, |
7fd59977 |
106 | const Standard_Real U, |
107 | const Standard_Integer N) { |
108 | |
109 | return(C->DN(U,N)); |
110 | } |
111 | //============================================================ |
04f7bd75 |
112 | inline Standard_Real BRepBlend_HCurveTool::Resolution(const Handle(Adaptor3d_HCurve)& C, |
7fd59977 |
113 | const Standard_Real R3d) { |
114 | return(C->Resolution(R3d)); |
115 | } |
116 | //============================================================ |
04f7bd75 |
117 | inline GeomAbs_CurveType BRepBlend_HCurveTool::GetType(const Handle(Adaptor3d_HCurve)& C) { |
7fd59977 |
118 | return(C->GetType()); |
119 | } |
120 | //============================================================ |
04f7bd75 |
121 | inline gp_Lin BRepBlend_HCurveTool::Line (const Handle(Adaptor3d_HCurve)& C) { |
7fd59977 |
122 | return(C->Line()); |
123 | } |
124 | //============================================================ |
04f7bd75 |
125 | inline gp_Circ BRepBlend_HCurveTool::Circle (const Handle(Adaptor3d_HCurve)& C) { |
7fd59977 |
126 | return(C->Circle()); |
127 | } |
128 | //============================================================ |
04f7bd75 |
129 | inline gp_Elips BRepBlend_HCurveTool::Ellipse (const Handle(Adaptor3d_HCurve)& C) { |
7fd59977 |
130 | return(C->Ellipse()); |
131 | } |
132 | //============================================================ |
04f7bd75 |
133 | inline gp_Parab BRepBlend_HCurveTool::Parabola (const Handle(Adaptor3d_HCurve)& C) { |
7fd59977 |
134 | return(C->Parabola()); |
135 | } |
136 | //============================================================ |
04f7bd75 |
137 | inline gp_Hypr BRepBlend_HCurveTool::Hyperbola (const Handle(Adaptor3d_HCurve)& C) { |
7fd59977 |
138 | return(C->Hyperbola()); |
139 | } |
140 | //============================================================ |
04f7bd75 |
141 | inline Handle(Geom_BezierCurve) BRepBlend_HCurveTool::Bezier (const Handle(Adaptor3d_HCurve)& C) { |
7fd59977 |
142 | return(C->Bezier()); |
143 | } |
144 | //============================================================ |
04f7bd75 |
145 | inline Handle(Geom_BSplineCurve) BRepBlend_HCurveTool::BSpline (const Handle(Adaptor3d_HCurve)& C) { |
7fd59977 |
146 | return(C->BSpline()); |
147 | } |
148 | //============================================================ |
149 | |
150 | |
151 | |
152 | |
153 | |
154 | |
155 | |
156 | |
157 | |
158 | |
159 | |
160 | |
161 | |
162 | |