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 _Geom2dLProp_CLProps2d_HeaderFile |
18 | #define _Geom2dLProp_CLProps2d_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_Pnt2d.hxx> |
27 | #include <gp_Vec2d.hxx> |
28 | #include <gp_Dir2d.hxx> |
29 | #include <LProp_Status.hxx> |
30 | #include <Standard_Boolean.hxx> |
31 | class Geom2d_Curve; |
32 | class LProp_BadContinuity; |
33 | class Standard_DomainError; |
34 | class Standard_OutOfRange; |
35 | class LProp_NotDefined; |
36 | class gp_Vec2d; |
37 | class gp_Pnt2d; |
38 | class gp_Dir2d; |
39 | class Geom2dLProp_Curve2dTool; |
40 | |
41 | |
42 | |
43 | class Geom2dLProp_CLProps2d |
44 | { |
45 | public: |
46 | |
47 | DEFINE_STANDARD_ALLOC |
48 | |
49 | |
50 | Standard_EXPORT Geom2dLProp_CLProps2d(const Handle(Geom2d_Curve)& C, const Standard_Integer N, const Standard_Real Resolution); |
51 | |
52 | Standard_EXPORT Geom2dLProp_CLProps2d(const Handle(Geom2d_Curve)& C, const Standard_Real U, const Standard_Integer N, const Standard_Real Resolution); |
53 | |
54 | Standard_EXPORT Geom2dLProp_CLProps2d(const Standard_Integer N, const Standard_Real Resolution); |
55 | |
56 | Standard_EXPORT void SetParameter (const Standard_Real U); |
57 | |
58 | Standard_EXPORT void SetCurve (const Handle(Geom2d_Curve)& C); |
59 | |
60 | Standard_EXPORT const gp_Pnt2d& Value() const; |
61 | |
62 | Standard_EXPORT const gp_Vec2d& D1(); |
63 | |
64 | Standard_EXPORT const gp_Vec2d& D2(); |
65 | |
66 | Standard_EXPORT const gp_Vec2d& D3(); |
67 | |
68 | Standard_EXPORT Standard_Boolean IsTangentDefined(); |
69 | |
70 | Standard_EXPORT void Tangent (gp_Dir2d& D); |
71 | |
72 | Standard_EXPORT Standard_Real Curvature(); |
73 | |
74 | Standard_EXPORT void Normal (gp_Dir2d& N); |
75 | |
76 | Standard_EXPORT void CentreOfCurvature (gp_Pnt2d& P); |
77 | |
78 | |
79 | |
80 | |
81 | protected: |
82 | |
83 | |
84 | |
85 | |
86 | |
87 | private: |
88 | |
89 | |
90 | |
91 | Handle(Geom2d_Curve) myCurve; |
92 | Standard_Real myU; |
93 | Standard_Integer myDerOrder; |
94 | Standard_Real myCN; |
95 | Standard_Real myLinTol; |
96 | gp_Pnt2d myPnt; |
97 | gp_Vec2d myDerivArr[3]; |
98 | gp_Dir2d myTangent; |
99 | Standard_Real myCurvature; |
100 | LProp_Status myTangentStatus; |
101 | Standard_Integer mySignificantFirstDerivativeOrder; |
102 | |
103 | |
104 | }; |
105 | |
106 | |
107 | |
108 | |
109 | |
110 | |
111 | |
112 | #endif // _Geom2dLProp_CLProps2d_HeaderFile |