0030675: Visualization - remove redundant proxy classes in hierarchy of PrsMgr_Presen...
[occt.git] / src / Extrema / Extrema_CurveTool.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-07-18
2// Created by: Modelistation
3// Copyright (c) 1995-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 _Extrema_CurveTool_HeaderFile
18#define _Extrema_CurveTool_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Real.hxx>
25#include <GeomAbs_Shape.hxx>
26#include <Standard_Integer.hxx>
27#include <TColStd_Array1OfReal.hxx>
f6b08ecf 28#include <TColStd_HArray1OfReal.hxx>
42cf5bc1 29#include <Standard_Boolean.hxx>
30#include <GeomAbs_CurveType.hxx>
31#include <gp_Pnt.hxx>
32#include <gp_Vec.hxx>
33#include <gp_Lin.hxx>
34#include <gp_Circ.hxx>
35#include <gp_Elips.hxx>
36#include <gp_Hypr.hxx>
37#include <gp_Parab.hxx>
38class Adaptor3d_Curve;
39class gp_Pnt;
40class gp_Vec;
41class Geom_BezierCurve;
42class Geom_BSplineCurve;
43
44
45
46class Extrema_CurveTool
47{
48public:
49
50 DEFINE_STANDARD_ALLOC
51
52
53 static Standard_Real FirstParameter (const Adaptor3d_Curve& C);
54
55 static Standard_Real LastParameter (const Adaptor3d_Curve& C);
56
57 static GeomAbs_Shape Continuity (const Adaptor3d_Curve& C);
58
59 //! Returns the number of intervals for continuity
60 //! <S>. May be one if Continuity(me) >= <S>
61 static Standard_Integer NbIntervals (Adaptor3d_Curve& C, const GeomAbs_Shape S);
62
63 //! Stores in <T> the parameters bounding the intervals
64 //! of continuity <S>.
65 //!
66 //! The array must provide enough room to accomodate
67 //! for the parameters. i.e. T.Length() > NbIntervals()
68 static void Intervals (Adaptor3d_Curve& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S);
f6b08ecf 69
70 //! Returns the parameters bounding the intervals of subdivision of curve
71 //! according to Curvature deflection. Value of deflection is defined in method.
72 //!
73 Standard_EXPORT static Handle(TColStd_HArray1OfReal) DeflCurvIntervals(const Adaptor3d_Curve& C);
74
75 Standard_EXPORT static Standard_Boolean IsPeriodic (const Adaptor3d_Curve& C);
42cf5bc1 76
77 static Standard_Real Period (const Adaptor3d_Curve& C);
78
79 static Standard_Real Resolution (const Adaptor3d_Curve& C, const Standard_Real R3d);
80
81 static GeomAbs_CurveType GetType (const Adaptor3d_Curve& C);
82
83 static gp_Pnt Value (const Adaptor3d_Curve& C, const Standard_Real U);
84
85 static void D0 (const Adaptor3d_Curve& C, const Standard_Real U, gp_Pnt& P);
86
87 static void D1 (const Adaptor3d_Curve& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V);
88
89 static void D2 (const Adaptor3d_Curve& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
90
91 static void D3 (const Adaptor3d_Curve& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
92
93 static gp_Vec DN (const Adaptor3d_Curve& C, const Standard_Real U, const Standard_Integer N);
94
95 static gp_Lin Line (const Adaptor3d_Curve& C);
96
97 static gp_Circ Circle (const Adaptor3d_Curve& C);
98
99 static gp_Elips Ellipse (const Adaptor3d_Curve& C);
100
101 static gp_Hypr Hyperbola (const Adaptor3d_Curve& C);
102
103 static gp_Parab Parabola (const Adaptor3d_Curve& C);
104
105 static Standard_Integer Degree (const Adaptor3d_Curve& C);
106
107 static Standard_Boolean IsRational (const Adaptor3d_Curve& C);
108
109 static Standard_Integer NbPoles (const Adaptor3d_Curve& C);
110
111 static Standard_Integer NbKnots (const Adaptor3d_Curve& C);
112
113 static Handle(Geom_BezierCurve) Bezier (const Adaptor3d_Curve& C);
114
115 static Handle(Geom_BSplineCurve) BSpline (const Adaptor3d_Curve& C);
116
117
118
119
120protected:
121
122
123
124
125
126private:
127
128
129
130
131
132};
133
134
135#include <Extrema_CurveTool.lxx>
136
137
138
139
140
141#endif // _Extrema_CurveTool_HeaderFile