0024784: Move documentation in CDL files to proper location
[occt.git] / src / Geom2dConvert / Geom2dConvert_BSplineCurveKnotSplitting.cdl
CommitLineData
b311480e 1-- Created on: 1991-10-03
2-- Copyright (c) 1991-1999 Matra Datavision
973c2be1 3-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 4--
973c2be1 5-- This file is part of Open CASCADE Technology software library.
b311480e 6--
d5f74e42 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
973c2be1 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.
b311480e 12--
973c2be1 13-- Alternatively, this file may be used under the terms of Open CASCADE
14-- commercial license or contractual agreement.
7fd59977 15
16class BSplineCurveKnotSplitting from Geom2dConvert
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
ff8178ef 25 -- order. The continuity order is given at the construction time.
26 -- For a BSpline curve, the discontinuities are
7fd59977 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 Geom2dConvert.
35 -- A BSplineCurveKnotSplitting object provides a framework for:
36 -- - defining the curve to be analysed and the required degree of continuity,
37 -- - implementing the computation algorithm, and
38 -- - consulting the results.
39
40uses Array1OfInteger from TColStd,
41 HArray1OfInteger from TColStd,
42 BSplineCurve from Geom2d
43
44raises DimensionError from Standard,
45 RangeError from Standard
46
47is
48
49
50 Create (BasisCurve : BSplineCurve from Geom2d; ContinuityRange : Integer)
51 returns BSplineCurveKnotSplitting
52 --- Purpose : Determines points at which the BSpline curve
53 -- BasisCurve should be split in order to obtain arcs
54 -- with a degree of continuity equal to ContinuityRange.
55 -- These points are knot values of BasisCurve. They
56 -- are identified by indices in the knots table of BasisCurve.
57 -- Use the available interrogation functions to access
58 -- computed values, followed by the global function
59 -- SplitBSplineCurve (provided by the package
60 -- Geom2dConvert) to split the curve.
61 -- Exceptions
62 -- Standard_RangeError if ContinuityRange is less than zero.
63 raises RangeError;
64
65
66 NbSplits (me) returns Integer is static;
67 --- Purpose :Returns the number of points at which the analysed
68 -- BSpline curve should be split, in order to obtain arcs
69 -- with the continuity required by this framework.
70 -- All these points correspond to knot values. Note that
71 -- the first and last points of the curve, which bound the
72 -- first and last arcs, are counted among these splitting points.
73
74
75 Splitting (me; SplitValues : in out Array1OfInteger)
76 --- Purpose : Loads the SplitValues table with the split knots
77 -- values computed in this framework. Each value in the
78 -- table is an index in the knots table of the BSpline
79 -- curve analysed by this algorithm.
80 -- The values in SplitValues are given in ascending
81 -- order and comprise the indices of the knots which
82 -- give the first and last points of the curve. Use two
83 -- consecutive values from the table as arguments of the
84 -- global function SplitBSplineCurve (provided by the
85 -- package Geom2dConvert) to split the curve.
86 -- Exceptions
87 -- Standard_DimensionError if the array SplitValues
88 -- was not created with the following bounds:
89 -- - 1, and
90 -- - the number of split points computed in this
91 -- framework (as given by the function NbSplits).
92 raises DimensionError
93 is static;
94
95
96 SplitValue (me; Index : Integer) returns Integer
97 --- Purpose :Returns the split knot of index Index to the split knots
98 -- table computed in this framework. The returned value
99 -- is an index in the knots table of the BSpline curve
100 -- analysed by this algorithm.
101 -- Notes:
102 -- - If Index is equal to 1, the corresponding knot
103 -- gives the first point of the curve.
104 -- - If Index is equal to the number of split knots
105 -- computed in this framework, the corresponding
106 -- point is the last point of the curve.
107 -- Exceptions
108 -- Standard_RangeError if Index is less than 1 or
109 -- greater than the number of split knots computed in this framework.
110 raises RangeError
111 is static;
112
113
114
115fields
116
117 splitIndexes : HArray1OfInteger;
118
119end BSplineCurveKnotSplitting;
120