Warnings on vc14 were eliminated
[occt.git] / src / GeomLProp / GeomLProp_CLProps.hxx
CommitLineData
42cf5bc1 1// Created on: 1992-03-26
2// Created by: Herve LEGRAND
3// Copyright (c) 1992-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 _GeomLProp_CLProps_HeaderFile
18#define _GeomLProp_CLProps_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Real.hxx>
25#include <Standard_Integer.hxx>
26#include <gp_Pnt.hxx>
27#include <gp_Vec.hxx>
28#include <gp_Dir.hxx>
29#include <LProp_Status.hxx>
30#include <Standard_Boolean.hxx>
31class Geom_Curve;
32class LProp_BadContinuity;
33class Standard_DomainError;
34class Standard_OutOfRange;
35class LProp_NotDefined;
36class gp_Vec;
37class gp_Pnt;
38class gp_Dir;
39class GeomLProp_CurveTool;
40
41
42
43class GeomLProp_CLProps
44{
45public:
46
47 DEFINE_STANDARD_ALLOC
48
49
36b9ff75 50 //! Initializes the local properties of the curve <C>
51 //! The current point and the derivatives are
52 //! computed at the same time, which allows an
53 //! optimization of the computation time.
54 //! <N> indicates the maximum number of derivations to
55 //! be done (0, 1, 2 or 3). For example, to compute
56 //! only the tangent, N should be equal to 1.
57 //! <Resolution> is the linear tolerance (it is used to test
58 //! if a vector is null).
42cf5bc1 59 Standard_EXPORT GeomLProp_CLProps(const Handle(Geom_Curve)& C, const Standard_Integer N, const Standard_Real Resolution);
60
36b9ff75 61 //! Same as previous constructor but here the parameter is
62 //! set to the value <U>.
63 //! All the computations done will be related to <C> and <U>.
42cf5bc1 64 Standard_EXPORT GeomLProp_CLProps(const Handle(Geom_Curve)& C, const Standard_Real U, const Standard_Integer N, const Standard_Real Resolution);
65
36b9ff75 66 //! Same as previous constructor but here the parameter is
67 //! set to the value <U> and the curve is set
68 //! with SetCurve.
69 //! the curve can have a empty constructor
70 //! All the computations done will be related to <C> and <U>
71 //! when the functions "set" will be done.
42cf5bc1 72 Standard_EXPORT GeomLProp_CLProps(const Standard_Integer N, const Standard_Real Resolution);
73
36b9ff75 74 //! Initializes the local properties of the curve
75 //! for the parameter value <U>.
42cf5bc1 76 Standard_EXPORT void SetParameter (const Standard_Real U);
77
36b9ff75 78 //! Initializes the local properties of the curve
79 //! for the new curve.
42cf5bc1 80 Standard_EXPORT void SetCurve (const Handle(Geom_Curve)& C);
81
36b9ff75 82 //! Returns the Point.
42cf5bc1 83 Standard_EXPORT const gp_Pnt& Value() const;
84
36b9ff75 85 //! Returns the first derivative.
86 //! The derivative is computed if it has not been yet.
42cf5bc1 87 Standard_EXPORT const gp_Vec& D1();
88
36b9ff75 89 //! Returns the second derivative.
90 //! The derivative is computed if it has not been yet.
42cf5bc1 91 Standard_EXPORT const gp_Vec& D2();
92
36b9ff75 93 //! Returns the third derivative.
94 //! The derivative is computed if it has not been yet.
42cf5bc1 95 Standard_EXPORT const gp_Vec& D3();
96
36b9ff75 97 //! Returns True if the tangent is defined.
98 //! For example, the tangent is not defined if the
99 //! three first derivatives are all null.
42cf5bc1 100 Standard_EXPORT Standard_Boolean IsTangentDefined();
101
36b9ff75 102 //! output the tangent direction <D>
42cf5bc1 103 Standard_EXPORT void Tangent (gp_Dir& D);
104
36b9ff75 105 //! Returns the curvature.
42cf5bc1 106 Standard_EXPORT Standard_Real Curvature();
107
36b9ff75 108 //! Returns the normal direction <N>.
42cf5bc1 109 Standard_EXPORT void Normal (gp_Dir& N);
110
36b9ff75 111 //! Returns the centre of curvature <P>.
42cf5bc1 112 Standard_EXPORT void CentreOfCurvature (gp_Pnt& P);
113
114
115
116
117protected:
118
119
120
121
122
123private:
124
125
126
127 Handle(Geom_Curve) myCurve;
128 Standard_Real myU;
129 Standard_Integer myDerOrder;
130 Standard_Real myCN;
131 Standard_Real myLinTol;
132 gp_Pnt myPnt;
133 gp_Vec myDerivArr[3];
134 gp_Dir myTangent;
135 Standard_Real myCurvature;
136 LProp_Status myTangentStatus;
137 Standard_Integer mySignificantFirstDerivativeOrder;
138
139
140};
141
142
143
144
145
146
147
148#endif // _GeomLProp_CLProps_HeaderFile