42cf5bc1 |
1 | // Created on: 1994-09-06 |
2 | // Created by: Yves FRICAUD |
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 _Geom2dLProp_CurAndInf2d_HeaderFile |
18 | #define _Geom2dLProp_CurAndInf2d_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Boolean.hxx> |
25 | #include <LProp_CurAndInf.hxx> |
26 | class Geom2d_Curve; |
27 | |
28 | |
29 | //! An algorithm for computing local properties of a curve. |
30 | //! These properties include: |
31 | //! - the maximum and minimum curvatures |
32 | //! - the inflection points. |
33 | //! A CurAndInf2d object provides the framework for: |
34 | //! - defining the curve to be analyzed |
35 | //! - implementing the computation algorithms |
36 | //! - consulting the results. |
37 | class Geom2dLProp_CurAndInf2d : public LProp_CurAndInf |
38 | { |
39 | public: |
40 | |
41 | DEFINE_STANDARD_ALLOC |
42 | |
43 | |
44 | //! Initializes the framework. |
45 | //! Note: The curve on which the local properties are |
46 | //! computed is defined using one of the following |
47 | //! functions: Perform, PerformCurExt or PerformInf. |
48 | Standard_EXPORT Geom2dLProp_CurAndInf2d(); |
49 | |
50 | //! For the curve C, Computes both the |
51 | //! inflection points and the maximum and minimum curvatures. |
52 | Standard_EXPORT void Perform (const Handle(Geom2d_Curve)& C); |
53 | |
54 | //! For the curve C, Computes the locals extremas of curvature. |
55 | Standard_EXPORT void PerformCurExt (const Handle(Geom2d_Curve)& C); |
56 | |
57 | //! For the curve C, Computes the inflections. |
58 | //! After computation, the following functions can be used: |
59 | //! - IsDone to check if the computation was successful |
60 | //! - NbPoints to obtain the number of computed particular points |
61 | //! - Parameter to obtain the parameter on the curve for |
62 | //! each particular point |
63 | //! - Type to check if the point is an inflection point or an |
64 | //! extremum of curvature of the curve C. |
65 | //! Warning |
66 | //! These functions can be used to analyze a series of |
67 | //! curves, however it is necessary to clear the table of |
68 | //! results between each computation. |
69 | Standard_EXPORT void PerformInf (const Handle(Geom2d_Curve)& C); |
70 | |
71 | //! True if the solutions are found. |
72 | Standard_EXPORT Standard_Boolean IsDone() const; |
73 | |
74 | |
75 | |
76 | |
77 | protected: |
78 | |
79 | |
80 | |
81 | |
82 | |
83 | private: |
84 | |
85 | |
86 | |
87 | Standard_Boolean isDone; |
88 | |
89 | |
90 | }; |
91 | |
92 | |
93 | |
94 | |
95 | |
96 | |
97 | |
98 | #endif // _Geom2dLProp_CurAndInf2d_HeaderFile |