Warnings on vc14 were eliminated
[occt.git] / src / BiTgte / BiTgte_CurveOnVertex.hxx
CommitLineData
42cf5bc1 1// Created on: 1997-03-21
2// Created by: Bruno DUMORTIER
3// Copyright (c) 1997-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
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
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _BiTgte_CurveOnVertex_HeaderFile
18#define _BiTgte_CurveOnVertex_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Real.hxx>
25#include <gp_Pnt.hxx>
26#include <Adaptor3d_Curve.hxx>
27#include <GeomAbs_Shape.hxx>
28#include <Standard_Integer.hxx>
29#include <TColStd_Array1OfReal.hxx>
30#include <Standard_Boolean.hxx>
31#include <GeomAbs_CurveType.hxx>
32class Standard_OutOfRange;
33class Standard_NoSuchObject;
34class Standard_DomainError;
35class TopoDS_Edge;
36class TopoDS_Vertex;
37class Adaptor3d_HCurve;
38class gp_Pnt;
39class gp_Vec;
40class gp_Lin;
41class gp_Circ;
42class gp_Elips;
43class gp_Hypr;
44class gp_Parab;
45class Geom_BezierCurve;
46class Geom_BSplineCurve;
47
48
49//! private class used to create a filler rolling on
50//! an edge.
51class BiTgte_CurveOnVertex : public Adaptor3d_Curve
52{
53public:
54
55 DEFINE_STANDARD_ALLOC
56
57
58 Standard_EXPORT BiTgte_CurveOnVertex();
59
60 Standard_EXPORT BiTgte_CurveOnVertex(const TopoDS_Edge& EonF, const TopoDS_Vertex& V);
61
62 Standard_EXPORT void Init (const TopoDS_Edge& EonF, const TopoDS_Vertex& V);
63
64 Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE;
65
66 Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE;
67
68 Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
69
70 //! Returns the number of intervals for continuity
71 //! <S>. May be one if Continuity(me) >= <S>
72 Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
73
74 //! Stores in <T> the parameters bounding the intervals
75 //! of continuity <S>.
76 //!
77 //! The array must provide enough room to accomodate
78 //! for the parameters. i.e. T.Length() > NbIntervals()
79 Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
80
81 //! Returns a curve equivalent of <me> between
82 //! parameters <First> and <Last>. <Tol> is used to
83 //! test for 3d points confusion.
84 //! If <First> >= <Last>
85 Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
86
87 Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
88
89 Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
90
91 Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE;
92
93 //! Computes the point of parameter U on the curve.
94 Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE;
95
96 //! Computes the point of parameter U on the curve.
97 Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE;
98
99 //! Computes the point of parameter U on the curve with its
100 //! first derivative.
101 //! Raised if the continuity of the current interval
102 //! is not C1.
103 Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE;
104
105
106 //! Returns the point P of parameter U, the first and second
107 //! derivatives V1 and V2.
108 //! Raised if the continuity of the current interval
109 //! is not C2.
110 Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE;
111
112
113 //! Returns the point P of parameter U, the first, the second
114 //! and the third derivative.
115 //! Raised if the continuity of the current interval
116 //! is not C3.
117 Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE;
118
119
120 //! The returned vector gives the value of the derivative for the
121 //! order of derivation N.
122 //! Raised if the continuity of the current interval
123 //! is not CN.
124 //! Raised if N < 1.
125 Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE;
126
127 //! Returns the parametric resolution corresponding
128 //! to the real space resolution <R3d>.
129 Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE;
130
131 //! Returns the type of the curve in the current
132 //! interval : Line, Circle, Ellipse, Hyperbola,
133 //! Parabola, BezierCurve, BSplineCurve, OtherCurve.
134 Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE;
135
136 Standard_EXPORT gp_Lin Line() const Standard_OVERRIDE;
137
138 Standard_EXPORT gp_Circ Circle() const Standard_OVERRIDE;
139
140 Standard_EXPORT gp_Elips Ellipse() const Standard_OVERRIDE;
141
142 Standard_EXPORT gp_Hypr Hyperbola() const Standard_OVERRIDE;
143
144 Standard_EXPORT gp_Parab Parabola() const Standard_OVERRIDE;
145
146 Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE;
147
148 Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
149
150 Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE;
151
152 Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE;
153
154 Standard_EXPORT Handle(Geom_BezierCurve) Bezier() const Standard_OVERRIDE;
155
156 Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE;
157
158
159
160
161protected:
162
163
164
165
166
167private:
168
169
170
171 Standard_Real myFirst;
172 Standard_Real myLast;
173 gp_Pnt myPnt;
174
175
176};
177
178
179
180
181
182
183
184#endif // _BiTgte_CurveOnVertex_HeaderFile