1 -- Created on: 1993-09-20
2 -- Created by: Modelistation
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class MultiBSpCurve from AppParCurves
18 inherits MultiCurve from AppParCurves
20 ---Purpose: This class describes a MultiBSpCurve approximating a Multiline.
21 -- Just as a Multiline is a set of a given number of lines, a MultiBSpCurve is a set
22 -- of a specified number of bsplines defined by:
23 -- - A specified number of MultiPoints - the poles of a specified number of curves
24 -- - The degree of approximation identical for each of the specified number of curves.
27 -- Example of a MultiBSpCurve composed of a specified number of MultiPoints:
29 -- P1______P2_____P3______P4________........_____PNbMPoints
31 -- Q1______Q2_____Q3______Q4________........_____QNbMPoints
35 -- R1______R2_____R3______R4________........_____RNbMPoints
38 -- Pi, Qi, ..., Ri are points of dimension 2 or 3.
40 -- (Pi, Qi, ...Ri), i= 1,...NbPoles are MultiPoints.
41 -- each MultiPoint has got NbPol Poles.
42 -- MultiBSpCurves are created by the SplineValue method in the ComputeLine
43 -- class, and by the Value method in TheVariational class. MultiBSpCurve
44 -- provides the information required to create the BSpline defined by the approximation.
46 uses MultiPoint from AppParCurves,
47 HArray1OfMultiPoint from AppParCurves,
48 Array1OfMultiPoint from AppParCurves,
49 Array1OfPnt from TColgp,
50 Array1OfPnt2d from TColgp,
51 Array1OfReal from TColStd,
52 Array1OfInteger from TColStd,
53 HArray1OfReal from TColStd,
54 HArray1OfInteger from TColStd,
62 raises OutOfRange from Standard,
63 DimensionError from Standard,
64 ConstructionError from Standard
68 Create returns MultiBSpCurve;
69 ---Purpose: returns an indefinite MultiBSpCurve.
72 Create(NbPol: Integer)
73 ---Purpose: creates a MultiBSpCurve, describing BSpline curves all
74 -- containing the same number of MultiPoint.
75 -- An exception is raised if Degree < 0.
78 returns MultiBSpCurve from AppParCurves
79 raises OutOfRange from Standard;
82 Create(tabMU: Array1OfMultiPoint; Knots: Array1OfReal;
83 Mults: Array1OfInteger)
84 ---Purpose: creates a MultiBSpCurve, describing BSpline curves all
85 -- containing the same number of MultiPoint.
86 -- Each MultiPoint must have NbCurves Poles.
88 returns MultiBSpCurve from AppParCurves
89 raises ConstructionError from Standard;
93 Create(SC: MultiCurve; Knots: Array1OfReal;
94 Mults: Array1OfInteger)
95 ---Purpose: creates a MultiBSpCurve, describing BSpline
96 -- curves, taking control points from <SC>.
98 returns MultiBSpCurve from AppParCurves
99 raises ConstructionError from Standard;
102 SetKnots(me: in out; theKnots: Array1OfReal)
103 ---Purpose: Knots of the multiBSpCurve are assigned to <theknots>.
107 SetMultiplicities(me: in out; theMults: Array1OfInteger)
108 ---Purpose: Multiplicities of the multiBSpCurve are assigned
114 ---Purpose: Returns an array of Reals containing
115 -- the multiplicities of curves resulting from the approximation.
116 ---C++: return const&
121 ---Purpose: Returns an array of Reals containing the
122 -- multiplicities of curves resulting from the approximation.
123 ---C++: return const&
124 returns Array1OfInteger
129 ---Purpose: returns the degree of the curve(s).
135 Value(me; CuIndex: Integer; U: Real; Pt: out Pnt)
136 ---Purpose: returns the value of the point with a parameter U
137 -- on the BSpline curve number CuIndex.
138 -- An exception is raised if CuIndex <0 or > NbCurves.
139 -- An exception is raised if the curve dimension is 2d.
141 raises OutOfRange from Standard,
142 DimensionError from Standard
146 Value(me; CuIndex: Integer; U: Real; Pt: out Pnt2d)
147 ---Purpose: returns the value of the point with a parameter U
148 -- on the BSpline curve number CuIndex.
149 -- An exception is raised if CuIndex <0 or > NbCurves.
150 -- An exception is raised if the curve dimension is 3d.
152 raises OutOfRange from Standard,
153 DimensionError from Standard
157 D1(me; CuIndex: Integer; U: Real; Pt: out Pnt; V1: out Vec)
158 ---Purpose: returns the value of the point with a parameter U
159 -- on the BSpline curve number CuIndex.
160 -- An exception is raised if CuIndex <0 or > NbCurves.
161 -- An exception is raised if the curve dimension is 3d.
163 raises OutOfRange from Standard,
164 DimensionError from Standard
168 D1(me; CuIndex: Integer; U: Real; Pt: out Pnt2d; V1: out Vec2d)
169 ---Purpose: returns the value of the point with a parameter U
170 -- on the BSpline curve number CuIndex.
171 -- An exception is raised if CuIndex <0 or > NbCurves.
172 -- An exception is raised if the curve dimension is 2d.
174 raises OutOfRange from Standard,
175 DimensionError from Standard
178 D2(me; CuIndex: Integer; U: Real; Pt: out Pnt; V1: out Vec; V2: out Vec)
179 ---Purpose: returns the value of the point with a parameter U
180 -- on the BSpline curve number CuIndex.
181 -- An exception is raised if CuIndex <0 or > NbCurves.
182 -- An exception is raised if the curve dimension is 3d.
184 raises OutOfRange from Standard,
185 DimensionError from Standard
189 D2(me; CuIndex: Integer; U: Real; Pt: out Pnt2d;
190 V1: out Vec2d; V2: out Vec2d)
191 ---Purpose: returns the value of the point with a parameter U
192 -- on the BSpline curve number CuIndex.
193 -- An exception is raised if CuIndex <0 or > NbCurves.
194 -- An exception is raised if the curve dimension is 2d.
196 raises OutOfRange from Standard,
197 DimensionError from Standard
201 Dump(me; o: in out OStream)
202 ---Purpose: Prints on the stream o information on the current
203 -- state of the object.
204 -- Is used to redefine the operator <<.
211 myknots: HArray1OfReal;
212 mymults: HArray1OfInteger;