0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / Adaptor3d / Adaptor3d_HCurve.hxx
CommitLineData
42cf5bc1 1// Created on: 1994-02-23
2// Created by: model
3// Copyright (c) 1994-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 _Adaptor3d_HCurve_HeaderFile
18#define _Adaptor3d_HCurve_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <MMgt_TShared.hxx>
24#include <Standard_Real.hxx>
25#include <GeomAbs_Shape.hxx>
26#include <Standard_Integer.hxx>
27#include <TColStd_Array1OfReal.hxx>
28#include <Standard_Boolean.hxx>
29#include <gp_Pnt.hxx>
30#include <gp_Vec.hxx>
31#include <GeomAbs_CurveType.hxx>
32#include <gp_Lin.hxx>
33#include <gp_Circ.hxx>
34#include <gp_Elips.hxx>
35#include <gp_Hypr.hxx>
36#include <gp_Parab.hxx>
37class Standard_OutOfRange;
38class Standard_NoSuchObject;
39class Standard_DomainError;
40class Adaptor3d_Curve;
41class gp_Pnt;
42class gp_Vec;
43class Geom_BezierCurve;
44class Geom_BSplineCurve;
45
46
47class Adaptor3d_HCurve;
48DEFINE_STANDARD_HANDLE(Adaptor3d_HCurve, MMgt_TShared)
49
50//! Root class for 3D curves manipulated by handles, on
51//! which geometric algorithms work.
52//! An adapted curve is an interface between the
53//! services provided by a curve and those required of
54//! the curve by algorithms which use it.
55//! Two derived concrete classes are provided:
56//! - GeomAdaptor_HCurve for a curve from the Geom package
57//! - Adaptor3d_HCurveOnSurface for a curve lying
58//! on a surface from the Geom package.
59class Adaptor3d_HCurve : public MMgt_TShared
60{
61
62public:
63
64
65 //! Returns a pointer to the Curve inside the HCurve.
66 Standard_EXPORT virtual const Adaptor3d_Curve& Curve() const = 0;
67
68 //! Returns a pointer to the Curve inside the HCurve.
69 Standard_EXPORT virtual Adaptor3d_Curve& GetCurve() = 0;
70
71 Standard_Real FirstParameter() const;
72
73 Standard_Real LastParameter() const;
74
75 GeomAbs_Shape Continuity() const;
76
77 Standard_Integer NbIntervals (const GeomAbs_Shape S) const;
78
79 //! Stores in <T> the parameters bounding the intervals
80 //! of continuity <S>.
81 //!
82 //! The array must provide enough room to accomodate
83 //! for the parameters. i.e. T.Length() > NbIntervals()
84 void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const;
85
86 //! Returns a curve equivalent of <me> between
87 //! parameters <First> and <Last>. <Tol> is used to
88 //! test for 3d points confusion.
89 //!
90 //! If <First> >= <Last>
91 Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
92
93 Standard_Boolean IsClosed() const;
94
95 Standard_Boolean IsPeriodic() const;
96
97 Standard_Real Period() const;
98
99 gp_Pnt Value (const Standard_Real U) const;
100
101 void D0 (const Standard_Real U, gp_Pnt& P) const;
102
103 void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const;
104
105 void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const;
106
107 void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const;
108
109 gp_Vec DN (const Standard_Real U, const Standard_Integer N) const;
110
111 Standard_Real Resolution (const Standard_Real R3d) const;
112
113 GeomAbs_CurveType GetType() const;
114
115 gp_Lin Line() const;
116
117 gp_Circ Circle() const;
118
119 gp_Elips Ellipse() const;
120
121 gp_Hypr Hyperbola() const;
122
123 gp_Parab Parabola() const;
124
125 Standard_Integer Degree() const;
126
127 Standard_Boolean IsRational() const;
128
129 Standard_Integer NbPoles() const;
130
131 Standard_Integer NbKnots() const;
132
133 Handle(Geom_BezierCurve) Bezier() const;
134
135 Handle(Geom_BSplineCurve) BSpline() const;
136
137
138
139
92efcf78 140 DEFINE_STANDARD_RTTIEXT(Adaptor3d_HCurve,MMgt_TShared)
42cf5bc1 141
142protected:
143
144
145
146
147private:
148
149
150
151
152};
153
154
155#include <Adaptor3d_HCurve.lxx>
156
157
158
159
160
161#endif // _Adaptor3d_HCurve_HeaderFile