1 -- Created on: 1997-01-17
2 -- Created by: Philippe MANGIN
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 class BSplineKnotSplitting from Law
26 -- For a B-spline curve the discontinuities are localised at the
27 -- knot values and between two knots values the B-spline is
28 -- infinitely continuously differentiable.
29 -- At a knot of range index the continuity is equal to :
30 -- Degree - Mult (Index) where Degree is the degree of the
31 -- basis B-spline functions and Mult the multiplicity of the knot
33 -- If for your computation you need to have B-spline curves with a
34 -- minima of continuity it can be interesting to know between which
35 -- knot values, a B-spline curve arc, has a continuity of given order.
36 -- This algorithm computes the indexes of the knots where you should
37 -- split the curve, to obtain arcs with a constant continuity given
38 -- at the construction time. The splitting values are in the range
39 -- [FirstUKnotValue, LastUKnotValue] (See class B-spline curve from
41 -- If you just want to compute the local derivatives on the curve you
42 -- don't need to create the B-spline curve arcs, you can use the
43 -- functions LocalD1, LocalD2, LocalD3, LocalDN of the class
46 --- KeyWords : BSpline, Knot Splitting, Continuity
47 --- See Also : File BSpline from package Law
49 -- Gerald Farin Curves and Surfaces for Computer Aided Geometric
53 uses Array1OfInteger from TColStd,
54 HArray1OfInteger from TColStd,
57 raises DimensionError from Standard,
58 RangeError from Standard
62 Create (BasisLaw : BSpline from Law; ContinuityRange : Integer)
63 returns BSplineKnotSplitting
65 -- Locates the knot values which correspond to the segmentation of
66 -- the curve into arcs with a continuity equal to ContinuityRange.
69 -- Raised if ContinuityRange is not greater or equal zero.
72 NbSplits (me) returns Integer is static;
74 -- Returns the number of knots corresponding to the splitting.
77 Splitting (me; SplitValues : in out Array1OfInteger)
79 -- Returns the indexes of the BSpline curve knots corresponding to
83 -- Raised if the length of SplitValues is not equal to NbSPlit.
87 SplitValue (me; Index : Integer) returns Integer
89 -- Returns the index of the knot corresponding to the splitting
93 -- Raised if Index < 1 or Index > NbSplits
100 splitIndexes : HArray1OfInteger;
102 end BSplineKnotSplitting;