b311480e |
1 | -- Created on: 1993-09-20 |
2 | -- Created by: Modelistation |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class MultiBSpCurve from AppParCurves |
18 | inherits MultiCurve from AppParCurves |
19 | |
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. |
25 | -- |
26 | -- |
27 | -- Example of a MultiBSpCurve composed of a specified number of MultiPoints: |
28 | -- |
29 | -- P1______P2_____P3______P4________........_____PNbMPoints |
30 | -- |
31 | -- Q1______Q2_____Q3______Q4________........_____QNbMPoints |
32 | -- . . |
33 | -- . . |
34 | -- . . |
35 | -- R1______R2_____R3______R4________........_____RNbMPoints |
36 | -- |
37 | -- |
38 | -- Pi, Qi, ..., Ri are points of dimension 2 or 3. |
39 | -- |
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. |
45 | |
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, |
55 | Pnt from gp, |
56 | Pnt2d from gp, |
57 | Vec from gp, |
58 | Vec2d from gp, |
59 | OStream from Standard |
60 | |
61 | |
62 | raises OutOfRange from Standard, |
63 | DimensionError from Standard, |
64 | ConstructionError from Standard |
65 | |
66 | is |
67 | |
68 | Create returns MultiBSpCurve; |
69 | ---Purpose: returns an indefinite MultiBSpCurve. |
70 | |
71 | |
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. |
76 | |
77 | |
78 | returns MultiBSpCurve from AppParCurves |
79 | raises OutOfRange from Standard; |
80 | |
81 | |
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. |
87 | |
88 | returns MultiBSpCurve from AppParCurves |
89 | raises ConstructionError from Standard; |
90 | |
91 | |
92 | |
93 | Create(SC: MultiCurve; Knots: Array1OfReal; |
94 | Mults: Array1OfInteger) |
95 | ---Purpose: creates a MultiBSpCurve, describing BSpline |
96 | -- curves, taking control points from <SC>. |
97 | |
98 | returns MultiBSpCurve from AppParCurves |
99 | raises ConstructionError from Standard; |
100 | |
101 | |
102 | SetKnots(me: in out; theKnots: Array1OfReal) |
103 | ---Purpose: Knots of the multiBSpCurve are assigned to <theknots>. |
104 | is static; |
105 | |
106 | |
107 | SetMultiplicities(me: in out; theMults: Array1OfInteger) |
108 | ---Purpose: Multiplicities of the multiBSpCurve are assigned |
109 | -- to <theMults>. |
110 | is static; |
111 | |
112 | |
113 | Knots(me) |
114 | ---Purpose: Returns an array of Reals containing |
115 | -- the multiplicities of curves resulting from the approximation. |
116 | ---C++: return const& |
117 | returns Array1OfReal |
118 | is static; |
119 | |
120 | Multiplicities(me) |
121 | ---Purpose: Returns an array of Reals containing the |
122 | -- multiplicities of curves resulting from the approximation. |
123 | ---C++: return const& |
124 | returns Array1OfInteger |
125 | is static; |
126 | |
127 | |
128 | Degree(me) |
129 | ---Purpose: returns the degree of the curve(s). |
130 | |
131 | returns Integer |
132 | is redefined; |
133 | |
134 | |
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. |
140 | |
141 | raises OutOfRange from Standard, |
142 | DimensionError from Standard |
143 | is redefined; |
144 | |
145 | |
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. |
151 | |
152 | raises OutOfRange from Standard, |
153 | DimensionError from Standard |
154 | is redefined; |
155 | |
156 | |
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. |
162 | |
163 | raises OutOfRange from Standard, |
164 | DimensionError from Standard |
165 | is redefined; |
166 | |
167 | |
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. |
173 | |
174 | raises OutOfRange from Standard, |
175 | DimensionError from Standard |
176 | is redefined; |
177 | |
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. |
183 | |
184 | raises OutOfRange from Standard, |
185 | DimensionError from Standard |
186 | is redefined; |
187 | |
188 | |
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. |
195 | |
196 | raises OutOfRange from Standard, |
197 | DimensionError from Standard |
198 | is redefined; |
199 | |
200 | |
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 <<. |
205 | |
206 | is redefined; |
207 | |
208 | |
209 | fields |
210 | |
211 | myknots: HArray1OfReal; |
212 | mymults: HArray1OfInteger; |
213 | myDegree : Integer; |
214 | |
215 | end MultiBSpCurve; |