|
||||
File indexing completed on 2025-01-18 10:04:12
0001 // Created on: 1997-01-17 0002 // Created by: Philippe MANGIN 0003 // Copyright (c) 1997-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 _Law_BSplineKnotSplitting_HeaderFile 0018 #define _Law_BSplineKnotSplitting_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <TColStd_HArray1OfInteger.hxx> 0025 #include <Standard_Integer.hxx> 0026 #include <TColStd_Array1OfInteger.hxx> 0027 class Law_BSpline; 0028 0029 0030 0031 //! For a B-spline curve the discontinuities are localised at the 0032 //! knot values and between two knots values the B-spline is 0033 //! infinitely continuously differentiable. 0034 //! At a knot of range index the continuity is equal to : 0035 //! Degree - Mult (Index) where Degree is the degree of the 0036 //! basis B-spline functions and Mult the multiplicity of the knot 0037 //! of range Index. 0038 //! If for your computation you need to have B-spline curves with a 0039 //! minima of continuity it can be interesting to know between which 0040 //! knot values, a B-spline curve arc, has a continuity of given order. 0041 //! This algorithm computes the indexes of the knots where you should 0042 //! split the curve, to obtain arcs with a constant continuity given 0043 //! at the construction time. The splitting values are in the range 0044 //! [FirstUKnotValue, LastUKnotValue] (See class B-spline curve from 0045 //! package Geom). 0046 //! If you just want to compute the local derivatives on the curve you 0047 //! don't need to create the B-spline curve arcs, you can use the 0048 //! functions LocalD1, LocalD2, LocalD3, LocalDN of the class 0049 //! BSplineCurve. 0050 class Law_BSplineKnotSplitting 0051 { 0052 public: 0053 0054 DEFINE_STANDARD_ALLOC 0055 0056 0057 0058 //! Locates the knot values which correspond to the segmentation of 0059 //! the curve into arcs with a continuity equal to ContinuityRange. 0060 //! 0061 //! Raised if ContinuityRange is not greater or equal zero. 0062 Standard_EXPORT Law_BSplineKnotSplitting(const Handle(Law_BSpline)& BasisLaw, const Standard_Integer ContinuityRange); 0063 0064 0065 //! Returns the number of knots corresponding to the splitting. 0066 Standard_EXPORT Standard_Integer NbSplits() const; 0067 0068 0069 //! Returns the indexes of the BSpline curve knots corresponding to 0070 //! the splitting. 0071 //! 0072 //! Raised if the length of SplitValues is not equal to NbSPlit. 0073 Standard_EXPORT void Splitting (TColStd_Array1OfInteger& SplitValues) const; 0074 0075 0076 //! Returns the index of the knot corresponding to the splitting 0077 //! of range Index. 0078 //! 0079 //! Raised if Index < 1 or Index > NbSplits 0080 Standard_EXPORT Standard_Integer SplitValue (const Standard_Integer Index) const; 0081 0082 0083 0084 0085 protected: 0086 0087 0088 0089 0090 0091 private: 0092 0093 0094 0095 Handle(TColStd_HArray1OfInteger) splitIndexes; 0096 0097 0098 }; 0099 0100 0101 0102 0103 0104 0105 0106 #endif // _Law_BSplineKnotSplitting_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |