|
|
|||
File indexing completed on 2026-09-28 09:20:46
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 <Standard_Integer.hxx> 0025 #include <NCollection_Array1.hxx> 0026 #include <NCollection_HArray1.hxx> 0027 class Law_BSpline; 0028 0029 //! For a B-spline curve the discontinuities are localised at the 0030 //! knot values and between two knots values the B-spline is 0031 //! infinitely continuously differentiable. 0032 //! At a knot of range index the continuity is equal to: 0033 //! Degree - Mult (Index) where Degree is the degree of the 0034 //! basis B-spline functions and Mult the multiplicity of the knot 0035 //! of range Index. 0036 //! If for your computation you need to have B-spline curves with a 0037 //! minima of continuity it can be interesting to know between which 0038 //! knot values, a B-spline curve arc, has a continuity of given order. 0039 //! This algorithm computes the indexes of the knots where you should 0040 //! split the curve, to obtain arcs with a constant continuity given 0041 //! at the construction time. The splitting values are in the range 0042 //! [FirstUKnotValue, LastUKnotValue] (See class B-spline curve from 0043 //! package Geom). 0044 //! If you just want to compute the local derivatives on the curve you 0045 //! don't need to create the B-spline curve arcs, you can use the 0046 //! functions LocalD1, LocalD2, LocalD3, LocalDN of the class 0047 //! BSplineCurve. 0048 class Law_BSplineKnotSplitting 0049 { 0050 public: 0051 DEFINE_STANDARD_ALLOC 0052 0053 //! Locates the knot values which correspond to the segmentation of 0054 //! the curve into arcs with a continuity equal to ContinuityRange. 0055 //! 0056 //! Raised if ContinuityRange is not greater or equal zero. 0057 Standard_EXPORT Law_BSplineKnotSplitting(const occ::handle<Law_BSpline>& BasisLaw, 0058 const int ContinuityRange); 0059 0060 //! Returns the number of knots corresponding to the splitting. 0061 Standard_EXPORT int NbSplits() const; 0062 0063 //! Returns the indexes of the BSpline curve knots corresponding to 0064 //! the splitting. 0065 //! 0066 //! Raised if the length of SplitValues is not equal to NbSPlit. 0067 Standard_EXPORT void Splitting(NCollection_Array1<int>& SplitValues) const; 0068 0069 //! Returns the index of the knot corresponding to the splitting 0070 //! of range Index. 0071 //! 0072 //! Raised if Index < 1 or Index > NbSplits 0073 Standard_EXPORT int SplitValue(const int Index) const; 0074 0075 private: 0076 occ::handle<NCollection_HArray1<int>> splitIndexes; 0077 }; 0078 0079 #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 |
|