0024784: Move documentation in CDL files to proper location
[occt.git] / src / GeomConvert / GeomConvert_BSplineCurveKnotSplitting.cdl
1 -- Created on: 1991-10-03
2 -- Copyright (c) 1991-1999 Matra Datavision
3 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
4 --
5 -- This file is part of Open CASCADE Technology software library.
6 --
7 -- This library is free software; you can redistribute it and/or modify it under
8 -- the terms of the GNU Lesser General Public License version 2.1 as published
9 -- by the Free Software Foundation, with special exception defined in the file
10 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 -- distribution for complete text of the license and disclaimer of any warranty.
12 --
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
15
16 class BSplineCurveKnotSplitting   from GeomConvert
17
18
19
20         --- Purpose : An algorithm to determine points at which a BSpline
21         -- curve should be split in order to obtain arcs of the same continuity.
22         -- If you require curves with a minimum continuity for
23         -- your computation, it is useful to know the points
24         -- between which an arc has a continuity of a given
25       -- order. The continuity order is given at the construction time.
26       -- For a BSpline curve, the discontinuities are
27         -- localized at the knot values. Between two knot values
28         -- the BSpline is infinitely and continuously
29         -- differentiable. At a given knot, the continuity is equal
30         -- to: Degree - Mult, where Degree is the
31         -- degree of the BSpline curve and Mult is the multiplicity of the knot.
32         -- It is possible to compute the arcs which correspond to
33         -- this splitting using the global function
34         -- SplitBSplineCurve provided by the package GeomConvert.
35         -- A BSplineCurveKnotSplitting object provides a framework for:
36         -- -   defining the curve to be analyzed and the
37         --   required degree of continuity,
38         -- -   implementing the computation algorithm, and
39         -- -   consulting the results.
40
41
42
43
44 uses  Array1OfInteger      from TColStd,
45       HArray1OfInteger      from TColStd,
46       BSplineCurve         from Geom
47
48
49 raises DimensionError from Standard, 
50        RangeError     from Standard
51   
52 is
53
54
55   Create (BasisCurve : BSplineCurve from Geom; ContinuityRange : Integer)
56      returns BSplineCurveKnotSplitting
57         --- Purpose : Determines points at which the BSpline curve
58         -- BasisCurve should be split in order to obtain arcs
59         -- with a degree of continuity equal to ContinuityRange.
60         -- These points are knot values of BasisCurve. They
61         -- are identified by indices in the knots table of BasisCurve.
62         -- Use the available interrogation functions to access
63         -- computed values, followed by the global function
64         -- SplitBSplineCurve (provided by the package GeomConvert) to split the curve.
65         -- Exceptions
66         -- Standard_RangeError if ContinuityRange is less than zero.
67            raises RangeError;
68       
69
70   
71   NbSplits (me)    returns Integer   is static;
72         --- Purpose :Returns the number of points at which the analyzed
73         -- BSpline curve should be split, in order to obtain arcs
74         -- with the continuity required by this framework.
75         -- All these points correspond to knot values. Note that
76         -- the first and last points of the curve, which bound the
77         -- first and last arcs, are counted among these splitting points.
78
79
80   Splitting (me; SplitValues : in out Array1OfInteger)
81         --- Purpose : Loads the SplitValues table with the split knots
82         -- values computed in this framework. Each value in the
83         -- table is an index in the knots table of the BSpline
84         -- curve analyzed by this algorithm.
85         -- The values in SplitValues are given in ascending
86         -- order and comprise the indices of the knots which
87         -- give the first and last points of the curve. Use two
88         -- consecutive values from the table as arguments of the
89         -- global function SplitBSplineCurve (provided by the
90         -- package GeomConvert) to split the curve.
91         -- Exceptions
92         -- Standard_DimensionError if the array SplitValues
93         -- was not created with the following bounds:
94         -- -   1, and
95         -- -   the number of split points computed in this
96         --   framework (as given by the function NbSplits).
97      raises DimensionError
98             is static;
99
100
101   SplitValue (me; Index : Integer)   returns Integer
102         --- Purpose : Returns the split knot of index Index to the split knots
103         -- table computed in this framework. The returned value
104         -- is an index in the knots table of the BSpline curve
105         -- analyzed by this algorithm.
106         -- Notes:
107         -- -   If Index is equal to 1, the corresponding knot
108         --   gives the first point of the curve.
109         -- -   If Index is equal to the number of split knots
110         --   computed in this framework, the corresponding
111         --   point is the last point of the curve.
112         -- Exceptions
113         -- Standard_RangeError if Index is less than 1 or
114         -- greater than the number of split knots computed in this framework.
115      raises RangeError
116     is static;
117
118
119               
120 fields  
121
122   splitIndexes : HArray1OfInteger;
123
124 end BSplineCurveKnotSplitting;
125