Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-28 09:20:13

0001 // Created on: 1994-09-06
0002 // Created by: Yves FRICAUD
0003 // Copyright (c) 1994-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _GeomLProp_CurAndInf2d_HeaderFile
0018 #define _GeomLProp_CurAndInf2d_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <LProp_CurAndInf.hxx>
0025 class Geom2d_Curve;
0026 
0027 //! An algorithm for computing local properties of a curve.
0028 //! These properties include:
0029 //! - the maximum and minimum curvatures
0030 //! - the inflection points.
0031 //! A CurAndInf2d object provides the framework for:
0032 //! - defining the curve to be analyzed
0033 //! - implementing the computation algorithms
0034 //! - consulting the results.
0035 class GeomLProp_CurAndInf2d : public LProp_CurAndInf
0036 {
0037 public:
0038   DEFINE_STANDARD_ALLOC
0039 
0040   //! Initializes the framework.
0041   //! Note: The curve on which the local properties are
0042   //! computed is defined using one of the following
0043   //! functions: Perform, PerformCurExt or PerformInf.
0044   Standard_EXPORT GeomLProp_CurAndInf2d();
0045 
0046   //! For the curve C, Computes both the
0047   //! inflection points and the maximum and minimum curvatures.
0048   Standard_EXPORT void Perform(const occ::handle<Geom2d_Curve>& C);
0049 
0050   //! For the curve C, Computes the locals extremas of curvature.
0051   Standard_EXPORT void PerformCurExt(const occ::handle<Geom2d_Curve>& C);
0052 
0053   //! For the curve C, Computes the inflections.
0054   //! After computation, the following functions can be used:
0055   //! - IsDone to check if the computation was successful
0056   //! - NbPoints to obtain the number of computed particular points
0057   //! - Parameter to obtain the parameter on the curve for
0058   //! each particular point
0059   //! - Type to check if the point is an inflection point or an
0060   //! extremum of curvature of the curve C.
0061   //! Warning
0062   //! These functions can be used to analyze a series of
0063   //! curves, however it is necessary to clear the table of
0064   //! results between each computation.
0065   Standard_EXPORT void PerformInf(const occ::handle<Geom2d_Curve>& C);
0066 
0067   //! True if the solutions are found.
0068   Standard_EXPORT bool IsDone() const;
0069 
0070 private:
0071   //! Internal implementation of curvature extrema computation (no Clear).
0072   void performCurExt(const occ::handle<Geom2d_Curve>& theCurve);
0073 
0074   //! Internal implementation of inflection computation (no Clear).
0075   void performInf(const occ::handle<Geom2d_Curve>& theCurve);
0076 
0077   bool myIsDone;
0078 };
0079 
0080 #endif // _GeomLProp_CurAndInf2d_HeaderFile