|
||||
File indexing completed on 2025-01-18 10:04:12
0001 // Created on: 1995-10-20 0002 // Created by: Laurent BOURESCHE 0003 // Copyright (c) 1995-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _Law_BSpline_HeaderFile 0018 #define _Law_BSpline_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <GeomAbs_BSplKnotDistribution.hxx> 0024 #include <GeomAbs_Shape.hxx> 0025 #include <Standard_Integer.hxx> 0026 #include <TColStd_HArray1OfReal.hxx> 0027 #include <TColStd_HArray1OfInteger.hxx> 0028 #include <Standard_Transient.hxx> 0029 #include <TColStd_Array1OfReal.hxx> 0030 #include <TColStd_Array1OfInteger.hxx> 0031 0032 0033 class Law_BSpline; 0034 DEFINE_STANDARD_HANDLE(Law_BSpline, Standard_Transient) 0035 0036 //! Definition of the 1D B_spline curve. 0037 //! 0038 //! Uniform or non-uniform 0039 //! Rational or non-rational 0040 //! Periodic or non-periodic 0041 //! 0042 //! a b-spline curve is defined by : 0043 //! 0044 //! The Degree (up to 25) 0045 //! 0046 //! The Poles (and the weights if it is rational) 0047 //! 0048 //! The Knots and Multiplicities 0049 //! 0050 //! The knot vector is an increasing sequence of 0051 //! reals without repetition. The multiplicities are 0052 //! the repetition of the knots. 0053 //! 0054 //! If the knots are regularly spaced (the difference 0055 //! of two consecutive knots is a constant), the 0056 //! knots repartition is : 0057 //! 0058 //! - Uniform if all multiplicities are 1. 0059 //! 0060 //! - Quasi-uniform if all multiplicities are 1 0061 //! but the first and the last which are Degree+1. 0062 //! 0063 //! - PiecewiseBezier if all multiplicities are 0064 //! Degree but the first and the last which are 0065 //! Degree+1. 0066 //! 0067 //! The curve may be periodic. 0068 //! 0069 //! On a periodic curve if there are k knots and p 0070 //! poles. the period is knot(k) - knot(1) 0071 //! 0072 //! the poles and knots are infinite vectors with : 0073 //! 0074 //! knot(i+k) = knot(i) + period 0075 //! 0076 //! pole(i+p) = pole(i) 0077 //! 0078 //! References : 0079 //! . A survey of curve and surface methods in CADG Wolfgang BOHM 0080 //! CAGD 1 (1984) 0081 //! . On de Boor-like algorithms and blossoming Wolfgang BOEHM 0082 //! cagd 5 (1988) 0083 //! . Blossoming and knot insertion algorithms for B-spline curves 0084 //! Ronald N. GOLDMAN 0085 //! . Modelisation des surfaces en CAO, Henri GIAUME Peugeot SA 0086 //! . Curves and Surfaces for Computer Aided Geometric Design, 0087 //! a practical guide Gerald Farin 0088 class Law_BSpline : public Standard_Transient 0089 { 0090 0091 public: 0092 0093 0094 //! Creates a non-rational B_spline curve on the 0095 //! basis <Knots, Multiplicities> of degree <Degree>. 0096 Standard_EXPORT Law_BSpline(const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Multiplicities, const Standard_Integer Degree, const Standard_Boolean Periodic = Standard_False); 0097 0098 //! Creates a rational B_spline curve on the basis 0099 //! <Knots, Multiplicities> of degree <Degree>. 0100 Standard_EXPORT Law_BSpline(const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Multiplicities, const Standard_Integer Degree, const Standard_Boolean Periodic = Standard_False); 0101 0102 //! Increase the degree to <Degree>. Nothing is done 0103 //! if <Degree> is lower or equal to the current 0104 //! degree. 0105 Standard_EXPORT void IncreaseDegree (const Standard_Integer Degree); 0106 0107 //! Increases the multiplicity of the knot <Index> to 0108 //! <M>. 0109 //! 0110 //! If <M> is lower or equal to the current 0111 //! multiplicity nothing is done. If <M> is higher than 0112 //! the degree the degree is used. 0113 //! If <Index> is not in [FirstUKnotIndex, LastUKnotIndex] 0114 Standard_EXPORT void IncreaseMultiplicity (const Standard_Integer Index, const Standard_Integer M); 0115 0116 //! Increases the multiplicities of the knots in 0117 //! [I1,I2] to <M>. 0118 //! 0119 //! For each knot if <M> is lower or equal to the 0120 //! current multiplicity nothing is done. If <M> is 0121 //! higher than the degree the degree is used. 0122 //! If <I1,I2> are not in [FirstUKnotIndex, LastUKnotIndex] 0123 Standard_EXPORT void IncreaseMultiplicity (const Standard_Integer I1, const Standard_Integer I2, const Standard_Integer M); 0124 0125 //! Increment the multiplicities of the knots in 0126 //! [I1,I2] by <M>. 0127 //! 0128 //! If <M> is not positive nithing is done. 0129 //! 0130 //! For each knot the resulting multiplicity is 0131 //! limited to the Degree. 0132 //! If <I1,I2> are not in [FirstUKnotIndex, LastUKnotIndex] 0133 Standard_EXPORT void IncrementMultiplicity (const Standard_Integer I1, const Standard_Integer I2, const Standard_Integer M); 0134 0135 //! Inserts a knot value in the sequence of knots. If 0136 //! <U> is an existing knot the multiplicity is 0137 //! increased by <M>. 0138 //! 0139 //! If U is not on the parameter range nothing is 0140 //! done. 0141 //! 0142 //! If the multiplicity is negative or null nothing is 0143 //! done. The new multiplicity is limited to the 0144 //! degree. 0145 //! 0146 //! The tolerance criterion for knots equality is 0147 //! the max of Epsilon(U) and ParametricTolerance. 0148 Standard_EXPORT void InsertKnot (const Standard_Real U, const Standard_Integer M = 1, const Standard_Real ParametricTolerance = 0.0, const Standard_Boolean Add = Standard_True); 0149 0150 //! Inserts a set of knots values in the sequence of 0151 //! knots. 0152 //! 0153 //! For each U = Knots(i), M = Mults(i) 0154 //! 0155 //! If <U> is an existing knot the multiplicity is 0156 //! increased by <M> if <Add> is True, increased to 0157 //! <M> if <Add> is False. 0158 //! 0159 //! If U is not on the parameter range nothing is 0160 //! done. 0161 //! 0162 //! If the multiplicity is negative or null nothing is 0163 //! done. The new multiplicity is limited to the 0164 //! degree. 0165 //! 0166 //! The tolerance criterion for knots equality is 0167 //! the max of Epsilon(U) and ParametricTolerance. 0168 Standard_EXPORT void InsertKnots (const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Real ParametricTolerance = 0.0, const Standard_Boolean Add = Standard_False); 0169 0170 //! Decrement the knots multiplicity to <M>. If M is 0171 //! 0 the knot is removed. The Poles sequence is 0172 //! modified. 0173 //! 0174 //! As there are two ways to compute the new poles the 0175 //! average is computed if the distance is lower than 0176 //! the <Tolerance>, else False is returned. 0177 //! 0178 //! A low tolerance is used to prevent the modification 0179 //! of the curve. 0180 //! 0181 //! A high tolerance is used to "smooth" the curve. 0182 //! 0183 //! Raised if Index is not in the range 0184 //! [FirstUKnotIndex, LastUKnotIndex] 0185 //! pole insertion and pole removing 0186 //! this operation is limited to the Uniform or QuasiUniform 0187 //! BSplineCurve. The knot values are modified . If the BSpline is 0188 //! NonUniform or Piecewise Bezier an exception Construction error 0189 //! is raised. 0190 Standard_EXPORT Standard_Boolean RemoveKnot (const Standard_Integer Index, const Standard_Integer M, const Standard_Real Tolerance); 0191 0192 0193 //! Changes the direction of parametrization of <me>. The Knot 0194 //! sequence is modified, the FirstParameter and the 0195 //! LastParameter are not modified. The StartPoint of the 0196 //! initial curve becomes the EndPoint of the reversed curve 0197 //! and the EndPoint of the initial curve becomes the StartPoint 0198 //! of the reversed curve. 0199 Standard_EXPORT void Reverse(); 0200 0201 //! Returns the parameter on the reversed curve for 0202 //! the point of parameter U on <me>. 0203 //! 0204 //! returns UFirst + ULast - U 0205 Standard_EXPORT Standard_Real ReversedParameter (const Standard_Real U) const; 0206 0207 0208 //! Segments the curve between U1 and U2. 0209 //! The control points are modified, the first and the last point 0210 //! are not the same. 0211 //! Warnings : 0212 //! Even if <me> is not closed it can become closed after the 0213 //! segmentation for example if U1 or U2 are out of the bounds 0214 //! of the curve <me> or if the curve makes loop. 0215 //! After the segmentation the length of a curve can be null. 0216 //! raises if U2 < U1. 0217 Standard_EXPORT void Segment (const Standard_Real U1, const Standard_Real U2); 0218 0219 //! Changes the knot of range Index. 0220 //! The multiplicity of the knot is not modified. 0221 //! Raised if K >= Knots(Index+1) or K <= Knots(Index-1). 0222 //! Raised if Index < 1 || Index > NbKnots 0223 Standard_EXPORT void SetKnot (const Standard_Integer Index, const Standard_Real K); 0224 0225 //! Changes all the knots of the curve 0226 //! The multiplicity of the knots are not modified. 0227 //! 0228 //! Raised if there is an index such that K (Index+1) <= K (Index). 0229 //! 0230 //! Raised if K.Lower() < 1 or K.Upper() > NbKnots 0231 Standard_EXPORT void SetKnots (const TColStd_Array1OfReal& K); 0232 0233 0234 //! Changes the knot of range Index with its multiplicity. 0235 //! You can increase the multiplicity of a knot but it is 0236 //! not allowed to decrease the multiplicity of an existing knot. 0237 //! 0238 //! Raised if K >= Knots(Index+1) or K <= Knots(Index-1). 0239 //! Raised if M is greater than Degree or lower than the previous 0240 //! multiplicity of knot of range Index. 0241 //! Raised if Index < 1 || Index > NbKnots 0242 Standard_EXPORT void SetKnot (const Standard_Integer Index, const Standard_Real K, const Standard_Integer M); 0243 0244 //! returns the parameter normalized within 0245 //! the period if the curve is periodic : otherwise 0246 //! does not do anything 0247 Standard_EXPORT void PeriodicNormalization (Standard_Real& U) const; 0248 0249 0250 //! Makes a closed B-spline into a periodic curve. The curve is 0251 //! periodic if the knot sequence is periodic and if the curve is 0252 //! closed (The tolerance criterion is Resolution from gp). 0253 //! The period T is equal to Knot(LastUKnotIndex) - 0254 //! Knot(FirstUKnotIndex). A periodic B-spline can be uniform 0255 //! or not. 0256 //! Raised if the curve is not closed. 0257 Standard_EXPORT void SetPeriodic(); 0258 0259 //! Set the origin of a periodic curve at Knot(index) 0260 //! KnotVector and poles are modified. 0261 //! Raised if the curve is not periodic 0262 //! Raised if index not in the range 0263 //! [FirstUKnotIndex , LastUKnotIndex] 0264 Standard_EXPORT void SetOrigin (const Standard_Integer Index); 0265 0266 0267 //! Makes a non periodic curve. If the curve was non periodic 0268 //! the curve is not modified. 0269 Standard_EXPORT void SetNotPeriodic(); 0270 0271 //! Substitutes the Pole of range Index with P. 0272 //! 0273 //! Raised if Index < 1 || Index > NbPoles 0274 Standard_EXPORT void SetPole (const Standard_Integer Index, const Standard_Real P); 0275 0276 0277 //! Substitutes the pole and the weight of range Index. 0278 //! If the curve <me> is not rational it can become rational 0279 //! If the curve was rational it can become non rational 0280 //! 0281 //! Raised if Index < 1 || Index > NbPoles 0282 //! Raised if Weight <= 0.0 0283 Standard_EXPORT void SetPole (const Standard_Integer Index, const Standard_Real P, const Standard_Real Weight); 0284 0285 0286 //! Changes the weight for the pole of range Index. 0287 //! If the curve was non rational it can become rational. 0288 //! If the curve was rational it can become non rational. 0289 //! 0290 //! Raised if Index < 1 || Index > NbPoles 0291 //! Raised if Weight <= 0.0 0292 Standard_EXPORT void SetWeight (const Standard_Integer Index, const Standard_Real Weight); 0293 0294 0295 //! Returns the continuity of the curve, the curve is at least C0. 0296 //! Raised if N < 0. 0297 Standard_EXPORT Standard_Boolean IsCN (const Standard_Integer N) const; 0298 0299 0300 //! Returns true if the distance between the first point and the 0301 //! last point of the curve is lower or equal to Resolution 0302 //! from package gp. 0303 //! Warnings : 0304 //! The first and the last point can be different from the first 0305 //! pole and the last pole of the curve. 0306 Standard_EXPORT Standard_Boolean IsClosed() const; 0307 0308 //! Returns True if the curve is periodic. 0309 Standard_EXPORT Standard_Boolean IsPeriodic() const; 0310 0311 0312 //! Returns True if the weights are not identical. 0313 //! The tolerance criterion is Epsilon of the class Real. 0314 Standard_EXPORT Standard_Boolean IsRational() const; 0315 0316 0317 //! Returns the global continuity of the curve : 0318 //! C0 : only geometric continuity, 0319 //! C1 : continuity of the first derivative all along the Curve, 0320 //! C2 : continuity of the second derivative all along the Curve, 0321 //! C3 : continuity of the third derivative all along the Curve, 0322 //! CN : the order of continuity is infinite. 0323 //! For a B-spline curve of degree d if a knot Ui has a 0324 //! multiplicity p the B-spline curve is only Cd-p continuous 0325 //! at Ui. So the global continuity of the curve can't be greater 0326 //! than Cd-p where p is the maximum multiplicity of the interior 0327 //! Knots. In the interior of a knot span the curve is infinitely 0328 //! continuously differentiable. 0329 Standard_EXPORT GeomAbs_Shape Continuity() const; 0330 0331 //! Computation of value and derivatives 0332 Standard_EXPORT Standard_Integer Degree() const; 0333 0334 Standard_EXPORT Standard_Real Value (const Standard_Real U) const; 0335 0336 Standard_EXPORT void D0 (const Standard_Real U, Standard_Real& P) const; 0337 0338 Standard_EXPORT void D1 (const Standard_Real U, Standard_Real& P, Standard_Real& V1) const; 0339 0340 Standard_EXPORT void D2 (const Standard_Real U, Standard_Real& P, Standard_Real& V1, Standard_Real& V2) const; 0341 0342 Standard_EXPORT void D3 (const Standard_Real U, Standard_Real& P, Standard_Real& V1, Standard_Real& V2, Standard_Real& V3) const; 0343 0344 0345 //! The following functions computes the point of parameter U and 0346 //! the derivatives at this point on the B-spline curve arc 0347 //! defined between the knot FromK1 and the knot ToK2. U can be 0348 //! out of bounds [Knot (FromK1), Knot (ToK2)] but for the 0349 //! computation we only use the definition of the curve between 0350 //! these two knots. This method is useful to compute local 0351 //! derivative, if the order of continuity of the whole curve is 0352 //! not greater enough. Inside the parametric domain Knot 0353 //! (FromK1), Knot (ToK2) the evaluations are the same as if we 0354 //! consider the whole definition of the curve. Of course the 0355 //! evaluations are different outside this parametric domain. 0356 Standard_EXPORT Standard_Real DN (const Standard_Real U, const Standard_Integer N) const; 0357 0358 Standard_EXPORT Standard_Real LocalValue (const Standard_Real U, const Standard_Integer FromK1, const Standard_Integer ToK2) const; 0359 0360 Standard_EXPORT void LocalD0 (const Standard_Real U, const Standard_Integer FromK1, const Standard_Integer ToK2, Standard_Real& P) const; 0361 0362 Standard_EXPORT void LocalD1 (const Standard_Real U, const Standard_Integer FromK1, const Standard_Integer ToK2, Standard_Real& P, Standard_Real& V1) const; 0363 0364 Standard_EXPORT void LocalD2 (const Standard_Real U, const Standard_Integer FromK1, const Standard_Integer ToK2, Standard_Real& P, Standard_Real& V1, Standard_Real& V2) const; 0365 0366 Standard_EXPORT void LocalD3 (const Standard_Real U, const Standard_Integer FromK1, const Standard_Integer ToK2, Standard_Real& P, Standard_Real& V1, Standard_Real& V2, Standard_Real& V3) const; 0367 0368 Standard_EXPORT Standard_Real LocalDN (const Standard_Real U, const Standard_Integer FromK1, const Standard_Integer ToK2, const Standard_Integer N) const; 0369 0370 0371 //! Returns the last point of the curve. 0372 //! Warnings : 0373 //! The last point of the curve is different from the last 0374 //! pole of the curve if the multiplicity of the last knot 0375 //! is lower than Degree. 0376 Standard_EXPORT Standard_Real EndPoint() const; 0377 0378 0379 //! For a B-spline curve the first parameter (which gives the start 0380 //! point of the curve) is a knot value but if the multiplicity of 0381 //! the first knot index is lower than Degree + 1 it is not the 0382 //! first knot of the curve. This method computes the index of the 0383 //! knot corresponding to the first parameter. 0384 Standard_EXPORT Standard_Integer FirstUKnotIndex() const; 0385 0386 0387 //! Computes the parametric value of the start point of the curve. 0388 //! It is a knot value. 0389 Standard_EXPORT Standard_Real FirstParameter() const; 0390 0391 0392 //! Returns the knot of range Index. When there is a knot 0393 //! with a multiplicity greater than 1 the knot is not repeated. 0394 //! The method Multiplicity can be used to get the multiplicity 0395 //! of the Knot. 0396 //! Raised if Index < 1 or Index > NbKnots 0397 Standard_EXPORT Standard_Real Knot (const Standard_Integer Index) const; 0398 0399 //! returns the knot values of the B-spline curve; 0400 //! 0401 //! Raised if the length of K is not equal to the number of knots. 0402 Standard_EXPORT void Knots (TColStd_Array1OfReal& K) const; 0403 0404 //! Returns the knots sequence. 0405 //! In this sequence the knots with a multiplicity greater than 1 0406 //! are repeated. 0407 //! Example : 0408 //! K = {k1, k1, k1, k2, k3, k3, k4, k4, k4} 0409 //! 0410 //! Raised if the length of K is not equal to NbPoles + Degree + 1 0411 Standard_EXPORT void KnotSequence (TColStd_Array1OfReal& K) const; 0412 0413 0414 //! Returns NonUniform or Uniform or QuasiUniform or PiecewiseBezier. 0415 //! If all the knots differ by a positive constant from the 0416 //! preceding knot the BSpline Curve can be : 0417 //! - Uniform if all the knots are of multiplicity 1, 0418 //! - QuasiUniform if all the knots are of multiplicity 1 except for 0419 //! the first and last knot which are of multiplicity Degree + 1, 0420 //! - PiecewiseBezier if the first and last knots have multiplicity 0421 //! Degree + 1 and if interior knots have multiplicity Degree 0422 //! A piecewise Bezier with only two knots is a BezierCurve. 0423 //! else the curve is non uniform. 0424 //! The tolerance criterion is Epsilon from class Real. 0425 Standard_EXPORT GeomAbs_BSplKnotDistribution KnotDistribution() const; 0426 0427 0428 //! For a BSpline curve the last parameter (which gives the 0429 //! end point of the curve) is a knot value but if the 0430 //! multiplicity of the last knot index is lower than 0431 //! Degree + 1 it is not the last knot of the curve. This 0432 //! method computes the index of the knot corresponding to 0433 //! the last parameter. 0434 Standard_EXPORT Standard_Integer LastUKnotIndex() const; 0435 0436 0437 //! Computes the parametric value of the end point of the curve. 0438 //! It is a knot value. 0439 Standard_EXPORT Standard_Real LastParameter() const; 0440 0441 0442 //! Locates the parametric value U in the sequence of knots. 0443 //! If "WithKnotRepetition" is True we consider the knot's 0444 //! representation with repetition of multiple knot value, 0445 //! otherwise we consider the knot's representation with 0446 //! no repetition of multiple knot values. 0447 //! Knots (I1) <= U <= Knots (I2) 0448 //! . if I1 = I2 U is a knot value (the tolerance criterion 0449 //! ParametricTolerance is used). 0450 //! . if I1 < 1 => U < Knots (1) - Abs(ParametricTolerance) 0451 //! . if I2 > NbKnots => U > Knots (NbKnots) + Abs(ParametricTolerance) 0452 Standard_EXPORT void LocateU (const Standard_Real U, const Standard_Real ParametricTolerance, Standard_Integer& I1, Standard_Integer& I2, const Standard_Boolean WithKnotRepetition = Standard_False) const; 0453 0454 0455 //! Returns the multiplicity of the knots of range Index. 0456 //! Raised if Index < 1 or Index > NbKnots 0457 Standard_EXPORT Standard_Integer Multiplicity (const Standard_Integer Index) const; 0458 0459 0460 //! Returns the multiplicity of the knots of the curve. 0461 //! 0462 //! Raised if the length of M is not equal to NbKnots. 0463 Standard_EXPORT void Multiplicities (TColStd_Array1OfInteger& M) const; 0464 0465 0466 //! Returns the number of knots. This method returns the number of 0467 //! knot without repetition of multiple knots. 0468 Standard_EXPORT Standard_Integer NbKnots() const; 0469 0470 //! Returns the number of poles 0471 Standard_EXPORT Standard_Integer NbPoles() const; 0472 0473 //! Returns the pole of range Index. 0474 //! Raised if Index < 1 or Index > NbPoles. 0475 Standard_EXPORT Standard_Real Pole (const Standard_Integer Index) const; 0476 0477 //! Returns the poles of the B-spline curve; 0478 //! 0479 //! Raised if the length of P is not equal to the number of poles. 0480 Standard_EXPORT void Poles (TColStd_Array1OfReal& P) const; 0481 0482 0483 //! Returns the start point of the curve. 0484 //! Warnings : 0485 //! This point is different from the first pole of the curve if the 0486 //! multiplicity of the first knot is lower than Degree. 0487 Standard_EXPORT Standard_Real StartPoint() const; 0488 0489 //! Returns the weight of the pole of range Index . 0490 //! Raised if Index < 1 or Index > NbPoles. 0491 Standard_EXPORT Standard_Real Weight (const Standard_Integer Index) const; 0492 0493 //! Returns the weights of the B-spline curve; 0494 //! 0495 //! Raised if the length of W is not equal to NbPoles. 0496 Standard_EXPORT void Weights (TColStd_Array1OfReal& W) const; 0497 0498 0499 //! Returns the value of the maximum degree of the normalized 0500 //! B-spline basis functions in this package. 0501 Standard_EXPORT static Standard_Integer MaxDegree(); 0502 0503 0504 //! Changes the value of the Law at parameter U to NewValue. 0505 //! and makes its derivative at U be derivative. 0506 //! StartingCondition = -1 means first can move 0507 //! EndingCondition = -1 means last point can move 0508 //! StartingCondition = 0 means the first point cannot move 0509 //! EndingCondition = 0 means the last point cannot move 0510 //! StartingCondition = 1 means the first point and tangent cannot move 0511 //! EndingCondition = 1 means the last point and tangent cannot move 0512 //! and so forth 0513 //! ErrorStatus != 0 means that there are not enough degree of freedom 0514 //! with the constrain to deform the curve accordingly 0515 Standard_EXPORT void MovePointAndTangent (const Standard_Real U, const Standard_Real NewValue, const Standard_Real Derivative, const Standard_Real Tolerance, const Standard_Integer StartingCondition, const Standard_Integer EndingCondition, Standard_Integer& ErrorStatus); 0516 0517 //! given Tolerance3D returns UTolerance 0518 //! such that if f(t) is the curve we have 0519 //! | t1 - t0| < Utolerance ===> 0520 //! |f(t1) - f(t0)| < Tolerance3D 0521 Standard_EXPORT void Resolution (const Standard_Real Tolerance3D, Standard_Real& UTolerance) const; 0522 0523 Standard_EXPORT Handle(Law_BSpline) Copy() const; 0524 0525 0526 0527 0528 DEFINE_STANDARD_RTTIEXT(Law_BSpline,Standard_Transient) 0529 0530 protected: 0531 0532 0533 0534 0535 private: 0536 0537 0538 0539 //! Tells whether the Cache is valid for the 0540 //! given parameter 0541 //! Warnings : the parameter must be normalized within 0542 //! the period if the curve is periodic. Otherwise 0543 //! the answer will be false 0544 Standard_EXPORT Standard_Boolean IsCacheValid (const Standard_Real Parameter) const; 0545 0546 //! Recompute the flatknots, the knotsdistribution, the 0547 //! continuity. 0548 Standard_EXPORT void UpdateKnots(); 0549 0550 Standard_Boolean rational; 0551 Standard_Boolean periodic; 0552 GeomAbs_BSplKnotDistribution knotSet; 0553 GeomAbs_Shape smooth; 0554 Standard_Integer deg; 0555 Handle(TColStd_HArray1OfReal) poles; 0556 Handle(TColStd_HArray1OfReal) weights; 0557 Handle(TColStd_HArray1OfReal) flatknots; 0558 Handle(TColStd_HArray1OfReal) knots; 0559 Handle(TColStd_HArray1OfInteger) mults; 0560 0561 0562 }; 0563 0564 0565 0566 0567 0568 0569 0570 #endif // _Law_BSpline_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |