OCC.BSplSLib module¶
- Purpose : BSplSLib B-spline surface LibraryThis package provides an implementation of geometricfunctions for rational and non rational, periodic and nonperiodic B-spline surface computation.this package uses the multi-dimensions splines methodsprovided in the package BSplCLib.In this package the B-spline surface is defined with :. its control points : Array2OfPnt Poles. its weights : Array2OfReal Weights. its knots and their multiplicity in the two parametricdirection U and V : Array1OfReal UKnots, VKnots andArray1OfInteger UMults, VMults.. the degree of the normalized Spline functions :UDegree, VDegree. the Booleans URational, VRational to know if the weightsare constant in the U or V direction.. the Booleans UPeriodic, VRational to know if the thesurface is periodic in the U or V direction.Warnings : The bounds of UKnots and UMults should be thesame, the bounds of VKnots and VMults should be the same,the bounds of Poles and Weights shoud be the same.The Control points representation is :Poles(Uorigin,Vorigin) ……………….Poles(Uorigin,Vend). .. .Poles(Uend, Vorigin) …………………Poles(Uend, Vend)For the double array the row indice corresponds to theparametric U direction and the columns indice correspondsto the parametric V direction.KeyWords :B-spline surface, Functions, LibraryReferences :. A survey of curve and surface methods in CADG Wolfgang BOHMCAGD 1 (1984). On de Boor-like algorithms and blossoming Wolfgang BOEHMcagd 5 (1988). Blossoming and knot insertion algorithms for B-spline curvesRonald N. GOLDMAN. Modelisation des surfaces en CAO, Henri GIAUME Peugeot SA. Curves and Surfaces for Computer Aided Geometric Design,a practical guide Gerald Farin
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
thisown
¶ The membership flag
-
value
()¶
-
-
class
bsplslib
¶ Bases:
object
-
static
BuildCache
()¶ - Perform the evaluation of the Taylor expansion of the Bspline normalized between 0 and 1. If rational computes the homogeneous Taylor expension for the numerator and stores it in CachePoles
Parameters: - U (float) –
- V (float) –
- USpanDomain (float) –
- VSpanDomain (float) –
- UPeriodicFlag (bool) –
- VPeriodicFlag (bool) –
- UDegree (int) –
- VDegree (int) –
- UIndex (int) –
- VIndex (int) –
- UFlatKnots (TColStd_Array1OfReal &) –
- VFlatKnots (TColStd_Array1OfReal &) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- CachePoles (TColgp_Array2OfPnt) –
- CacheWeights (TColStd_Array2OfReal &) –
Return type: void
-
static
CacheD0
()¶ - Perform the evaluation of the of the cache the parameter must be normalized between the 0 and 1 for the span. The Cache must be valid when calling this routine. Geom Package will insure that. and then multiplies by the weights this just evaluates the current point the CacheParameter is where the Cache was constructed the SpanLength is to normalize the polynomial in the cache to avoid bad conditioning effects
Parameters: Return type: void
-
static
CacheD1
()¶ - Perform the evaluation of the of the cache the parameter must be normalized between the 0 and 1 for the span. The Cache must be valid when calling this routine. Geom Package will insure that. and then multiplies by the weights this just evaluates the current point the CacheParameter is where the Cache was constructed the SpanLength is to normalize the polynomial in the cache to avoid bad conditioning effects
Parameters: Return type: void
-
static
CacheD2
()¶ - Perform the evaluation of the of the cache the parameter must be normalized between the 0 and 1 for the span. The Cache must be valid when calling this routine. Geom Package will insure that. and then multiplies by the weights this just evaluates the current point the CacheParameter is where the Cache was constructed the SpanLength is to normalize the polynomial in the cache to avoid bad conditioning effects
Parameters: - U (float) –
- V (float) –
- UDegree (int) –
- VDegree (int) –
- UCacheParameter (float) –
- VCacheParameter (float) –
- USpanLenght (float) –
- VSpanLength (float) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- Point (gp_Pnt) –
- VecU (gp_Vec) –
- VecV (gp_Vec) –
- VecUU (gp_Vec) –
- VecUV (gp_Vec) –
- VecVV (gp_Vec) –
Return type: void
-
static
CoefsD0
()¶ - Calls CacheD0 for Bezier Surfaces Arrays computed with the method PolesCoefficients. Warning: To be used for BezierSurfaces ONLY!!!
Parameters: - U (float) –
- V (float) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- Point (gp_Pnt) –
Return type: void
-
static
CoefsD1
()¶ - Calls CacheD0 for Bezier Surfaces Arrays computed with the method PolesCoefficients. Warning: To be used for BezierSurfaces ONLY!!!
Parameters: Return type: void
-
static
CoefsD2
()¶ - Calls CacheD0 for Bezier Surfaces Arrays computed with the method PolesCoefficients. Warning: To be used for BezierSurfaces ONLY!!!
Parameters: Return type: void
-
static
D0
()¶ Parameters: - U (float) –
- V (float) –
- UIndex (int) –
- VIndex (int) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- UDegree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- P (gp_Pnt) –
Return type: void
-
static
D1
()¶ Parameters: - U (float) –
- V (float) –
- UIndex (int) –
- VIndex (int) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- Degree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- P (gp_Pnt) –
- Vu (gp_Vec) –
- Vv (gp_Vec) –
Return type: void
-
static
D2
()¶ Parameters: - U (float) –
- V (float) –
- UIndex (int) –
- VIndex (int) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- UDegree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- P (gp_Pnt) –
- Vu (gp_Vec) –
- Vv (gp_Vec) –
- Vuu (gp_Vec) –
- Vvv (gp_Vec) –
- Vuv (gp_Vec) –
Return type: void
-
static
D3
()¶ Parameters: - U (float) –
- V (float) –
- UIndex (int) –
- VIndex (int) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- UDegree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- P (gp_Pnt) –
- Vu (gp_Vec) –
- Vv (gp_Vec) –
- Vuu (gp_Vec) –
- Vvv (gp_Vec) –
- Vuv (gp_Vec) –
- Vuuu (gp_Vec) –
- Vvvv (gp_Vec) –
- Vuuv (gp_Vec) –
- Vuvv (gp_Vec) –
Return type: void
-
static
DN
()¶ Parameters: - U (float) –
- V (float) –
- Nu (int) –
- Nv (int) –
- UIndex (int) –
- VIndex (int) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- UDegree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- Vn (gp_Vec) –
Return type: void
-
static
FunctionMultiply
()¶ - this will multiply a given BSpline numerator N(u,v) and denominator D(u,v) defined by its U/VBSplineDegree and U/VBSplineKnots, and U/VMults. Its Poles and Weights are arrays which are coded as array2 of the form [1..UNumPoles][1..VNumPoles] by a function a(u,v) which is assumed to satisfy the following : 1. a(u,v) * N(u,v) and a(u,v) * D(u,v) is a polynomial BSpline that can be expressed exactly as a BSpline of degree U/VNewDegree on the knots U/VFlatKnots 2. the range of a(u,v) is the same as the range of N(u,v) or D(u,v) —Warning: it is the caller’s responsability to insure that conditions 1. and 2. above are satisfied : no check whatsoever is made in this method – Status will return 0 if OK else it will return the pivot index – of the matrix that was inverted to compute the multiplied – BSpline : the method used is interpolation at Schoenenberg – points of a(u,v)* N(u,v) and a(u,v) * D(u,v) Status will return 0 if OK else it will return the pivot index of the matrix that was inverted to compute the multiplied BSpline : the method used is interpolation at Schoenenberg points of a(u,v)*F(u,v) –
Parameters: - Function (BSplSLib_EvaluatorFunction &) –
- UBSplineDegree (int) –
- VBSplineDegree (int) –
- UBSplineKnots (TColStd_Array1OfReal &) –
- VBSplineKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UFlatKnots (TColStd_Array1OfReal &) –
- VFlatKnots (TColStd_Array1OfReal &) –
- UNewDegree (int) –
- VNewDegree (int) –
- NewNumerator (TColgp_Array2OfPnt) –
- NewDenominator (TColStd_Array2OfReal &) –
- Status (int &) –
Return type: void
-
static
GetPoles
()¶ - Get from FP the coordinates of the poles.
Parameters: - FP (TColStd_Array1OfReal &) –
- Poles (TColgp_Array2OfPnt) –
- UDirection (bool) –
Return type: void
- Get from FP the coordinates of the poles.
Parameters: - FP (TColStd_Array1OfReal &) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UDirection (bool) –
Return type: void
-
static
HomogeneousD0
()¶ - Makes an homogeneous evaluation of Poles and Weights any and returns in P the Numerator value and in W the Denominator value if Weights are present otherwise returns 1.0e0
Parameters: - U (float) –
- V (float) –
- UIndex (int) –
- VIndex (int) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- UDegree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- W (float &) –
- P (gp_Pnt) –
Return type: void
-
static
HomogeneousD1
()¶ - Makes an homogeneous evaluation of Poles and Weights any and returns in P the Numerator value and in W the Denominator value if Weights are present otherwise returns 1.0e0
Parameters: - U (float) –
- V (float) –
- UIndex (int) –
- VIndex (int) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- UDegree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- N (gp_Pnt) –
- Nu (gp_Vec) –
- Nv (gp_Vec) –
- D (float &) –
- Du (float &) –
- Dv (float &) –
Return type: void
-
static
IncreaseDegree
()¶ Parameters: - UDirection (bool) –
- Degree (int) –
- NewDegree (int) –
- Periodic (bool) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- Knots (TColStd_Array1OfReal &) –
- Mults (TColStd_Array1OfInteger &) –
- NewPoles (TColgp_Array2OfPnt) –
- NewWeights (TColStd_Array2OfReal &) –
- NewKnots (TColStd_Array1OfReal &) –
- NewMults (TColStd_Array1OfInteger &) –
Return type: void
-
static
InsertKnots
()¶ Parameters: - UDirection (bool) –
- Degree (int) –
- Periodic (bool) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- Knots (TColStd_Array1OfReal &) –
- Mults (TColStd_Array1OfInteger &) –
- AddKnots (TColStd_Array1OfReal &) –
- AddMults (TColStd_Array1OfInteger &) –
- NewPoles (TColgp_Array2OfPnt) –
- NewWeights (TColStd_Array2OfReal &) –
- NewKnots (TColStd_Array1OfReal &) –
- NewMults (TColStd_Array1OfInteger &) –
- Epsilon (float) –
- Add (bool) – default value is Standard_True
Return type: void
-
static
Interpolate
()¶ - Performs the interpolation of the data points given in the Poles array in the form [1,…,RL][1,…,RC][1…PolesDimension] . The ColLength CL and the Length of UParameters must be the same. The length of VFlatKnots is VDegree + CL + 1. //! The RowLength RL and the Length of VParameters must be the same. The length of VFlatKnots is Degree + RL + 1. //! Warning: the method used to do that interpolation is gauss elimination WITHOUT pivoting. Thus if the diagonal is not dominant there is no guarantee that the algorithm will work. Nevertheless for Cubic interpolation at knots or interpolation at Scheonberg points the method will work. The InversionProblem will report 0 if there was no problem else it will give the index of the faulty pivot
Parameters: - UDegree (int) –
- VDegree (int) –
- UFlatKnots (TColStd_Array1OfReal &) –
- VFlatKnots (TColStd_Array1OfReal &) –
- UParameters (TColStd_Array1OfReal &) –
- VParameters (TColStd_Array1OfReal &) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- InversionProblem (int &) –
Return type: void
- Performs the interpolation of the data points given in the Poles array. The ColLength CL and the Length of UParameters must be the same. The length of VFlatKnots is VDegree + CL + 1. //! The RowLength RL and the Length of VParameters must be the same. The length of VFlatKnots is Degree + RL + 1. //! Warning: the method used to do that interpolation is gauss elimination WITHOUT pivoting. Thus if the diagonal is not dominant there is no guarantee that the algorithm will work. Nevertheless for Cubic interpolation at knots or interpolation at Scheonberg points the method will work. The InversionProblem will report 0 if there was no problem else it will give the index of the faulty pivot
Parameters: - UDegree (int) –
- VDegree (int) –
- UFlatKnots (TColStd_Array1OfReal &) –
- VFlatKnots (TColStd_Array1OfReal &) –
- UParameters (TColStd_Array1OfReal &) –
- VParameters (TColStd_Array1OfReal &) –
- Poles (TColgp_Array2OfPnt) –
- InversionProblem (int &) –
Return type: void
-
static
IsRational
()¶ - Returns False if all the weights of the array <Weights> in the area [I1,I2] * [J1,J2] are identic. Epsilon is used for comparing weights. If Epsilon is 0. the Epsilon of the first weight is used.
Parameters: Return type:
-
static
Iso
()¶ - Computes the poles and weights of an isoparametric curve at parameter <Param> (UIso if <IsU> is True, VIso else).
Parameters: - Param (float) –
- IsU (bool) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- Knots (TColStd_Array1OfReal &) –
- Mults (TColStd_Array1OfInteger &) –
- Degree (int) –
- Periodic (bool) –
- CPoles (TColgp_Array1OfPnt) –
- CWeights (TColStd_Array1OfReal &) –
Return type: void
-
static
MovePoint
()¶ - Find the new poles which allows an old point (with a given u,v as parameters) to reach a new position UIndex1,UIndex2 indicate the range of poles we can move for U (1, UNbPoles-1) or (2, UNbPoles) -> no constraint for one side in U (2, UNbPoles-1) -> the ends are enforced for U don’t enter (1,NbPoles) and (1,VNbPoles) -> error: rigid move if problem in BSplineBasis calculation, no change for the curve and UFirstIndex, VLastIndex = 0 VFirstIndex, VLastIndex = 0
Parameters: - U (float) –
- V (float) –
- Displ (gp_Vec) –
- UIndex1 (int) –
- UIndex2 (int) –
- VIndex1 (int) –
- VIndex2 (int) –
- UDegree (int) –
- VDegree (int) –
- Rational (bool) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UFlatKnots (TColStd_Array1OfReal &) –
- VFlatKnots (TColStd_Array1OfReal &) –
- UFirstIndex (int &) –
- ULastIndex (int &) –
- VFirstIndex (int &) –
- VLastIndex (int &) –
- NewPoles (TColgp_Array2OfPnt) –
Return type: void
-
static
NoWeights
()¶ - Used as argument for a non rational curve.
Return type: TColStd_Array2OfReal
-
static
PolesCoefficients
()¶ - Warning! To be used for BezierSurfaces ONLY!!!
Parameters: - Poles (TColgp_Array2OfPnt) –
- CachePoles (TColgp_Array2OfPnt) –
Return type: void
- Encapsulation of BuildCache to perform the evaluation of the Taylor expansion for beziersurfaces at parameters 0.,0.; Warning: To be used for BezierSurfaces ONLY!!!
Parameters: - Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- CachePoles (TColgp_Array2OfPnt) –
- CacheWeights (TColStd_Array2OfReal &) –
Return type: void
-
static
RationalDerivative
()¶ - this is a one dimensional function typedef void (*EvaluatorFunction) ( Standard_Integer // Derivative Request Standard_Real * // StartEnd[2][2] // [0] = U // [1] = V // [0] = start // [1] = end Standard_Real // UParameter Standard_Real // VParamerer Standard_Real & // Result Standard_Integer &) ;// Error Code serves to multiply a given vectorial BSpline by a function Computes the derivatives of a ratio of two-variables functions x(u,v) / w(u,v) at orders <N,M>, x(u,v) is a vector in dimension <3>. //! <Ders> is an array containing the values of the input derivatives from 0 to Min(<N>,<UDeg>), 0 to Min(<M>,<VDeg>). For orders higher than <UDeg,VDeg> the input derivatives are assumed to be 0. //! The <Ders> is a 2d array and the dimension of the lines is always (<VDeg>+1) * (<3>+1), even if <N> is smaller than <Udeg> (the derivatives higher than <N> are not used). //! Content of <Ders> : //! x(i,j)[k] means : the composant k of x derivated (i) times in u and (j) times in v. //! … First line … //! x[1],x[2],…,x[3],w x(0,1)[1],…,x(0,1)[3],w(1,0) … x(0,VDeg)[1],…,x(0,VDeg)[3],w(0,VDeg) //! … Then second line … //! x(1,0)[1],…,x(1,0)[3],w(1,0) x(1,1)[1],…,x(1,1)[3],w(1,1) … x(1,VDeg)[1],…,x(1,VDeg)[3],w(1,VDeg) //! … //! … Last line … //! x(UDeg,0)[1],…,x(UDeg,0)[3],w(UDeg,0) x(UDeg,1)[1],…,x(UDeg,1)[3],w(UDeg,1) … x(Udeg,VDeg)[1],…,x(UDeg,VDeg)[3],w(Udeg,VDeg) //! If <All> is false, only the derivative at order <N,M> is computed. <RDers> is an array of length 3 which will contain the result : //! x(1)/w , x(2)/w , … derivated <N> <M> times //! If <All> is true multiples derivatives are computed. All the derivatives (i,j) with 0 <= i+j <= Max(N,M) are computed. <RDers> is an array of length 3 * (<N>+1) * (<M>+1) which will contains : //! x(1)/w , x(2)/w , … x(1)/w , x(2)/w , … derivated <0,1> times x(1)/w , x(2)/w , … derivated <0,2> times … x(1)/w , x(2)/w , … derivated <0,N> times //! x(1)/w , x(2)/w , … derivated <1,0> times x(1)/w , x(2)/w , … derivated <1,1> times … x(1)/w , x(2)/w , … derivated <1,N> times //! x(1)/w , x(2)/w , … derivated <N,0> times …. Warning: <RDers> must be dimensionned properly.
Parameters: Return type: void
-
static
RemoveKnot
()¶ Parameters: - UDirection (bool) –
- Index (int) –
- Mult (int) –
- Degree (int) –
- Periodic (bool) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- Knots (TColStd_Array1OfReal &) –
- Mults (TColStd_Array1OfInteger &) –
- NewPoles (TColgp_Array2OfPnt) –
- NewWeights (TColStd_Array2OfReal &) –
- NewKnots (TColStd_Array1OfReal &) –
- NewMults (TColStd_Array1OfInteger &) –
- Tolerance (float) –
Return type:
-
static
Resolution
()¶ - Given a tolerance in 3D space returns two tolerances, one in U one in V such that for all (u1,v1) and (u0,v0) in the domain of the surface f(u,v) we have : | u1 - u0 | < UTolerance and | v1 - v0 | < VTolerance we have |f (u1,v1) - f (u0,v0)| < Tolerance3D
Parameters: - Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- UDegree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- Tolerance3D (float) –
- UTolerance (float &) –
- VTolerance (float &) –
Return type: void
-
static
Reverse
()¶ - Reverses the array of poles. Last is the Index of the new first Row( Col) of Poles. On a non periodic surface Last is Poles.Upper(). On a periodic curve last is (number of flat knots - degree - 1) or (sum of multiplicities(but for the last) + degree - 1)
Parameters: - Poles (TColgp_Array2OfPnt) –
- Last (int) –
- UDirection (bool) –
Return type: void
- Reverses the array of weights.
Parameters: Return type: void
-
static
SetPoles
()¶ - Copy in FP the coordinates of the poles.
Parameters: - Poles (TColgp_Array2OfPnt) –
- FP (TColStd_Array1OfReal &) –
- UDirection (bool) –
Return type: void
- Copy in FP the coordinates of the poles.
Parameters: - Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- FP (TColStd_Array1OfReal &) –
- UDirection (bool) –
Return type: void
-
static
Unperiodize
()¶ Parameters: - UDirection (bool) –
- Degree (int) –
- Mults (TColStd_Array1OfInteger &) –
- Knots (TColStd_Array1OfReal &) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- NewMults (TColStd_Array1OfInteger &) –
- NewKnots (TColStd_Array1OfReal &) –
- NewPoles (TColgp_Array2OfPnt) –
- NewWeights (TColStd_Array2OfReal &) –
Return type: void
-
thisown
¶ The membership flag
-
static
-
bsplslib_BuildCache
()¶ - Perform the evaluation of the Taylor expansion of the Bspline normalized between 0 and 1. If rational computes the homogeneous Taylor expension for the numerator and stores it in CachePoles
Parameters: - U (float) –
- V (float) –
- USpanDomain (float) –
- VSpanDomain (float) –
- UPeriodicFlag (bool) –
- VPeriodicFlag (bool) –
- UDegree (int) –
- VDegree (int) –
- UIndex (int) –
- VIndex (int) –
- UFlatKnots (TColStd_Array1OfReal &) –
- VFlatKnots (TColStd_Array1OfReal &) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- CachePoles (TColgp_Array2OfPnt) –
- CacheWeights (TColStd_Array2OfReal &) –
Return type: void
-
bsplslib_CacheD0
()¶ - Perform the evaluation of the of the cache the parameter must be normalized between the 0 and 1 for the span. The Cache must be valid when calling this routine. Geom Package will insure that. and then multiplies by the weights this just evaluates the current point the CacheParameter is where the Cache was constructed the SpanLength is to normalize the polynomial in the cache to avoid bad conditioning effects
Parameters: Return type: void
-
bsplslib_CacheD1
()¶ - Perform the evaluation of the of the cache the parameter must be normalized between the 0 and 1 for the span. The Cache must be valid when calling this routine. Geom Package will insure that. and then multiplies by the weights this just evaluates the current point the CacheParameter is where the Cache was constructed the SpanLength is to normalize the polynomial in the cache to avoid bad conditioning effects
Parameters: Return type: void
-
bsplslib_CacheD2
()¶ - Perform the evaluation of the of the cache the parameter must be normalized between the 0 and 1 for the span. The Cache must be valid when calling this routine. Geom Package will insure that. and then multiplies by the weights this just evaluates the current point the CacheParameter is where the Cache was constructed the SpanLength is to normalize the polynomial in the cache to avoid bad conditioning effects
Parameters: - U (float) –
- V (float) –
- UDegree (int) –
- VDegree (int) –
- UCacheParameter (float) –
- VCacheParameter (float) –
- USpanLenght (float) –
- VSpanLength (float) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- Point (gp_Pnt) –
- VecU (gp_Vec) –
- VecV (gp_Vec) –
- VecUU (gp_Vec) –
- VecUV (gp_Vec) –
- VecVV (gp_Vec) –
Return type: void
-
bsplslib_CoefsD0
()¶ - Calls CacheD0 for Bezier Surfaces Arrays computed with the method PolesCoefficients. Warning: To be used for BezierSurfaces ONLY!!!
Parameters: - U (float) –
- V (float) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- Point (gp_Pnt) –
Return type: void
-
bsplslib_CoefsD1
()¶ - Calls CacheD0 for Bezier Surfaces Arrays computed with the method PolesCoefficients. Warning: To be used for BezierSurfaces ONLY!!!
Parameters: Return type: void
-
bsplslib_CoefsD2
()¶ - Calls CacheD0 for Bezier Surfaces Arrays computed with the method PolesCoefficients. Warning: To be used for BezierSurfaces ONLY!!!
Parameters: Return type: void
-
bsplslib_D0
()¶ Parameters: - U (float) –
- V (float) –
- UIndex (int) –
- VIndex (int) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- UDegree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- P (gp_Pnt) –
Return type: void
-
bsplslib_D1
()¶ Parameters: - U (float) –
- V (float) –
- UIndex (int) –
- VIndex (int) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- Degree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- P (gp_Pnt) –
- Vu (gp_Vec) –
- Vv (gp_Vec) –
Return type: void
-
bsplslib_D2
()¶ Parameters: - U (float) –
- V (float) –
- UIndex (int) –
- VIndex (int) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- UDegree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- P (gp_Pnt) –
- Vu (gp_Vec) –
- Vv (gp_Vec) –
- Vuu (gp_Vec) –
- Vvv (gp_Vec) –
- Vuv (gp_Vec) –
Return type: void
-
bsplslib_D3
()¶ Parameters: - U (float) –
- V (float) –
- UIndex (int) –
- VIndex (int) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- UDegree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- P (gp_Pnt) –
- Vu (gp_Vec) –
- Vv (gp_Vec) –
- Vuu (gp_Vec) –
- Vvv (gp_Vec) –
- Vuv (gp_Vec) –
- Vuuu (gp_Vec) –
- Vvvv (gp_Vec) –
- Vuuv (gp_Vec) –
- Vuvv (gp_Vec) –
Return type: void
-
bsplslib_DN
()¶ Parameters: - U (float) –
- V (float) –
- Nu (int) –
- Nv (int) –
- UIndex (int) –
- VIndex (int) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- UDegree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- Vn (gp_Vec) –
Return type: void
-
bsplslib_FunctionMultiply
()¶ - this will multiply a given BSpline numerator N(u,v) and denominator D(u,v) defined by its U/VBSplineDegree and U/VBSplineKnots, and U/VMults. Its Poles and Weights are arrays which are coded as array2 of the form [1..UNumPoles][1..VNumPoles] by a function a(u,v) which is assumed to satisfy the following : 1. a(u,v) * N(u,v) and a(u,v) * D(u,v) is a polynomial BSpline that can be expressed exactly as a BSpline of degree U/VNewDegree on the knots U/VFlatKnots 2. the range of a(u,v) is the same as the range of N(u,v) or D(u,v) —Warning: it is the caller’s responsability to insure that conditions 1. and 2. above are satisfied : no check whatsoever is made in this method – Status will return 0 if OK else it will return the pivot index – of the matrix that was inverted to compute the multiplied – BSpline : the method used is interpolation at Schoenenberg – points of a(u,v)* N(u,v) and a(u,v) * D(u,v) Status will return 0 if OK else it will return the pivot index of the matrix that was inverted to compute the multiplied BSpline : the method used is interpolation at Schoenenberg points of a(u,v)*F(u,v) –
Parameters: - Function (BSplSLib_EvaluatorFunction &) –
- UBSplineDegree (int) –
- VBSplineDegree (int) –
- UBSplineKnots (TColStd_Array1OfReal &) –
- VBSplineKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UFlatKnots (TColStd_Array1OfReal &) –
- VFlatKnots (TColStd_Array1OfReal &) –
- UNewDegree (int) –
- VNewDegree (int) –
- NewNumerator (TColgp_Array2OfPnt) –
- NewDenominator (TColStd_Array2OfReal &) –
- Status (int &) –
Return type: void
-
bsplslib_GetPoles
()¶ - Get from FP the coordinates of the poles.
Parameters: - FP (TColStd_Array1OfReal &) –
- Poles (TColgp_Array2OfPnt) –
- UDirection (bool) –
Return type: void
- Get from FP the coordinates of the poles.
Parameters: - FP (TColStd_Array1OfReal &) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UDirection (bool) –
Return type: void
-
bsplslib_HomogeneousD0
()¶ - Makes an homogeneous evaluation of Poles and Weights any and returns in P the Numerator value and in W the Denominator value if Weights are present otherwise returns 1.0e0
Parameters: - U (float) –
- V (float) –
- UIndex (int) –
- VIndex (int) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- UDegree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- W (float &) –
- P (gp_Pnt) –
Return type: void
-
bsplslib_HomogeneousD1
()¶ - Makes an homogeneous evaluation of Poles and Weights any and returns in P the Numerator value and in W the Denominator value if Weights are present otherwise returns 1.0e0
Parameters: - U (float) –
- V (float) –
- UIndex (int) –
- VIndex (int) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- UDegree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- N (gp_Pnt) –
- Nu (gp_Vec) –
- Nv (gp_Vec) –
- D (float &) –
- Du (float &) –
- Dv (float &) –
Return type: void
-
bsplslib_IncreaseDegree
()¶ Parameters: - UDirection (bool) –
- Degree (int) –
- NewDegree (int) –
- Periodic (bool) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- Knots (TColStd_Array1OfReal &) –
- Mults (TColStd_Array1OfInteger &) –
- NewPoles (TColgp_Array2OfPnt) –
- NewWeights (TColStd_Array2OfReal &) –
- NewKnots (TColStd_Array1OfReal &) –
- NewMults (TColStd_Array1OfInteger &) –
Return type: void
-
bsplslib_InsertKnots
()¶ Parameters: - UDirection (bool) –
- Degree (int) –
- Periodic (bool) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- Knots (TColStd_Array1OfReal &) –
- Mults (TColStd_Array1OfInteger &) –
- AddKnots (TColStd_Array1OfReal &) –
- AddMults (TColStd_Array1OfInteger &) –
- NewPoles (TColgp_Array2OfPnt) –
- NewWeights (TColStd_Array2OfReal &) –
- NewKnots (TColStd_Array1OfReal &) –
- NewMults (TColStd_Array1OfInteger &) –
- Epsilon (float) –
- Add (bool) – default value is Standard_True
Return type: void
-
bsplslib_Interpolate
()¶ - Performs the interpolation of the data points given in the Poles array in the form [1,…,RL][1,…,RC][1…PolesDimension] . The ColLength CL and the Length of UParameters must be the same. The length of VFlatKnots is VDegree + CL + 1. //! The RowLength RL and the Length of VParameters must be the same. The length of VFlatKnots is Degree + RL + 1. //! Warning: the method used to do that interpolation is gauss elimination WITHOUT pivoting. Thus if the diagonal is not dominant there is no guarantee that the algorithm will work. Nevertheless for Cubic interpolation at knots or interpolation at Scheonberg points the method will work. The InversionProblem will report 0 if there was no problem else it will give the index of the faulty pivot
Parameters: - UDegree (int) –
- VDegree (int) –
- UFlatKnots (TColStd_Array1OfReal &) –
- VFlatKnots (TColStd_Array1OfReal &) –
- UParameters (TColStd_Array1OfReal &) –
- VParameters (TColStd_Array1OfReal &) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- InversionProblem (int &) –
Return type: void
- Performs the interpolation of the data points given in the Poles array. The ColLength CL and the Length of UParameters must be the same. The length of VFlatKnots is VDegree + CL + 1. //! The RowLength RL and the Length of VParameters must be the same. The length of VFlatKnots is Degree + RL + 1. //! Warning: the method used to do that interpolation is gauss elimination WITHOUT pivoting. Thus if the diagonal is not dominant there is no guarantee that the algorithm will work. Nevertheless for Cubic interpolation at knots or interpolation at Scheonberg points the method will work. The InversionProblem will report 0 if there was no problem else it will give the index of the faulty pivot
Parameters: - UDegree (int) –
- VDegree (int) –
- UFlatKnots (TColStd_Array1OfReal &) –
- VFlatKnots (TColStd_Array1OfReal &) –
- UParameters (TColStd_Array1OfReal &) –
- VParameters (TColStd_Array1OfReal &) –
- Poles (TColgp_Array2OfPnt) –
- InversionProblem (int &) –
Return type: void
-
bsplslib_IsRational
()¶ - Returns False if all the weights of the array <Weights> in the area [I1,I2] * [J1,J2] are identic. Epsilon is used for comparing weights. If Epsilon is 0. the Epsilon of the first weight is used.
Parameters: Return type:
-
bsplslib_Iso
()¶ - Computes the poles and weights of an isoparametric curve at parameter <Param> (UIso if <IsU> is True, VIso else).
Parameters: - Param (float) –
- IsU (bool) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- Knots (TColStd_Array1OfReal &) –
- Mults (TColStd_Array1OfInteger &) –
- Degree (int) –
- Periodic (bool) –
- CPoles (TColgp_Array1OfPnt) –
- CWeights (TColStd_Array1OfReal &) –
Return type: void
-
bsplslib_MovePoint
()¶ - Find the new poles which allows an old point (with a given u,v as parameters) to reach a new position UIndex1,UIndex2 indicate the range of poles we can move for U (1, UNbPoles-1) or (2, UNbPoles) -> no constraint for one side in U (2, UNbPoles-1) -> the ends are enforced for U don’t enter (1,NbPoles) and (1,VNbPoles) -> error: rigid move if problem in BSplineBasis calculation, no change for the curve and UFirstIndex, VLastIndex = 0 VFirstIndex, VLastIndex = 0
Parameters: - U (float) –
- V (float) –
- Displ (gp_Vec) –
- UIndex1 (int) –
- UIndex2 (int) –
- VIndex1 (int) –
- VIndex2 (int) –
- UDegree (int) –
- VDegree (int) –
- Rational (bool) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UFlatKnots (TColStd_Array1OfReal &) –
- VFlatKnots (TColStd_Array1OfReal &) –
- UFirstIndex (int &) –
- ULastIndex (int &) –
- VFirstIndex (int &) –
- VLastIndex (int &) –
- NewPoles (TColgp_Array2OfPnt) –
Return type: void
-
bsplslib_NoWeights
()¶ - Used as argument for a non rational curve.
Return type: TColStd_Array2OfReal
-
bsplslib_PolesCoefficients
()¶ - Warning! To be used for BezierSurfaces ONLY!!!
Parameters: - Poles (TColgp_Array2OfPnt) –
- CachePoles (TColgp_Array2OfPnt) –
Return type: void
- Encapsulation of BuildCache to perform the evaluation of the Taylor expansion for beziersurfaces at parameters 0.,0.; Warning: To be used for BezierSurfaces ONLY!!!
Parameters: - Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- CachePoles (TColgp_Array2OfPnt) –
- CacheWeights (TColStd_Array2OfReal &) –
Return type: void
-
bsplslib_RationalDerivative
()¶ - this is a one dimensional function typedef void (*EvaluatorFunction) ( Standard_Integer // Derivative Request Standard_Real * // StartEnd[2][2] // [0] = U // [1] = V // [0] = start // [1] = end Standard_Real // UParameter Standard_Real // VParamerer Standard_Real & // Result Standard_Integer &) ;// Error Code serves to multiply a given vectorial BSpline by a function Computes the derivatives of a ratio of two-variables functions x(u,v) / w(u,v) at orders <N,M>, x(u,v) is a vector in dimension <3>. //! <Ders> is an array containing the values of the input derivatives from 0 to Min(<N>,<UDeg>), 0 to Min(<M>,<VDeg>). For orders higher than <UDeg,VDeg> the input derivatives are assumed to be 0. //! The <Ders> is a 2d array and the dimension of the lines is always (<VDeg>+1) * (<3>+1), even if <N> is smaller than <Udeg> (the derivatives higher than <N> are not used). //! Content of <Ders> : //! x(i,j)[k] means : the composant k of x derivated (i) times in u and (j) times in v. //! … First line … //! x[1],x[2],…,x[3],w x(0,1)[1],…,x(0,1)[3],w(1,0) … x(0,VDeg)[1],…,x(0,VDeg)[3],w(0,VDeg) //! … Then second line … //! x(1,0)[1],…,x(1,0)[3],w(1,0) x(1,1)[1],…,x(1,1)[3],w(1,1) … x(1,VDeg)[1],…,x(1,VDeg)[3],w(1,VDeg) //! … //! … Last line … //! x(UDeg,0)[1],…,x(UDeg,0)[3],w(UDeg,0) x(UDeg,1)[1],…,x(UDeg,1)[3],w(UDeg,1) … x(Udeg,VDeg)[1],…,x(UDeg,VDeg)[3],w(Udeg,VDeg) //! If <All> is false, only the derivative at order <N,M> is computed. <RDers> is an array of length 3 which will contain the result : //! x(1)/w , x(2)/w , … derivated <N> <M> times //! If <All> is true multiples derivatives are computed. All the derivatives (i,j) with 0 <= i+j <= Max(N,M) are computed. <RDers> is an array of length 3 * (<N>+1) * (<M>+1) which will contains : //! x(1)/w , x(2)/w , … x(1)/w , x(2)/w , … derivated <0,1> times x(1)/w , x(2)/w , … derivated <0,2> times … x(1)/w , x(2)/w , … derivated <0,N> times //! x(1)/w , x(2)/w , … derivated <1,0> times x(1)/w , x(2)/w , … derivated <1,1> times … x(1)/w , x(2)/w , … derivated <1,N> times //! x(1)/w , x(2)/w , … derivated <N,0> times …. Warning: <RDers> must be dimensionned properly.
Parameters: Return type: void
-
bsplslib_RemoveKnot
()¶ Parameters: - UDirection (bool) –
- Index (int) –
- Mult (int) –
- Degree (int) –
- Periodic (bool) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- Knots (TColStd_Array1OfReal &) –
- Mults (TColStd_Array1OfInteger &) –
- NewPoles (TColgp_Array2OfPnt) –
- NewWeights (TColStd_Array2OfReal &) –
- NewKnots (TColStd_Array1OfReal &) –
- NewMults (TColStd_Array1OfInteger &) –
- Tolerance (float) –
Return type:
-
bsplslib_Resolution
()¶ - Given a tolerance in 3D space returns two tolerances, one in U one in V such that for all (u1,v1) and (u0,v0) in the domain of the surface f(u,v) we have : | u1 - u0 | < UTolerance and | v1 - v0 | < VTolerance we have |f (u1,v1) - f (u0,v0)| < Tolerance3D
Parameters: - Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- UKnots (TColStd_Array1OfReal &) –
- VKnots (TColStd_Array1OfReal &) –
- UMults (TColStd_Array1OfInteger &) –
- VMults (TColStd_Array1OfInteger &) –
- UDegree (int) –
- VDegree (int) –
- URat (bool) –
- VRat (bool) –
- UPer (bool) –
- VPer (bool) –
- Tolerance3D (float) –
- UTolerance (float &) –
- VTolerance (float &) –
Return type: void
-
bsplslib_Reverse
()¶ - Reverses the array of poles. Last is the Index of the new first Row( Col) of Poles. On a non periodic surface Last is Poles.Upper(). On a periodic curve last is (number of flat knots - degree - 1) or (sum of multiplicities(but for the last) + degree - 1)
Parameters: - Poles (TColgp_Array2OfPnt) –
- Last (int) –
- UDirection (bool) –
Return type: void
- Reverses the array of weights.
Parameters: Return type: void
-
bsplslib_SetPoles
()¶ - Copy in FP the coordinates of the poles.
Parameters: - Poles (TColgp_Array2OfPnt) –
- FP (TColStd_Array1OfReal &) –
- UDirection (bool) –
Return type: void
- Copy in FP the coordinates of the poles.
Parameters: - Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- FP (TColStd_Array1OfReal &) –
- UDirection (bool) –
Return type: void
-
bsplslib_Unperiodize
()¶ Parameters: - UDirection (bool) –
- Degree (int) –
- Mults (TColStd_Array1OfInteger &) –
- Knots (TColStd_Array1OfReal &) –
- Poles (TColgp_Array2OfPnt) –
- Weights (TColStd_Array2OfReal &) –
- NewMults (TColStd_Array1OfInteger &) –
- NewKnots (TColStd_Array1OfReal &) –
- NewPoles (TColgp_Array2OfPnt) –
- NewWeights (TColStd_Array2OfReal &) –
Return type: void
-
new_instancemethod
(func, inst, cls)¶
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases