|
||||
File indexing completed on 2024-11-15 09:46:46
0001 // Created on: 1991-10-04 0002 // Copyright (c) 1991-1999 Matra Datavision 0003 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef _GeomConvert_BSplineSurfaceKnotSplitting_HeaderFile 0017 #define _GeomConvert_BSplineSurfaceKnotSplitting_HeaderFile 0018 0019 #include <Standard.hxx> 0020 #include <Standard_DefineAlloc.hxx> 0021 #include <Standard_Handle.hxx> 0022 0023 #include <TColStd_HArray1OfInteger.hxx> 0024 #include <Standard_Integer.hxx> 0025 #include <TColStd_Array1OfInteger.hxx> 0026 class Geom_BSplineSurface; 0027 0028 0029 //! An algorithm to determine isoparametric curves along 0030 //! which a BSpline surface should be split in order to 0031 //! obtain patches of the same continuity. The continuity order is given at the 0032 //! construction time. It is possible to compute the surface patches 0033 //! corresponding to the splitting with the method of package 0034 //! SplitBSplineSurface. 0035 //! For a B-spline surface the discontinuities are localised at 0036 //! the knot values. Between two knots values the B-spline is 0037 //! infinitely continuously differentiable. For each parametric 0038 //! direction at a knot of range index the continuity in this 0039 //! direction is equal to : Degree - Mult (Index) where Degree 0040 //! is the degree of the basis B-spline functions and Mult the 0041 //! multiplicity of the knot of range Index in the given direction. 0042 //! If for your computation you need to have B-spline surface with a 0043 //! minima of continuity it can be interesting to know between which 0044 //! knot values, a B-spline patch, has a continuity of given order. 0045 //! This algorithm computes the indexes of the knots where you should 0046 //! split the surface, to obtain patches with a constant continuity 0047 //! given at the construction time. If you just want to compute the 0048 //! local derivatives on the surface you don't need to create the 0049 //! BSpline patches, you can use the functions LocalD1, LocalD2, 0050 //! LocalD3, LocalDN of the class BSplineSurface from package Geom. 0051 class GeomConvert_BSplineSurfaceKnotSplitting 0052 { 0053 public: 0054 0055 DEFINE_STANDARD_ALLOC 0056 0057 0058 //! Determines the u- and v-isoparametric curves 0059 //! along which the BSpline surface BasisSurface 0060 //! should be split in order to obtain patches with a 0061 //! degree of continuity equal to UContinuityRange in 0062 //! the u parametric direction, and to 0063 //! VContinuityRange in the v parametric direction. 0064 //! These isoparametric curves are defined by 0065 //! parameters, which are BasisSurface knot values in 0066 //! the u or v parametric direction. They are identified 0067 //! by indices in the BasisSurface knots table in the 0068 //! corresponding parametric direction. 0069 //! Use the available interrogation functions to access 0070 //! computed values, followed by the global function 0071 //! SplitBSplineSurface (provided by the package 0072 //! GeomConvert) to split the surface. 0073 //! Exceptions 0074 //! Standard_RangeError if UContinuityRange or 0075 //! VContinuityRange is less than zero. 0076 Standard_EXPORT GeomConvert_BSplineSurfaceKnotSplitting(const Handle(Geom_BSplineSurface)& BasisSurface, const Standard_Integer UContinuityRange, const Standard_Integer VContinuityRange); 0077 0078 //! Returns the number of u-isoparametric curves 0079 //! along which the analysed BSpline surface should be 0080 //! split in order to obtain patches with the continuity 0081 //! required by this framework. 0082 //! The parameters which define these curves are knot 0083 //! values in the corresponding parametric direction. 0084 //! Note that the four curves which bound the surface are 0085 //! counted among these splitting curves. 0086 Standard_EXPORT Standard_Integer NbUSplits() const; 0087 0088 //! Returns the number of v-isoparametric curves 0089 //! along which the analysed BSpline surface should be 0090 //! split in order to obtain patches with the continuity 0091 //! required by this framework. 0092 //! The parameters which define these curves are knot 0093 //! values in the corresponding parametric direction. 0094 //! Note that the four curves which bound the surface are 0095 //! counted among these splitting curves. 0096 Standard_EXPORT Standard_Integer NbVSplits() const; 0097 0098 //! Loads the USplit and VSplit tables with the split 0099 //! knots values computed in this framework. Each value 0100 //! in these tables is an index in the knots table 0101 //! corresponding to the u or v parametric direction of 0102 //! the BSpline surface analysed by this algorithm. 0103 //! The USplit and VSplit values are given in ascending 0104 //! order and comprise the indices of the knots which 0105 //! give the first and last isoparametric curves of the 0106 //! surface in the corresponding parametric direction. 0107 //! Use two consecutive values from the USplit table and 0108 //! two consecutive values from the VSplit table as 0109 //! arguments of the global function 0110 //! SplitBSplineSurface (provided by the package 0111 //! GeomConvert) to split the surface. 0112 //! Exceptions 0113 //! Standard_DimensionError if: 0114 //! - the array USplit was not created with the following bounds: 0115 //! - 1 , and 0116 //! - the number of split knots in the u parametric 0117 //! direction computed in this framework (as given 0118 //! by the function NbUSplits); or 0119 //! - the array VSplit was not created with the following bounds: 0120 //! - 1 , and 0121 //! - the number of split knots in the v parametric 0122 //! direction computed in this framework (as given 0123 //! by the function NbVSplits). 0124 Standard_EXPORT void Splitting (TColStd_Array1OfInteger& USplit, TColStd_Array1OfInteger& VSplit) const; 0125 0126 //! Returns the split knot of index UIndex 0127 //! to the split knots table for the u parametric direction 0128 //! computed in this framework. The returned value is 0129 //! an index in the knots table relative to the u 0130 //! parametric direction of the BSpline surface analysed by this algorithm. 0131 //! Note: If UIndex is equal to 1, or to the number of split knots for the u 0132 //! parametric direction computed in 0133 //! this framework, the corresponding knot gives the 0134 //! parameter of one of the bounding curves of the surface. 0135 //! Exceptions 0136 //! Standard_RangeError if UIndex is less than 1 or greater than the number 0137 //! of split knots for the u parametric direction computed in this framework. 0138 Standard_EXPORT Standard_Integer USplitValue (const Standard_Integer UIndex) const; 0139 0140 //! Returns the split knot of index VIndex 0141 //! to the split knots table for the v parametric direction 0142 //! computed in this framework. The returned value is 0143 //! an index in the knots table relative to the v 0144 //! parametric direction of the BSpline surface analysed by this algorithm. 0145 //! Note: If UIndex is equal to 1, or to the number of split knots for the v 0146 //! parametric direction computed in 0147 //! this framework, the corresponding knot gives the 0148 //! parameter of one of the bounding curves of the surface. 0149 //! Exceptions 0150 //! Standard_RangeError if VIndex is less than 1 or greater than the number 0151 //! of split knots for the v parametric direction computed in this framework. 0152 Standard_EXPORT Standard_Integer VSplitValue (const Standard_Integer VIndex) const; 0153 0154 0155 0156 0157 protected: 0158 0159 0160 0161 0162 0163 private: 0164 0165 0166 0167 Handle(TColStd_HArray1OfInteger) usplitIndexes; 0168 Handle(TColStd_HArray1OfInteger) vsplitIndexes; 0169 0170 0171 }; 0172 0173 0174 0175 0176 0177 0178 0179 #endif // _GeomConvert_BSplineSurfaceKnotSplitting_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |