0026042: OCCT won't work with the latest Xcode
authorakz <akz@opencascade.com>
Wed, 23 Sep 2015 13:31:15 +0000 (16:31 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 1 Oct 2015 10:44:10 +0000 (13:44 +0300)
Dereferenced null pointers was eliminated for PLib, BSplCLib and BSplSLib. All affected code was changed accordingly.

53 files changed:
src/AppParCurves/AppParCurves_Gradient.gxx
src/AppParCurves/AppParCurves_MultiBSpCurve.cxx
src/AppParCurves/AppParCurves_MultiCurve.cxx
src/Approx/Approx_MCurvesToBSpCurve.cxx
src/BSplCLib/BSplCLib.cxx
src/BSplCLib/BSplCLib.hxx
src/BSplCLib/BSplCLib.lxx
src/BSplCLib/BSplCLib_2.cxx
src/BSplCLib/BSplCLib_BzSyntaxes.cxx
src/BSplCLib/BSplCLib_Cache.cxx
src/BSplCLib/BSplCLib_Cache.hxx
src/BSplCLib/BSplCLib_CurveComputation.gxx
src/BSplSLib/BSplSLib.cxx
src/BSplSLib/BSplSLib.hxx
src/BSplSLib/BSplSLib.lxx
src/BSplSLib/BSplSLib_BzSyntaxes.cxx
src/BSplSLib/BSplSLib_Cache.cxx
src/BSplSLib/BSplSLib_Cache.hxx
src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.cxx
src/Convert/Convert_CompBezierCurvesToBSplineCurve.cxx
src/Convert/Convert_ConicToBSplineCurve.cxx
src/Convert/Convert_CosAndSinEvalFunction.hxx
src/FairCurve/FairCurve_Batten.cxx
src/Geom/Geom_BSplineCurve.cxx
src/Geom/Geom_BSplineCurve.hxx
src/Geom/Geom_BSplineCurve_1.cxx
src/Geom/Geom_BSplineSurface.cxx
src/Geom/Geom_BSplineSurface.hxx
src/Geom/Geom_BSplineSurface_1.cxx
src/Geom/Geom_BezierCurve.cxx
src/Geom/Geom_BezierSurface.cxx
src/Geom2d/Geom2d_BSplineCurve.cxx
src/Geom2d/Geom2d_BSplineCurve.hxx
src/Geom2d/Geom2d_BSplineCurve_1.cxx
src/Geom2d/Geom2d_BezierCurve.cxx
src/Geom2dAPI/Geom2dAPI_PointsToBSpline.cxx
src/GeomAPI/GeomAPI_PointsToBSplineSurface.cxx
src/GeomFill/GeomFill_BSplineCurves.cxx
src/GeomFill/GeomFill_ConstrainedFilling.cxx
src/GeomFill/GeomFill_Coons.cxx
src/GeomLib/GeomLib.cxx
src/GeomLib/GeomLib_DenominatorMultiplier.cxx
src/Hermit/Hermit.cxx
src/Law/Law_BSpline.cxx
src/PLib/FILES
src/PLib/PLib.cxx
src/PLib/PLib.hxx
src/PLib/PLib.lxx [deleted file]
src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx
src/ProjLib/ProjLib_ProjectOnPlane.cxx
src/ProjLib/ProjLib_ProjectOnSurface.cxx
src/ShapeConstruct/ShapeConstruct_CompBezierCurves2dToBSplineCurve2d.cxx
src/ShapeConstruct/ShapeConstruct_CompBezierCurvesToBSplineCurve.cxx

index a29aab7..438b900 100644 (file)
@@ -143,7 +143,7 @@ AppParCurves_Gradient::
     for (k = 1; k <= nbP3d; k++) {
       for (l=1; l<=deg+1; l++) TabCoef(l) = TheCoef(l+i2);
       i2 += deg+1;
-      BSplCLib::CoefsD1(UF, TabCoef, PLib::NoWeights(), Pt, V1);
+      BSplCLib::CoefsD1(UF, TabCoef, BSplCLib::NoWeights(), Pt, V1);
       MyV = gp_Vec(Pt, TabP(k));
       FU += MyV*V1;
       DFU += V1.SquareMagnitude();
@@ -152,7 +152,7 @@ AppParCurves_Gradient::
     for (k = 1; k <= nbP2d; k++) {
       for (l=1; l<=deg+1; l++) TabCoef2d(l) = TheCoef2d(l+i2);
       i2 += deg+1;
-      BSplCLib::CoefsD1(UF, TabCoef2d, PLib::NoWeights(), Pt2d, V12d);
+      BSplCLib::CoefsD1(UF, TabCoef2d, BSplCLib::NoWeights(), Pt2d, V12d);
       MyV2d = gp_Vec2d(Pt2d, TabP2d(k));
       FU += MyV2d*V12d;
       DFU += V12d.SquareMagnitude();
index 3655fa9..80cad1c 100644 (file)
@@ -172,7 +172,7 @@ void AppParCurves_MultiBSpCurve::Value (const Standard_Integer CuIndex,
   Curve(CuIndex, TabPoles);
 
   BSplCLib::D0(U,0,myDegree,Standard_False,TabPoles,BSplCLib::NoWeights(),
-              myknots->Array1(),mymults->Array1(),Pt);
+              myknots->Array1(),&mymults->Array1(),Pt);
 }
 
 
@@ -192,7 +192,7 @@ void AppParCurves_MultiBSpCurve::Value (const Standard_Integer CuIndex,
   Curve(CuIndex, TabPoles);
   
   BSplCLib::D0(U,0,myDegree,Standard_False,TabPoles,BSplCLib::NoWeights(),
-              myknots->Array1(),mymults->Array1(),Pt);
+              myknots->Array1(),&mymults->Array1(),Pt);
 }
 
 
@@ -211,7 +211,7 @@ void AppParCurves_MultiBSpCurve::D1 (const Standard_Integer CuIndex,
   Curve(CuIndex, TabPoles);
 
   BSplCLib::D1(U,0,myDegree,Standard_False,TabPoles,BSplCLib::NoWeights(),
-              myknots->Array1(),mymults->Array1(),Pt,V1);
+              myknots->Array1(),&mymults->Array1(),Pt,V1);
 }
 
 
@@ -233,7 +233,7 @@ void AppParCurves_MultiBSpCurve::D2 (const Standard_Integer CuIndex,
   Curve(CuIndex, TabPoles);
 
   BSplCLib::D2(U,0,myDegree,Standard_False,TabPoles,BSplCLib::NoWeights(),
-              myknots->Array1(),mymults->Array1(),Pt,V1,V2);
+              myknots->Array1(),&mymults->Array1(),Pt,V1,V2);
 }
 
 
@@ -252,7 +252,7 @@ void AppParCurves_MultiBSpCurve::D1 (const Standard_Integer CuIndex,
   Curve(CuIndex, TabPoles);
 
   BSplCLib::D1(U,0,myDegree,Standard_False,TabPoles,BSplCLib::NoWeights(),
-              myknots->Array1(),mymults->Array1(),Pt,V1);
+              myknots->Array1(),&mymults->Array1(),Pt,V1);
 }
 
 
@@ -274,7 +274,7 @@ void AppParCurves_MultiBSpCurve::D2 (const Standard_Integer CuIndex,
   Curve(CuIndex, TabPoles);
 
   BSplCLib::D2(U,0,myDegree,Standard_False,TabPoles,BSplCLib::NoWeights(),
-              myknots->Array1(),mymults->Array1(),Pt,V1,V2);
+              myknots->Array1(),&mymults->Array1(),Pt,V1,V2);
 }
 
 
index bbf1b64..92ba882 100644 (file)
@@ -187,7 +187,7 @@ void AppParCurves_MultiCurve::Value (const Standard_Integer CuIndex,
     TabPoles(i) = tabPoint->Value(i).Point(CuIndex);
   } 
   
-  BSplCLib::D0 (U, TabPoles,PLib::NoWeights(), Pt);
+  BSplCLib::D0 (U, TabPoles,BSplCLib::NoWeights(), Pt);
 }
 
 
@@ -203,7 +203,7 @@ void AppParCurves_MultiCurve::Value (const Standard_Integer CuIndex,
     TabPole(i) = tabPoint->Value(i).Point2d(CuIndex);
   }
   
-  BSplCLib::D0 (U, TabPole, PLib::NoWeights(), Pt);
+  BSplCLib::D0 (U, TabPole, BSplCLib::NoWeights(), Pt);
 }
 
 
@@ -222,7 +222,7 @@ void AppParCurves_MultiCurve::D1 (const Standard_Integer CuIndex,
     TabPole(i) = tabPoint->Value(i).Point(CuIndex);
   }
 
-  BSplCLib::D1 (U, TabPole, PLib::NoWeights(), Pt, V1);
+  BSplCLib::D1 (U, TabPole, BSplCLib::NoWeights(), Pt, V1);
 }
 
 
@@ -242,7 +242,7 @@ void AppParCurves_MultiCurve::D2 (const Standard_Integer CuIndex,
     TabPole(i) = tabPoint->Value(i).Point(CuIndex);
   }
 
-  BSplCLib::D2 (U, TabPole, PLib::NoWeights(), Pt, V1, V2);
+  BSplCLib::D2 (U, TabPole, BSplCLib::NoWeights(), Pt, V1, V2);
 }
 
 
@@ -259,7 +259,7 @@ void AppParCurves_MultiCurve::D1 (const Standard_Integer CuIndex,
     TabPole(i) = tabPoint->Value(i).Point2d(CuIndex);
   }
 
-  BSplCLib::D1 (U, TabPole, PLib::NoWeights(), Pt, V1);
+  BSplCLib::D1 (U, TabPole, BSplCLib::NoWeights(), Pt, V1);
 }
 
 
@@ -279,7 +279,7 @@ void AppParCurves_MultiCurve::D2 (const Standard_Integer CuIndex,
     TabPole(i) = tabPoint->Value(i).Point2d(CuIndex);
   }
 
-  BSplCLib::D2(U, TabPole, PLib::NoWeights(), Pt, V1, V2);
+  BSplCLib::D2(U, TabPole, BSplCLib::NoWeights(), Pt, V1, V2);
 }
 
 
index 42a06ae..2714269 100644 (file)
@@ -194,8 +194,8 @@ void Approx_MCurvesToBSpCurve::Perform
        Inc = deg-mydegre;
        TColgp_Array1OfPnt Points(1, deg+1);
        if (Inc > 0) {
-         BSplCLib::IncreaseDegree(deg, ThePoles, PLib::NoWeights(),
-                                  Points, PLib::NoWeights());
+         BSplCLib::IncreaseDegree(deg, ThePoles, BSplCLib::NoWeights(),
+                                  Points, BSplCLib::NoWeights());
        }
        else {
          Points = ThePoles;
@@ -215,8 +215,8 @@ void Approx_MCurvesToBSpCurve::Perform
        Inc = deg-mydegre;
        TColgp_Array1OfPnt2d Points2d(1, deg+1);
        if (Inc > 0) {
-         BSplCLib::IncreaseDegree(deg, ThePoles2d, PLib::NoWeights(),
-                                  Points2d, PLib::NoWeights());
+         BSplCLib::IncreaseDegree(deg, ThePoles2d, BSplCLib::NoWeights(),
+                                  Points2d, BSplCLib::NoWeights());
        }
        else {
          Points2d = ThePoles2d;
index e4cb5fe..6d3a574 100644 (file)
@@ -315,21 +315,21 @@ void BSplCLib::LocateParameter
 void BSplCLib::LocateParameter 
 (const Standard_Integer         Degree,
  const TColStd_Array1OfReal&    Knots,
- const TColStd_Array1OfInteger& Mults,
+ const TColStd_Array1OfInteger* Mults,
  const Standard_Real            U,
  const Standard_Boolean         Periodic,
  Standard_Integer&              KnotIndex,
  Standard_Real&                 NewU) 
 {
   Standard_Integer first,last;
-  if (&Mults) {
+  if (Mults) {
     if (Periodic) {
       first = Knots.Lower();
       last  = Knots.Upper();
     }
     else {
-      first = FirstUKnotIndex(Degree,Mults);
-      last  = LastUKnotIndex (Degree,Mults);
+      first = FirstUKnotIndex(Degree,*Mults);
+      last  = LastUKnotIndex (Degree,*Mults);
     }
   }
   else {
@@ -1453,14 +1453,14 @@ void BSplCLib::BuildKnots(const Standard_Integer         Degree,
                          const Standard_Integer         Index,
                          const Standard_Boolean         Periodic,
                          const TColStd_Array1OfReal&    Knots,
-                         const TColStd_Array1OfInteger& Mults,
+                         const TColStd_Array1OfInteger* Mults,
                          Standard_Real&                 LK)
 {
   Standard_Integer KLower = Knots.Lower();
   const Standard_Real * pkn = &Knots(KLower);
   pkn -= KLower;
   Standard_Real *knot = &LK;
-  if (&Mults == NULL) {
+  if (Mults == NULL) {
     switch (Degree) {
     case 1 : {
       Standard_Integer j = Index    ;
@@ -1544,9 +1544,9 @@ void BSplCLib::BuildKnots(const Standard_Integer         Degree,
     Standard_Integer i;
     Standard_Integer Deg1 = Degree - 1;
     Standard_Integer KUpper = Knots.Upper();
-    Standard_Integer MLower = Mults.Lower();
-    Standard_Integer MUpper = Mults.Upper();
-    const Standard_Integer * pmu = &Mults(MLower);
+    Standard_Integer MLower = Mults->Lower();
+    Standard_Integer MUpper = Mults->Upper();
+    const Standard_Integer * pmu = &(*Mults)(MLower);
     pmu -= MLower;
     Standard_Real dknot = 0;
     Standard_Integer ilow = Index    , mlow = 0;
@@ -1692,13 +1692,13 @@ Standard_Boolean  BSplCLib::PrepareInsertKnots
  const TColStd_Array1OfReal&    Knots,
  const TColStd_Array1OfInteger& Mults,
  const TColStd_Array1OfReal&    AddKnots,
- const TColStd_Array1OfInteger& AddMults,
+ const TColStd_Array1OfInteger* AddMults,
  Standard_Integer&              NbPoles,
  Standard_Integer&              NbKnots, 
  const Standard_Real            Tolerance,
  const Standard_Boolean         Add)
 {
-  Standard_Boolean addflat = &AddMults == NULL;
+  Standard_Boolean addflat = AddMults == NULL;
   
   Standard_Integer first,last;
   if (Periodic) {
@@ -1745,14 +1745,14 @@ Standard_Boolean  BSplCLib::PrepareInsertKnots
     }
 
     if (addflat) amult = 1;
-    else         amult = Max(0,AddMults(ak));
+    else         amult = Max(0,(*AddMults)(ak));
     
     while ((ak < AddKnots.Upper()) &&
           (Abs(au - AddKnots(ak+1)) <= Eps)) {
       ak++;
       if (Add) {
        if (addflat) amult++;
-       else         amult += Max(0,AddMults(ak));
+       else         amult += Max(0,(*AddMults)(ak));
       }
     }
     
@@ -1875,14 +1875,14 @@ void BSplCLib::InsertKnots
  const TColStd_Array1OfReal&    Knots,    
  const TColStd_Array1OfInteger& Mults, 
  const TColStd_Array1OfReal&    AddKnots,    
- const TColStd_Array1OfInteger& AddMults, 
+ const TColStd_Array1OfInteger* AddMults, 
  TColStd_Array1OfReal&          NewPoles,
  TColStd_Array1OfReal&          NewKnots,    
  TColStd_Array1OfInteger&       NewMults, 
  const Standard_Real            Tolerance,
  const Standard_Boolean         Add)
 {
-  Standard_Boolean addflat  = &AddMults == NULL;
+  Standard_Boolean addflat  = AddMults == NULL;
   
   Standard_Integer i,k,mult,firstmult;
   Standard_Integer index,kn,curnk,curk;
@@ -1989,7 +1989,7 @@ void BSplCLib::InsertKnots
     else          length = Degree;
     
     if (addflat) depth = 1;
-    else         depth = Min(Degree,AddMults(kn));
+    else         depth = Min(Degree,(*AddMults)(kn));
 
     if (sameknot) {
       if (Add) {
@@ -2011,7 +2011,7 @@ void BSplCLib::InsertKnots
     }
     if (depth <= 0) continue;
     
-    BuildKnots(Degree,curnk,Periodic,nknots,nmults,*knots);
+    BuildKnots(Degree,curnk,Periodic,nknots,&nmults,*knots);
 
     // copy the poles
 
@@ -2083,7 +2083,7 @@ void BSplCLib::InsertKnots
       length = Degree - NewMults(curnk);
       depth  = firstmult;
 
-      BuildKnots(Degree,curnk,Periodic,NewKnots,NewMults,*knots);
+      BuildKnots(Degree,curnk,Periodic,NewKnots,&NewMults,*knots);
       TColStd_Array1OfReal npoles(NewPoles(NewPoles.Lower()),
                                  NewPoles.Lower(),
                                  NewPoles.Upper()-depth*Dimension);
@@ -2170,9 +2170,9 @@ Standard_Boolean BSplCLib::RemoveKnot
   // the new sequence of knots
   // is obtained from the knots at Index-1 and Index
   
-  BSplCLib::BuildKnots(Degree,TheIndex-1,Periodic,Knots,Mults,*knots);
+  BSplCLib::BuildKnots(Degree,TheIndex-1,Periodic,Knots,&Mults,*knots);
   index = PoleIndex(Degree,TheIndex-1,Periodic,Mults);
-  BSplCLib::BuildKnots(Degree,TheIndex,Periodic,Knots,Mults,knots[2*Degree]);
+  BSplCLib::BuildKnots(Degree,TheIndex,Periodic,Knots,&Mults,knots[2*Degree]);
 
   index += Mult;
 
@@ -2814,7 +2814,7 @@ void BSplCLib::Trimming(const Standard_Integer         Degree,
 
   K(1) = U1;  K(2) = U2;
   mm[0] = mm[1] = Degree;
-  if (!PrepareInsertKnots( Degree, Periodic, Knots, Mults, K, M, 
+  if (!PrepareInsertKnots( Degree, Periodic, Knots, Mults, K, &M, 
                          nbpoles, nbknots, Epsilon( U1), 0))
     Standard_OutOfRange::Raise();
 
@@ -2826,7 +2826,7 @@ void BSplCLib::Trimming(const Standard_Integer         Degree,
 // do not allow the multiplicities to Add : they must be less than Degree
 //
   InsertKnots(Degree, Periodic, Dimension, Poles, Knots, Mults,
-             K, M, TempPoles, TempKnots, TempMults, Epsilon(U1),
+             K, &M, TempPoles, TempKnots, TempMults, Epsilon(U1),
              Standard_False);
 
   // find in TempPoles the index of the pole corresponding to U1
@@ -3608,8 +3608,8 @@ void  BSplCLib::TangExtendToConstraint
   TColStd_Array1OfReal ExtrapPoles(1,Csize*CDimension);
   Standard_Real * EPadr = &ExtrapPoles(1) ;
   PLib::CoefficientsPoles(CDimension,
-                          ExtraCoeffs,  PLib::NoWeights(),
-                         ExtrapPoles,  PLib::NoWeights());
+                          ExtraCoeffs, PLib::NoWeights(),
+                          ExtrapPoles, PLib::NoWeights());
 
 //  calculate the nodes of extension with multiplicities
   TColStd_Array1OfReal ExtrapNoeuds(1,2);
@@ -3911,7 +3911,7 @@ void  BSplCLib::TangExtendToConstraint
 void BSplCLib::Resolution(      Standard_Real&        Poles,
                          const Standard_Integer      ArrayDimension,
                          const Standard_Integer      NumPoles,
-                         const TColStd_Array1OfReal& Weights,
+                         const TColStd_Array1OfReal* Weights,
                          const TColStd_Array1OfReal& FlatKnots,
                          const Standard_Integer      Degree,
                          const Standard_Real         Tolerance3D,
@@ -3932,8 +3932,8 @@ void BSplCLib::Resolution(      Standard_Real&        Poles,
   num_poles = FlatKnots.Length() - Deg1;
   switch (ArrayDimension) {
   case 2 : {
-    if (&Weights != NULL) {
-      const Standard_Real * WG = &Weights(Weights.Lower());
+    if (Weights != NULL) {
+      const Standard_Real * WG = &(*Weights)(Weights->Lower());
       min_weights = WG[0];
       
       for (ii = 1 ; ii < NumPoles ; ii++) {
@@ -4000,8 +4000,8 @@ void BSplCLib::Resolution(      Standard_Real&        Poles,
     break;
   }
   case 3 : {
-    if (&Weights != NULL) {
-      const Standard_Real * WG = &Weights(Weights.Lower());
+    if (Weights != NULL) {
+      const Standard_Real * WG = &(*Weights)(Weights->Lower());
       min_weights = WG[0];
       
       for (ii = 1 ; ii < NumPoles ; ii++) {
@@ -4077,8 +4077,8 @@ void BSplCLib::Resolution(      Standard_Real&        Poles,
     break;
   }
   case 4 : {
-    if (&Weights != NULL) {
-      const Standard_Real * WG = &Weights(Weights.Lower());
+    if (Weights != NULL) {
+      const Standard_Real * WG = &(*Weights)(Weights->Lower());
       min_weights = WG[0];
       
       for (ii = 1 ; ii < NumPoles ; ii++) {
@@ -4164,8 +4164,8 @@ void BSplCLib::Resolution(      Standard_Real&        Poles,
   }
     default : {
       Standard_Integer kk;
-      if (&Weights != NULL) {
-       const Standard_Real * WG = &Weights(Weights.Lower());
+      if (Weights != NULL) {
+        const Standard_Real * WG = &(*Weights)(Weights->Lower());
        min_weights = WG[0];
        
        for (ii = 1 ; ii < NumPoles ; ii++) {
index 57936d9..f1dba6f 100644 (file)
@@ -97,11 +97,12 @@ class math_Matrix;
 //! The bounds of Poles and Weights should be the same.
 //! The bounds of Knots and Mults   should be the same.
 //!
-//! Weights can be a null reference (BSplCLib::NoWeights())
-//! the curve is non rational.
+//! Note: weight and multiplicity arrays can be passed by pointer for
+//! some functions so that NULL pointer is valid.
+//! That means no weights/no multiplicities passed.
 //!
-//! Mults can be a null reference   (BSplCLib::NoMults())
-//! the knots are "flat" knots.
+//! No weights (BSplCLib::NoWeights()) means the curve is non rational.
+//! No mults (BSplCLib::NoMults()) means the knots are "flat" knots.
 //!
 //! KeyWords :
 //! B-spline curve, Functions, Library
@@ -188,7 +189,7 @@ public:
   //! Warning: Knots have to be "flat"
   Standard_EXPORT static void LocateParameter (const Standard_Integer Degree, const TColStd_Array1OfReal& Knots, const Standard_Real U, const Standard_Boolean IsPeriodic, const Standard_Integer FromK1, const Standard_Integer ToK2, Standard_Integer& KnotIndex, Standard_Real& NewU);
   
-  Standard_EXPORT static void LocateParameter (const Standard_Integer Degree, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Real U, const Standard_Boolean Periodic, Standard_Integer& Index, Standard_Real& NewU);
+  Standard_EXPORT static void LocateParameter (const Standard_Integer Degree, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, const Standard_Real U, const Standard_Boolean Periodic, Standard_Integer& Index, Standard_Real& NewU);
   
   //! Finds the greatest multiplicity in a set of knots
   //! between  K1  and K2.   Mults  is  the  multiplicity
@@ -384,27 +385,27 @@ public:
   Standard_EXPORT static void Bohm (const Standard_Real U, const Standard_Integer Degree, const Standard_Integer N, Standard_Real& Knots, const Standard_Integer Dimension, Standard_Real& Poles);
   
   //! Used as argument for a non rational curve.
-    static TColStd_Array1OfReal& NoWeights();
+    static TColStd_Array1OfReal* NoWeights();
   
   //! Used as argument for a flatknots evaluation.
-    static TColStd_Array1OfInteger& NoMults();
+    static TColStd_Array1OfInteger* NoMults();
   
   //! Stores in LK  the usefull knots  for the BoorSchem
   //! on the span Knots(Index) - Knots(Index+1)
-  Standard_EXPORT static void BuildKnots (const Standard_Integer Degree, const Standard_Integer Index, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, Standard_Real& LK);
+  Standard_EXPORT static void BuildKnots (const Standard_Integer Degree, const Standard_Integer Index, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, Standard_Real& LK);
   
   //! Return the index of the  first Pole to  use on the
   //! span  Mults(Index)  - Mults(Index+1).  This  index
   //! must be added to Poles.Lower().
   Standard_EXPORT static Standard_Integer PoleIndex (const Standard_Integer Degree, const Standard_Integer Index, const Standard_Boolean Periodic, const TColStd_Array1OfInteger& Mults);
   
-  Standard_EXPORT static void BuildEval (const Standard_Integer Degree, const Standard_Integer Index, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal& Weights, Standard_Real& LP);
+  Standard_EXPORT static void BuildEval (const Standard_Integer Degree, const Standard_Integer Index, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal* Weights, Standard_Real& LP);
   
-  Standard_EXPORT static void BuildEval (const Standard_Integer Degree, const Standard_Integer Index, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, Standard_Real& LP);
+  Standard_EXPORT static void BuildEval (const Standard_Integer Degree, const Standard_Integer Index, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, Standard_Real& LP);
   
   //! Copy in <LP>  the poles and  weights for  the Eval
   //! scheme. starting from  Poles(Poles.Lower()+Index)
-  Standard_EXPORT static void BuildEval (const Standard_Integer Degree, const Standard_Integer Index, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, Standard_Real& LP);
+  Standard_EXPORT static void BuildEval (const Standard_Integer Degree, const Standard_Integer Index, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, Standard_Real& LP);
   
   //! Copy in <LP>  poles for <Dimension>  Boor  scheme.
   //! Starting  from    <Index>     *  <Dimension>, copy
@@ -436,11 +437,11 @@ public:
   //! Return False if :
   //! The knew knots are knot increasing.
   //! The new knots are not in the range.
-  Standard_EXPORT static Standard_Boolean PrepareInsertKnots (const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& AddKnots, const TColStd_Array1OfInteger& AddMults, Standard_Integer& NbPoles, Standard_Integer& NbKnots, const Standard_Real Epsilon, const Standard_Boolean Add = Standard_True);
+  Standard_EXPORT static Standard_Boolean PrepareInsertKnots (const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& AddKnots, const TColStd_Array1OfInteger* AddMults, Standard_Integer& NbPoles, Standard_Integer& NbKnots, const Standard_Real Epsilon, const Standard_Boolean Add = Standard_True);
   
-  Standard_EXPORT static void InsertKnots (const Standard_Integer Degree, const Standard_Boolean Periodic, const Standard_Integer Dimension, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& AddKnots, const TColStd_Array1OfInteger& AddMults, TColStd_Array1OfReal& NewPoles, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Epsilon, const Standard_Boolean Add = Standard_True);
+  Standard_EXPORT static void InsertKnots (const Standard_Integer Degree, const Standard_Boolean Periodic, const Standard_Integer Dimension, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& AddKnots, const TColStd_Array1OfInteger* AddMults, TColStd_Array1OfReal& NewPoles, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Epsilon, const Standard_Boolean Add = Standard_True);
   
-  Standard_EXPORT static void InsertKnots (const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& AddKnots, const TColStd_Array1OfInteger& AddMults, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal& NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Epsilon, const Standard_Boolean Add = Standard_True);
+  Standard_EXPORT static void InsertKnots (const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& AddKnots, const TColStd_Array1OfInteger* AddMults, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal* NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Epsilon, const Standard_Boolean Add = Standard_True);
   
   //! Insert   a  sequence  of  knots <AddKnots> with
   //! multiplicities   <AddMults>. <AddKnots>   must  be a   non
@@ -468,9 +469,9 @@ public:
   //! When all  the new knots  are existing knots, i.e. only the
   //! multiplicities  will  change it is   safe to  use the same
   //! arrays as input and output.
-  Standard_EXPORT static void InsertKnots (const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& AddKnots, const TColStd_Array1OfInteger& AddMults, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal& NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Epsilon, const Standard_Boolean Add = Standard_True);
+  Standard_EXPORT static void InsertKnots (const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& AddKnots, const TColStd_Array1OfInteger* AddMults, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal* NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Epsilon, const Standard_Boolean Add = Standard_True);
   
-  Standard_EXPORT static void InsertKnot (const Standard_Integer UIndex, const Standard_Real U, const Standard_Integer UMult, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal& NewWeights);
+  Standard_EXPORT static void InsertKnot (const Standard_Integer UIndex, const Standard_Real U, const Standard_Integer UMult, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal* NewWeights);
   
   //! Insert a new knot U of multiplicity UMult in the
   //! knot sequence.
@@ -481,19 +482,19 @@ public:
   //!
   //! The new control points corresponding to this insertion are
   //! returned. Knots and Mults are not updated.
-  Standard_EXPORT static void InsertKnot (const Standard_Integer UIndex, const Standard_Real U, const Standard_Integer UMult, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal& NewWeights);
+  Standard_EXPORT static void InsertKnot (const Standard_Integer UIndex, const Standard_Real U, const Standard_Integer UMult, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal* NewWeights);
   
-  Standard_EXPORT static void RaiseMultiplicity (const Standard_Integer KnotIndex, const Standard_Integer Mult, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal& NewWeights);
+  Standard_EXPORT static void RaiseMultiplicity (const Standard_Integer KnotIndex, const Standard_Integer Mult, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal* NewWeights);
   
   //! Raise the multiplicity of knot to <UMult>.
   //!
   //! The new control points  are  returned. Knots and Mults are
   //! not updated.
-  Standard_EXPORT static void RaiseMultiplicity (const Standard_Integer KnotIndex, const Standard_Integer Mult, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal& NewWeights);
+  Standard_EXPORT static void RaiseMultiplicity (const Standard_Integer KnotIndex, const Standard_Integer Mult, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal* NewWeights);
   
   Standard_EXPORT static Standard_Boolean RemoveKnot (const Standard_Integer Index, const Standard_Integer Mult, const Standard_Integer Degree, const Standard_Boolean Periodic, const Standard_Integer Dimension, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColStd_Array1OfReal& NewPoles, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Tolerance);
   
-  Standard_EXPORT static Standard_Boolean RemoveKnot (const Standard_Integer Index, const Standard_Integer Mult, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal& NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Tolerance);
+  Standard_EXPORT static Standard_Boolean RemoveKnot (const Standard_Integer Index, const Standard_Integer Mult, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal* NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Tolerance);
   
   //! Decrement the  multiplicity  of <Knots(Index)>
   //! to <Mult>. If <Mult>   is  null the   knot  is
@@ -513,7 +514,7 @@ public:
   //!
   //! A high tolerance  can be used  to "smooth" the
   //! curve.
-  Standard_EXPORT static Standard_Boolean RemoveKnot (const Standard_Integer Index, const Standard_Integer Mult, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal& NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Tolerance);
+  Standard_EXPORT static Standard_Boolean RemoveKnot (const Standard_Integer Index, const Standard_Integer Mult, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal* NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Tolerance);
   
   //! Returns the   number   of  knots   of  a  curve   with
   //! multiplicities <Mults> after elevating the degree from
@@ -523,11 +524,11 @@ public:
   
   Standard_EXPORT static void IncreaseDegree (const Standard_Integer Degree, const Standard_Integer NewDegree, const Standard_Boolean Periodic, const Standard_Integer Dimension, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColStd_Array1OfReal& NewPoles, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults);
   
-  Standard_EXPORT static void IncreaseDegree (const Standard_Integer Degree, const Standard_Integer NewDegree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal& NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults);
+  Standard_EXPORT static void IncreaseDegree (const Standard_Integer Degree, const Standard_Integer NewDegree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal* NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults);
   
-  Standard_EXPORT static void IncreaseDegree (const Standard_Integer Degree, const Standard_Integer NewDegree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal& NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults);
+  Standard_EXPORT static void IncreaseDegree (const Standard_Integer Degree, const Standard_Integer NewDegree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal* NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults);
   
-  Standard_EXPORT static void IncreaseDegree (const Standard_Integer NewDegree, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal& NewWeights);
+  Standard_EXPORT static void IncreaseDegree (const Standard_Integer NewDegree, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal* NewWeights);
   
   //! Increase the degree of a bspline (or bezier) curve
   //! of   dimension  <Dimension>  form <Degree>      to
@@ -586,7 +587,7 @@ public:
   //!
   //! The method IncreaseDegreeCountKnots can be used to
   //! compute the new number of knots.
-  Standard_EXPORT static void IncreaseDegree (const Standard_Integer NewDegree, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal& NewWeights);
+  Standard_EXPORT static void IncreaseDegree (const Standard_Integer NewDegree, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal* NewWeights);
   
   //! Set in <NbKnots> and <NbPolesToAdd> the number of Knots and
   //! Poles   of  the NotPeriodic  Curve   identical  at the
@@ -596,9 +597,9 @@ public:
   
   Standard_EXPORT static void Unperiodize (const Standard_Integer Degree, const Standard_Integer Dimension, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfReal& Poles, TColStd_Array1OfInteger& NewMults, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfReal& NewPoles);
   
-  Standard_EXPORT static void Unperiodize (const Standard_Integer Degree, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& Knots, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, TColStd_Array1OfInteger& NewMults, TColStd_Array1OfReal& NewKnots, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal& NewWeights);
+  Standard_EXPORT static void Unperiodize (const Standard_Integer Degree, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& Knots, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, TColStd_Array1OfInteger& NewMults, TColStd_Array1OfReal& NewKnots, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal* NewWeights);
   
-  Standard_EXPORT static void Unperiodize (const Standard_Integer Degree, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& Knots, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, TColStd_Array1OfInteger& NewMults, TColStd_Array1OfReal& NewKnots, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal& NewWeights);
+  Standard_EXPORT static void Unperiodize (const Standard_Integer Degree, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& Knots, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, TColStd_Array1OfInteger& NewMults, TColStd_Array1OfReal& NewKnots, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal* NewWeights);
   
   //! Set in <NbKnots> and <NbPoles> the number of Knots and
   //! Poles of the  curve resulting  of  the trimming of the
@@ -607,55 +608,55 @@ public:
   
   Standard_EXPORT static void Trimming (const Standard_Integer Degree, const Standard_Boolean Periodic, const Standard_Integer Dimension, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& Poles, const Standard_Real U1, const Standard_Real U2, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, TColStd_Array1OfReal& NewPoles);
   
-  Standard_EXPORT static void Trimming (const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, const Standard_Real U1, const Standard_Real U2, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal& NewWeights);
+  Standard_EXPORT static void Trimming (const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, const Standard_Real U1, const Standard_Real U2, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, TColgp_Array1OfPnt& NewPoles, TColStd_Array1OfReal* NewWeights);
   
-  Standard_EXPORT static void Trimming (const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, const Standard_Real U1, const Standard_Real U2, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal& NewWeights);
+  Standard_EXPORT static void Trimming (const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, const Standard_Real U1, const Standard_Real U2, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, TColgp_Array1OfPnt2d& NewPoles, TColStd_Array1OfReal* NewWeights);
   
-  Standard_EXPORT static void D0 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, Standard_Real& P);
+  Standard_EXPORT static void D0 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, Standard_Real& P);
   
-  Standard_EXPORT static void D0 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, gp_Pnt& P);
+  Standard_EXPORT static void D0 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, gp_Pnt& P);
   
-  Standard_EXPORT static void D0 (const Standard_Real U, const Standard_Integer UIndex, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, gp_Pnt2d& P);
+  Standard_EXPORT static void D0 (const Standard_Real U, const Standard_Integer UIndex, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, gp_Pnt2d& P);
   
-  Standard_EXPORT static void D0 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt& P);
+  Standard_EXPORT static void D0 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt& P);
   
-  Standard_EXPORT static void D0 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt2d& P);
+  Standard_EXPORT static void D0 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt2d& P);
   
-  Standard_EXPORT static void D1 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, Standard_Real& P, Standard_Real& V);
+  Standard_EXPORT static void D1 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, Standard_Real& P, Standard_Real& V);
   
-  Standard_EXPORT static void D1 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, gp_Pnt& P, gp_Vec& V);
+  Standard_EXPORT static void D1 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, gp_Pnt& P, gp_Vec& V);
   
-  Standard_EXPORT static void D1 (const Standard_Real U, const Standard_Integer UIndex, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, gp_Pnt2d& P, gp_Vec2d& V);
+  Standard_EXPORT static void D1 (const Standard_Real U, const Standard_Integer UIndex, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, gp_Pnt2d& P, gp_Vec2d& V);
   
-  Standard_EXPORT static void D1 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt& P, gp_Vec& V);
+  Standard_EXPORT static void D1 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt& P, gp_Vec& V);
   
-  Standard_EXPORT static void D1 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt2d& P, gp_Vec2d& V);
+  Standard_EXPORT static void D1 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt2d& P, gp_Vec2d& V);
   
-  Standard_EXPORT static void D2 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, Standard_Real& P, Standard_Real& V1, Standard_Real& V2);
+  Standard_EXPORT static void D2 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, Standard_Real& P, Standard_Real& V1, Standard_Real& V2);
   
-  Standard_EXPORT static void D2 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
+  Standard_EXPORT static void D2 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
   
-  Standard_EXPORT static void D2 (const Standard_Real U, const Standard_Integer UIndex, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
+  Standard_EXPORT static void D2 (const Standard_Real U, const Standard_Integer UIndex, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
   
-  Standard_EXPORT static void D2 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
+  Standard_EXPORT static void D2 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
   
-  Standard_EXPORT static void D2 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
+  Standard_EXPORT static void D2 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
   
-  Standard_EXPORT static void D3 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, Standard_Real& P, Standard_Real& V1, Standard_Real& V2, Standard_Real& V3);
+  Standard_EXPORT static void D3 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, Standard_Real& P, Standard_Real& V1, Standard_Real& V2, Standard_Real& V3);
   
-  Standard_EXPORT static void D3 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
+  Standard_EXPORT static void D3 (const Standard_Real U, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
   
-  Standard_EXPORT static void D3 (const Standard_Real U, const Standard_Integer UIndex, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3);
+  Standard_EXPORT static void D3 (const Standard_Real U, const Standard_Integer UIndex, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3);
   
-  Standard_EXPORT static void D3 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
+  Standard_EXPORT static void D3 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
   
-  Standard_EXPORT static void D3 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3);
+  Standard_EXPORT static void D3 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3);
   
-  Standard_EXPORT static void DN (const Standard_Real U, const Standard_Integer N, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, Standard_Real& VN);
+  Standard_EXPORT static void DN (const Standard_Real U, const Standard_Integer N, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColStd_Array1OfReal& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, Standard_Real& VN);
   
-  Standard_EXPORT static void DN (const Standard_Real U, const Standard_Integer N, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, gp_Vec& VN);
+  Standard_EXPORT static void DN (const Standard_Real U, const Standard_Integer N, const Standard_Integer Index, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, gp_Vec& VN);
   
-  Standard_EXPORT static void DN (const Standard_Real U, const Standard_Integer N, const Standard_Integer UIndex, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, gp_Vec2d& V);
+  Standard_EXPORT static void DN (const Standard_Real U, const Standard_Integer N, const Standard_Integer UIndex, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, gp_Vec2d& V);
   
   Standard_EXPORT static void DN (const Standard_Real U, const Standard_Integer N, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt& P, gp_Vec& VN);
   
@@ -1036,7 +1037,7 @@ public:
   //! constructed the SpanLength is to normalize
   //! the polynomial in the cache to avoid bad conditioning
   //! effects
-  Standard_EXPORT static void CacheD0 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt& Point);
+  Standard_EXPORT static void CacheD0 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt& Point);
   
   //! Perform the evaluation of the Bspline Basis
   //! and then multiplies by the weights
@@ -1050,17 +1051,17 @@ public:
   //! constructed the SpanLength is to normalize
   //! the polynomial in the cache to avoid bad conditioning
   //! effectsis just evaluates the current point
-  Standard_EXPORT static void CacheD0 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt2d& Point);
+  Standard_EXPORT static void CacheD0 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt2d& Point);
   
   //! Calls CacheD0 for Bezier  Curves Arrays computed with
   //! the method PolesCoefficients.
   //! Warning: To be used for Beziercurves ONLY!!!
-    static void CoefsD0 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt& Point);
+    static void CoefsD0 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt& Point);
   
   //! Calls CacheD0 for Bezier  Curves Arrays computed with
   //! the method PolesCoefficients.
   //! Warning: To be used for Beziercurves ONLY!!!
-    static void CoefsD0 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt2d& Point);
+    static void CoefsD0 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt2d& Point);
   
   //! Perform the evaluation of the of the cache
   //! the parameter must be normalized between
@@ -1073,7 +1074,7 @@ public:
   //! constructed the SpanLength is to normalize
   //! the polynomial in the cache to avoid bad conditioning
   //! effects
-  Standard_EXPORT static void CacheD1 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt& Point, gp_Vec& Vec);
+  Standard_EXPORT static void CacheD1 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt& Point, gp_Vec& Vec);
   
   //! Perform the evaluation of the Bspline Basis
   //! and then multiplies by the weights
@@ -1087,17 +1088,17 @@ public:
   //! constructed the SpanLength is to normalize
   //! the polynomial in the cache to avoid bad conditioning
   //! effectsis just evaluates the current point
-  Standard_EXPORT static void CacheD1 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt2d& Point, gp_Vec2d& Vec);
+  Standard_EXPORT static void CacheD1 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt2d& Point, gp_Vec2d& Vec);
   
   //! Calls CacheD1 for Bezier  Curves Arrays computed with
   //! the method PolesCoefficients.
   //! Warning: To be used for Beziercurves ONLY!!!
-    static void CoefsD1 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt& Point, gp_Vec& Vec);
+    static void CoefsD1 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt& Point, gp_Vec& Vec);
   
   //! Calls CacheD1 for Bezier  Curves Arrays computed with
   //! the method PolesCoefficients.
   //! Warning: To be used for Beziercurves ONLY!!!
-    static void CoefsD1 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt2d& Point, gp_Vec2d& Vec);
+    static void CoefsD1 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt2d& Point, gp_Vec2d& Vec);
   
   //! Perform the evaluation of the of the cache
   //! the parameter must be normalized between
@@ -1110,7 +1111,7 @@ public:
   //! constructed the SpanLength is to normalize
   //! the polynomial in the cache to avoid bad conditioning
   //! effects
-  Standard_EXPORT static void CacheD2 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt& Point, gp_Vec& Vec1, gp_Vec& Vec2);
+  Standard_EXPORT static void CacheD2 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt& Point, gp_Vec& Vec1, gp_Vec& Vec2);
   
   //! Perform the evaluation of the Bspline Basis
   //! and then multiplies by the weights
@@ -1124,17 +1125,17 @@ public:
   //! constructed the SpanLength is to normalize
   //! the polynomial in the cache to avoid bad conditioning
   //! effectsis just evaluates the current point
-  Standard_EXPORT static void CacheD2 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt2d& Point, gp_Vec2d& Vec1, gp_Vec2d& Vec2);
+  Standard_EXPORT static void CacheD2 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt2d& Point, gp_Vec2d& Vec1, gp_Vec2d& Vec2);
   
   //! Calls CacheD1 for Bezier  Curves Arrays computed with
   //! the method PolesCoefficients.
   //! Warning: To be used for Beziercurves ONLY!!!
-    static void CoefsD2 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt& Point, gp_Vec& Vec1, gp_Vec& Vec2);
+    static void CoefsD2 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt& Point, gp_Vec& Vec1, gp_Vec& Vec2);
   
   //! Calls CacheD1 for Bezier  Curves Arrays computed with
   //! the method PolesCoefficients.
   //! Warning: To be used for Beziercurves ONLY!!!
-    static void CoefsD2 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt2d& Point, gp_Vec2d& Vec1, gp_Vec2d& Vec2);
+    static void CoefsD2 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt2d& Point, gp_Vec2d& Vec1, gp_Vec2d& Vec2);
   
   //! Perform the evaluation of the of the cache
   //! the parameter must be normalized between
@@ -1147,7 +1148,7 @@ public:
   //! constructed the SpanLength is to normalize
   //! the polynomial in the cache to avoid bad conditioning
   //! effects
-  Standard_EXPORT static void CacheD3 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt& Point, gp_Vec& Vec1, gp_Vec& Vec2, gp_Vec& Vec3);
+  Standard_EXPORT static void CacheD3 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt& Point, gp_Vec& Vec1, gp_Vec& Vec2, gp_Vec& Vec3);
   
   //! Perform the evaluation of the Bspline Basis
   //! and then multiplies by the weights
@@ -1161,43 +1162,43 @@ public:
   //! constructed the SpanLength is to normalize
   //! the polynomial in the cache to avoid bad conditioning
   //! effectsis just evaluates the current point
-  Standard_EXPORT static void CacheD3 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt2d& Point, gp_Vec2d& Vec1, gp_Vec2d& Vec2, gp_Vec2d& Vec3);
+  Standard_EXPORT static void CacheD3 (const Standard_Real U, const Standard_Integer Degree, const Standard_Real CacheParameter, const Standard_Real SpanLenght, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt2d& Point, gp_Vec2d& Vec1, gp_Vec2d& Vec2, gp_Vec2d& Vec3);
   
   //! Calls CacheD1 for Bezier  Curves Arrays computed with
   //! the method PolesCoefficients.
   //! Warning: To be used for Beziercurves ONLY!!!
-    static void CoefsD3 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt& Point, gp_Vec& Vec1, gp_Vec& Vec2, gp_Vec& Vec3);
+    static void CoefsD3 (const Standard_Real U, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt& Point, gp_Vec& Vec1, gp_Vec& Vec2, gp_Vec& Vec3);
   
   //! Calls CacheD1 for Bezier  Curves Arrays computed with
   //! the method PolesCoefficients.
   //! Warning: To be used for Beziercurves ONLY!!!
-    static void CoefsD3 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, gp_Pnt2d& Point, gp_Vec2d& Vec1, gp_Vec2d& Vec2, gp_Vec2d& Vec3);
+    static void CoefsD3 (const Standard_Real U, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, gp_Pnt2d& Point, gp_Vec2d& Vec1, gp_Vec2d& Vec2, gp_Vec2d& Vec3);
   
   //! 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
-  Standard_EXPORT static void BuildCache (const Standard_Real U, const Standard_Real InverseOfSpanDomain, const Standard_Boolean PeriodicFlag, const Standard_Integer Degree, const TColStd_Array1OfReal& FlatKnots, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, TColgp_Array1OfPnt& CachePoles, TColStd_Array1OfReal& CacheWeights);
+  Standard_EXPORT static void BuildCache (const Standard_Real U, const Standard_Real InverseOfSpanDomain, const Standard_Boolean PeriodicFlag, const Standard_Integer Degree, const TColStd_Array1OfReal& FlatKnots, const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, TColgp_Array1OfPnt& CachePoles, TColStd_Array1OfReal* CacheWeights);
   
   //! 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
-  Standard_EXPORT static void BuildCache (const Standard_Real U, const Standard_Real InverseOfSpanDomain, const Standard_Boolean PeriodicFlag, const Standard_Integer Degree, const TColStd_Array1OfReal& FlatKnots, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, TColgp_Array1OfPnt2d& CachePoles, TColStd_Array1OfReal& CacheWeights);
+  Standard_EXPORT static void BuildCache (const Standard_Real U, const Standard_Real InverseOfSpanDomain, const Standard_Boolean PeriodicFlag, const Standard_Integer Degree, const TColStd_Array1OfReal& FlatKnots, const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, TColgp_Array1OfPnt2d& CachePoles, TColStd_Array1OfReal* CacheWeights);
   
   //! Perform the evaluation of the Taylor expansion
   //! of the Bspline normalized between 0 and 1.
   //! Structure of result optimized for BSplCLib_Cache.
-  Standard_EXPORT static void BuildCache (const Standard_Real theParameter, const Standard_Real theSpanDomain, const Standard_Boolean thePeriodicFlag, const Standard_Integer theDegree, const TColStd_Array1OfReal& theFlatKnots, const TColgp_Array1OfPnt& thePoles, const TColStd_Array1OfReal& theWeights, TColStd_Array2OfReal& theCacheArray);
+  Standard_EXPORT static void BuildCache (const Standard_Real theParameter, const Standard_Real theSpanDomain, const Standard_Boolean thePeriodicFlag, const Standard_Integer theDegree, const TColStd_Array1OfReal& theFlatKnots, const TColgp_Array1OfPnt& thePoles, const TColStd_Array1OfReal* theWeights, TColStd_Array2OfReal& theCacheArray);
   
   //! Perform the evaluation of the Taylor expansion
   //! of the Bspline normalized between 0 and 1.
   //! Structure of result optimized for BSplCLib_Cache.
-  Standard_EXPORT static void BuildCache (const Standard_Real theParameter, const Standard_Real theSpanDomain, const Standard_Boolean thePeriodicFlag, const Standard_Integer theDegree, const TColStd_Array1OfReal& theFlatKnots, const TColgp_Array1OfPnt2d& thePoles, const TColStd_Array1OfReal& theWeights, TColStd_Array2OfReal& theCacheArray);
+  Standard_EXPORT static void BuildCache (const Standard_Real theParameter, const Standard_Real theSpanDomain, const Standard_Boolean thePeriodicFlag, const Standard_Integer theDegree, const TColStd_Array1OfReal& theFlatKnots, const TColgp_Array1OfPnt2d& thePoles, const TColStd_Array1OfReal* theWeights, TColStd_Array2OfReal& theCacheArray);
   
     static void PolesCoefficients (const TColgp_Array1OfPnt2d& Poles, TColgp_Array1OfPnt2d& CachePoles);
   
-  Standard_EXPORT static void PolesCoefficients (const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, TColgp_Array1OfPnt2d& CachePoles, TColStd_Array1OfReal& CacheWeights);
+  Standard_EXPORT static void PolesCoefficients (const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, TColgp_Array1OfPnt2d& CachePoles, TColStd_Array1OfReal* CacheWeights);
   
     static void PolesCoefficients (const TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt& CachePoles);
   
@@ -1205,7 +1206,7 @@ public:
   //! evaluation  of the Taylor expansion for beziercurves
   //! at parameter 0.
   //! Warning: To be used for Beziercurves ONLY!!!
-  Standard_EXPORT static void PolesCoefficients (const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, TColgp_Array1OfPnt& CachePoles, TColStd_Array1OfReal& CacheWeights);
+  Standard_EXPORT static void PolesCoefficients (const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, TColgp_Array1OfPnt& CachePoles, TColStd_Array1OfReal* CacheWeights);
   
   //! Returns pointer to statically allocated array representing
   //! flat knots for bezier curve of the specified degree.
@@ -1437,7 +1438,7 @@ public:
   //! all u1 and u0 in the domain of the curve f(u)
   //! | u1 - u0 | < UTolerance and
   //! we have |f (u1) - f (u0)| < Tolerance3D
-  Standard_EXPORT static void Resolution (Standard_Real& PolesArray, const Standard_Integer ArrayDimension, const Standard_Integer NumPoles, const TColStd_Array1OfReal& Weights, const TColStd_Array1OfReal& FlatKnots, const Standard_Integer Degree, const Standard_Real Tolerance3D, Standard_Real& UTolerance);
+  Standard_EXPORT static void Resolution (Standard_Real& PolesArray, const Standard_Integer ArrayDimension, const Standard_Integer NumPoles, const TColStd_Array1OfReal* Weights, const TColStd_Array1OfReal& FlatKnots, const Standard_Integer Degree, const Standard_Real Tolerance3D, Standard_Real& UTolerance);
   
 
   //! given a tolerance in 3D space returns a
@@ -1445,7 +1446,7 @@ public:
   //! all u1 and u0 in the domain of the curve f(u)
   //! | u1 - u0 | < UTolerance and
   //! we have |f (u1) - f (u0)| < Tolerance3D
-  Standard_EXPORT static void Resolution (const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal& Weights, const Standard_Integer NumPoles, const TColStd_Array1OfReal& FlatKnots, const Standard_Integer Degree, const Standard_Real Tolerance3D, Standard_Real& UTolerance);
+  Standard_EXPORT static void Resolution (const TColgp_Array1OfPnt& Poles, const TColStd_Array1OfReal* Weights, const Standard_Integer NumPoles, const TColStd_Array1OfReal& FlatKnots, const Standard_Integer Degree, const Standard_Real Tolerance3D, Standard_Real& UTolerance);
   
 
   //! given a tolerance in 3D space returns a
@@ -1453,7 +1454,7 @@ public:
   //! all u1 and u0 in the domain of the curve f(u)
   //! | u1 - u0 | < UTolerance and
   //! we have |f (u1) - f (u0)| < Tolerance3D
-  Standard_EXPORT static void Resolution (const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal& Weights, const Standard_Integer NumPoles, const TColStd_Array1OfReal& FlatKnots, const Standard_Integer Degree, const Standard_Real Tolerance3D, Standard_Real& UTolerance);
+  Standard_EXPORT static void Resolution (const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, const Standard_Integer NumPoles, const TColStd_Array1OfReal& FlatKnots, const Standard_Integer Degree, const Standard_Real Tolerance3D, Standard_Real& UTolerance);
 
 
 
index aced0e5..0d40c38 100644 (file)
@@ -33,9 +33,9 @@ inline Standard_Integer BSplCLib::MaxDegree ()
 //purpose  : 
 //=======================================================================
 
-inline  TColStd_Array1OfReal&  BSplCLib::NoWeights()
+inline  TColStd_Array1OfReal*  BSplCLib::NoWeights()
 {
-  return (*((TColStd_Array1OfReal*) NULL));
+  return NULL;
 }
 
 //=======================================================================
@@ -43,9 +43,9 @@ inline  TColStd_Array1OfReal&  BSplCLib::NoWeights()
 //purpose  : 
 //=======================================================================
 
-inline  TColStd_Array1OfInteger&  BSplCLib::NoMults()
+inline  TColStd_Array1OfInteger*  BSplCLib::NoMults()
 {
-  return (*((TColStd_Array1OfInteger*) NULL));
+  return NULL;
 }
 
 //=======================================================================
@@ -55,7 +55,7 @@ inline  TColStd_Array1OfInteger&  BSplCLib::NoMults()
 
 inline void BSplCLib::CoefsD0(const Standard_Real         U,
                              const TColgp_Array1OfPnt&   Poles, 
-                             const TColStd_Array1OfReal& Weights,
+                             const TColStd_Array1OfReal* Weights,
                              gp_Pnt&                     P)
 {
   BSplCLib::CacheD0(U, Poles.Length() -1, 0., 1., Poles, Weights, P);
@@ -68,7 +68,7 @@ inline void BSplCLib::CoefsD0(const Standard_Real         U,
 
 inline void BSplCLib::CoefsD0(const Standard_Real         U,
                              const TColgp_Array1OfPnt2d& Poles, 
-                             const TColStd_Array1OfReal& Weights,
+                             const TColStd_Array1OfReal* Weights,
                              gp_Pnt2d&                   P)
 {
   BSplCLib::CacheD0(U, Poles.Length() -1, 0., 1., Poles, Weights, P);
@@ -81,7 +81,7 @@ inline void BSplCLib::CoefsD0(const Standard_Real         U,
 
 inline void BSplCLib::CoefsD1(const Standard_Real         U,
                              const TColgp_Array1OfPnt&   Poles, 
-                             const TColStd_Array1OfReal& Weights,
+                             const TColStd_Array1OfReal* Weights,
                              gp_Pnt&                     P,
                              gp_Vec&                     Vec)
 {
@@ -95,7 +95,7 @@ inline void BSplCLib::CoefsD1(const Standard_Real         U,
 
 inline void BSplCLib::CoefsD1(const Standard_Real         U,
                              const TColgp_Array1OfPnt2d& Poles, 
-                             const TColStd_Array1OfReal& Weights,
+                             const TColStd_Array1OfReal* Weights,
                              gp_Pnt2d&                   P,
                              gp_Vec2d&                   Vec)
 {
@@ -109,7 +109,7 @@ inline void BSplCLib::CoefsD1(const Standard_Real         U,
 
 inline void BSplCLib::CoefsD2(const Standard_Real         U,
                              const TColgp_Array1OfPnt&   Poles, 
-                             const TColStd_Array1OfReal& Weights,
+                             const TColStd_Array1OfReal* Weights,
                              gp_Pnt&                     P,
                              gp_Vec&                     Vec1,
                              gp_Vec&                     Vec2)
@@ -125,7 +125,7 @@ inline void BSplCLib::CoefsD2(const Standard_Real         U,
 
 inline void BSplCLib::CoefsD2(const Standard_Real         U,
                              const TColgp_Array1OfPnt2d& Poles, 
-                             const TColStd_Array1OfReal& Weights,
+                             const TColStd_Array1OfReal* Weights,
                              gp_Pnt2d&                   P,
                              gp_Vec2d&                   Vec1,
                              gp_Vec2d&                   Vec2)
@@ -141,7 +141,7 @@ inline void BSplCLib::CoefsD2(const Standard_Real         U,
 
 inline void BSplCLib::CoefsD3(const Standard_Real         U,
                              const TColgp_Array1OfPnt&   Poles, 
-                             const TColStd_Array1OfReal& Weights,
+                             const TColStd_Array1OfReal* Weights,
                              gp_Pnt&                     P,
                              gp_Vec&                     Vec1,
                              gp_Vec&                     Vec2,
@@ -158,7 +158,7 @@ inline void BSplCLib::CoefsD3(const Standard_Real         U,
 
 inline void BSplCLib::CoefsD3(const Standard_Real         U,
                              const TColgp_Array1OfPnt2d& Poles, 
-                             const TColStd_Array1OfReal& Weights,
+                             const TColStd_Array1OfReal* Weights,
                              gp_Pnt2d&                   P,
                              gp_Vec2d&                   Vec1,
                              gp_Vec2d&                   Vec2,
index 204755c..53f1675 100644 (file)
@@ -62,7 +62,7 @@ struct BSplCLib_DataContainer
 void  BSplCLib::BuildEval(const Standard_Integer         Degree,
                          const Standard_Integer         Index,
                          const TColStd_Array1OfReal&    Poles, 
-                         const TColStd_Array1OfReal&    Weights,
+                         const TColStd_Array1OfReal*    Weights,
                          Standard_Real&                 LP)
 {
   Standard_Integer PLower = Poles.Lower();
@@ -70,7 +70,7 @@ void  BSplCLib::BuildEval(const Standard_Integer         Degree,
   Standard_Integer i;
   Standard_Integer ip = PLower + Index - 1;
   Standard_Real w, *pole = &LP;
-  if (&Weights == NULL) {
+  if (Weights == NULL) {
     
     for (i = 0; i <= Degree; i++) {
       ip++;
@@ -84,7 +84,7 @@ void  BSplCLib::BuildEval(const Standard_Integer         Degree,
     for (i = 0; i <= Degree; i++) {
       ip++;
       if (ip > PUpper) ip = PLower;
-      pole[1] = w = Weights(ip);
+      pole[1] = w = (*Weights)(ip);
       pole[0] = Poles(ip) * w;
       pole += 2;
     }
@@ -105,9 +105,9 @@ static void PrepareEval
  const Standard_Integer         Degree,     
  const Standard_Boolean         Periodic,
  const TColStd_Array1OfReal&    Poles,  
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  const TColStd_Array1OfReal&    Knots,  
- const TColStd_Array1OfInteger& Mults,
+ const TColStd_Array1OfInteger* Mults,
  BSplCLib_DataContainer&        dc) 
 {                    
   // Set the Index
@@ -115,16 +115,16 @@ static void PrepareEval
   
   // make the knots
   BSplCLib::BuildKnots(Degree,index,Periodic,Knots,Mults,*dc.knots);
-  if (&Mults == NULL)
+  if (Mults == NULL)
     index -= Knots.Lower() + Degree;
   else
-    index = BSplCLib::PoleIndex(Degree,index,Periodic,Mults);
+    index = BSplCLib::PoleIndex(Degree,index,Periodic,*Mults);
   
   // check truly rational
-  rational = (&Weights != NULL);
+  rational = (Weights != NULL);
   if (rational) {
-    Standard_Integer WLower = Weights.Lower() + index;
-    rational = BSplCLib::IsRational(Weights, WLower, WLower + Degree);
+    Standard_Integer WLower = Weights->Lower() + index;
+    rational = BSplCLib::IsRational(*Weights, WLower, WLower + Degree);
   }
   
   // make the poles
@@ -149,9 +149,9 @@ void BSplCLib::D0
  const Standard_Integer         Degree,     
  const Standard_Boolean         Periodic,
  const TColStd_Array1OfReal&    Poles,  
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  const TColStd_Array1OfReal&    Knots,  
- const TColStd_Array1OfInteger& Mults,  
+ const TColStd_Array1OfInteger* Mults,  
  Standard_Real&                 P) 
 {                    
   Standard_Integer dim,index = Index;
@@ -175,9 +175,9 @@ void BSplCLib::D1
  const Standard_Integer         Degree,     
  const Standard_Boolean         Periodic,
  const TColStd_Array1OfReal&    Poles,  
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  const TColStd_Array1OfReal&    Knots,  
- const TColStd_Array1OfInteger& Mults,  
+ const TColStd_Array1OfInteger* Mults,  
  Standard_Real&                 P,
  Standard_Real&                 V) 
 {                    
@@ -207,9 +207,9 @@ void BSplCLib::D2
  const Standard_Integer         Degree,     
  const Standard_Boolean         Periodic,
  const TColStd_Array1OfReal&    Poles,  
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  const TColStd_Array1OfReal&    Knots,  
- const TColStd_Array1OfInteger& Mults,  
+ const TColStd_Array1OfInteger* Mults,  
  Standard_Real&                 P,
  Standard_Real&                 V1,
  Standard_Real&                 V2) 
@@ -242,9 +242,9 @@ void BSplCLib::D3
  const Standard_Integer         Degree,     
  const Standard_Boolean         Periodic,
  const TColStd_Array1OfReal&    Poles,  
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  const TColStd_Array1OfReal&    Knots,  
- const TColStd_Array1OfInteger& Mults,  
+ const TColStd_Array1OfInteger* Mults,  
  Standard_Real&                 P,
  Standard_Real&                 V1,
  Standard_Real&                 V2,
@@ -281,9 +281,9 @@ void BSplCLib::DN
  const Standard_Integer         Degree,     
  const Standard_Boolean         Periodic,
  const TColStd_Array1OfReal&    Poles,  
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  const TColStd_Array1OfReal&    Knots,  
- const TColStd_Array1OfInteger& Mults,  
+ const TColStd_Array1OfInteger* Mults,  
  Standard_Real&                 VN) 
 {                    
   Standard_Integer dim,index = Index;
index c781b55..5a38615 100644 (file)
@@ -54,9 +54,9 @@ class BSplCLib_BezierArrays
 
 void BSplCLib::IncreaseDegree(const Standard_Integer      NewDegree, 
                              const TColgp_Array1OfPnt&   Poles, 
-                             const TColStd_Array1OfReal& Weights, 
+                             const TColStd_Array1OfReal* Weights, 
                              TColgp_Array1OfPnt&         NewPoles, 
-                             TColStd_Array1OfReal&       NewWeights)
+                             TColStd_Array1OfReal*       NewWeights)
 {
   Standard_Integer deg = Poles.Length() - 1;
   BSplCLib_BezierArrays bzarr(deg);
@@ -72,9 +72,9 @@ void BSplCLib::IncreaseDegree(const Standard_Integer      NewDegree,
 
 void BSplCLib::IncreaseDegree(const Standard_Integer      NewDegree, 
                              const TColgp_Array1OfPnt2d& Poles, 
-                             const TColStd_Array1OfReal& Weights, 
+                             const TColStd_Array1OfReal* Weights, 
                              TColgp_Array1OfPnt2d&       NewPoles, 
-                             TColStd_Array1OfReal&       NewWeights)
+                             TColStd_Array1OfReal*       NewWeights)
 {
   Standard_Integer deg = Poles.Length() - 1;
   BSplCLib_BezierArrays bzarr(deg);
@@ -89,9 +89,9 @@ void BSplCLib::IncreaseDegree(const Standard_Integer      NewDegree,
 //=======================================================================
 
 void BSplCLib::PolesCoefficients(const TColgp_Array1OfPnt&   Poles, 
-                                const TColStd_Array1OfReal& Weights, 
+                                const TColStd_Array1OfReal* Weights, 
                                 TColgp_Array1OfPnt&         CachePoles, 
-                                TColStd_Array1OfReal&       CacheWeights)
+                                TColStd_Array1OfReal*       CacheWeights)
 {
   Standard_Integer deg  = Poles.Length() - 1;
   TColStd_Array1OfReal bidflatknots (FlatBezierKnots(deg), 1, 2*(deg+1));
@@ -105,9 +105,9 @@ void BSplCLib::PolesCoefficients(const TColgp_Array1OfPnt&   Poles,
 //=======================================================================
 
 void BSplCLib::PolesCoefficients(const TColgp_Array1OfPnt2d& Poles, 
-                                const TColStd_Array1OfReal& Weights, 
+                                const TColStd_Array1OfReal* Weights, 
                                 TColgp_Array1OfPnt2d&       CachePoles, 
-                                TColStd_Array1OfReal&       CacheWeights)
+                                TColStd_Array1OfReal*       CacheWeights)
 {
   Standard_Integer deg  = Poles.Length() - 1;
   TColStd_Array1OfReal bidflatknots (FlatBezierKnots(deg), 1, 2*(deg+1));
@@ -122,12 +122,12 @@ void BSplCLib::PolesCoefficients(const TColgp_Array1OfPnt2d& Poles,
 
 void BSplCLib::D0(const Standard_Real         U,
                  const TColgp_Array1OfPnt&   Poles, 
-                 const TColStd_Array1OfReal& Weights,
+                 const TColStd_Array1OfReal* Weights,
                  gp_Pnt&                     P)
 {
   Standard_Integer deg = Poles.Length() - 1;
   BSplCLib_BezierArrays bzarr(deg);
-  BSplCLib::D0(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults, P);
+  BSplCLib::D0(U, 1, deg, 0, Poles, Weights, bzarr.knots, &bzarr.mults, P);
 }
 
 //=======================================================================
@@ -137,12 +137,12 @@ void BSplCLib::D0(const Standard_Real         U,
 
 void BSplCLib::D0(const Standard_Real         U,
                  const TColgp_Array1OfPnt2d& Poles, 
-                 const TColStd_Array1OfReal& Weights,
+                 const TColStd_Array1OfReal* Weights,
                  gp_Pnt2d&                   P)
 {
   Standard_Integer deg = Poles.Length() - 1;
   BSplCLib_BezierArrays bzarr(deg);
-  BSplCLib::D0(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults, P);
+  BSplCLib::D0(U, 1, deg, 0, Poles, Weights, bzarr.knots, &bzarr.mults, P);
 }
 
 //=======================================================================
@@ -152,13 +152,13 @@ void BSplCLib::D0(const Standard_Real         U,
 
 void BSplCLib::D1(const Standard_Real         U,
                  const TColgp_Array1OfPnt&   Poles, 
-                 const TColStd_Array1OfReal& Weights,
+                 const TColStd_Array1OfReal* Weights,
                  gp_Pnt&                     P,
                  gp_Vec&                     V)
 {
   Standard_Integer deg = Poles.Length() - 1;
   BSplCLib_BezierArrays bzarr(deg);
-  BSplCLib::D1(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults, P, V);
+  BSplCLib::D1(U, 1, deg, 0, Poles, Weights, bzarr.knots, &bzarr.mults, P, V);
 }
 
 //=======================================================================
@@ -168,13 +168,13 @@ void BSplCLib::D1(const Standard_Real         U,
 
 void BSplCLib::D1(const Standard_Real         U,
                  const TColgp_Array1OfPnt2d& Poles, 
-                 const TColStd_Array1OfReal& Weights,
+                 const TColStd_Array1OfReal* Weights,
                  gp_Pnt2d&                   P,
                  gp_Vec2d&                   V)
 {
   Standard_Integer deg = Poles.Length() - 1;
   BSplCLib_BezierArrays bzarr(deg);
-  BSplCLib::D1(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults, P, V);
+  BSplCLib::D1(U, 1, deg, 0, Poles, Weights, bzarr.knots, &bzarr.mults, P, V);
 }
 
 
@@ -185,14 +185,14 @@ void BSplCLib::D1(const Standard_Real         U,
 
 void BSplCLib::D2(const Standard_Real         U,
                  const TColgp_Array1OfPnt&   Poles, 
-                 const TColStd_Array1OfReal& Weights,
+                 const TColStd_Array1OfReal* Weights,
                  gp_Pnt&                     P,
                  gp_Vec&                     V1,
                  gp_Vec&                     V2)
 {
   Standard_Integer deg = Poles.Length() - 1;
   BSplCLib_BezierArrays bzarr(deg);
-  BSplCLib::D2(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults, P, V1, V2);
+  BSplCLib::D2(U, 1, deg, 0, Poles, Weights, bzarr.knots, &bzarr.mults, P, V1, V2);
 }
 
 //=======================================================================
@@ -202,14 +202,14 @@ void BSplCLib::D2(const Standard_Real         U,
 
 void BSplCLib::D2(const Standard_Real         U,
                  const TColgp_Array1OfPnt2d& Poles, 
-                 const TColStd_Array1OfReal& Weights,
+                 const TColStd_Array1OfReal* Weights,
                  gp_Pnt2d&                   P,
                  gp_Vec2d&                   V1,
                  gp_Vec2d&                   V2)
 {
   Standard_Integer deg = Poles.Length() - 1;
   BSplCLib_BezierArrays bzarr(deg);
-  BSplCLib::D2(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults, P, V1, V2);
+  BSplCLib::D2(U, 1, deg, 0, Poles, Weights, bzarr.knots, &bzarr.mults, P, V1, V2);
 }
 
 
@@ -220,7 +220,7 @@ void BSplCLib::D2(const Standard_Real         U,
 
 void BSplCLib::D3(const Standard_Real         U,
                  const TColgp_Array1OfPnt&   Poles, 
-                 const TColStd_Array1OfReal& Weights,
+                 const TColStd_Array1OfReal* Weights,
                  gp_Pnt&                     P,
                  gp_Vec&                     V1,
                  gp_Vec&                     V2,
@@ -228,7 +228,7 @@ void BSplCLib::D3(const Standard_Real         U,
 {
   Standard_Integer deg = Poles.Length() - 1;
   BSplCLib_BezierArrays bzarr(deg);
-  BSplCLib::D3(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults, 
+  BSplCLib::D3(U, 1, deg, 0, Poles, Weights, bzarr.knots, &bzarr.mults, 
               P, V1, V2, V3);
 }
 
@@ -239,7 +239,7 @@ void BSplCLib::D3(const Standard_Real         U,
 
 void BSplCLib::D3(const Standard_Real         U,
                  const TColgp_Array1OfPnt2d& Poles, 
-                 const TColStd_Array1OfReal& Weights,
+                 const TColStd_Array1OfReal* Weights,
                  gp_Pnt2d&                   P,
                  gp_Vec2d&                   V1,
                  gp_Vec2d&                   V2,
@@ -247,7 +247,7 @@ void BSplCLib::D3(const Standard_Real         U,
 {
   Standard_Integer deg = Poles.Length() - 1;
   BSplCLib_BezierArrays bzarr(deg);
-  BSplCLib::D3(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults, 
+  BSplCLib::D3(U, 1, deg, 0, Poles, Weights, bzarr.knots, &bzarr.mults, 
               P, V1, V2, V3);
 }
 
index 6a7041b..c57a006 100644 (file)
@@ -45,7 +45,7 @@ BSplCLib_Cache::BSplCLib_Cache(const Standard_Integer&        theDegree,
                                const Standard_Boolean&        thePeriodic,
                                const TColStd_Array1OfReal&    theFlatKnots,
                                const TColgp_Array1OfPnt2d&    thePoles2d,
-                               const TColStd_Array1OfReal&    theWeights)
+                               const TColStd_Array1OfReal*    theWeights)
 {
   Standard_Real aCacheParam = theFlatKnots.Value(theFlatKnots.Lower() + theDegree);
   BuildCache(aCacheParam, theDegree, thePeriodic, 
@@ -56,7 +56,7 @@ BSplCLib_Cache::BSplCLib_Cache(const Standard_Integer&        theDegree,
                                const Standard_Boolean&        thePeriodic,
                                const TColStd_Array1OfReal&    theFlatKnots,
                                const TColgp_Array1OfPnt&      thePoles,
-                               const TColStd_Array1OfReal&    theWeights)
+                               const TColStd_Array1OfReal*    theWeights)
 {
   Standard_Real aCacheParam = theFlatKnots.Value(theFlatKnots.Lower() + theDegree);
   BuildCache(aCacheParam, theDegree, thePeriodic, 
@@ -99,7 +99,7 @@ void BSplCLib_Cache::BuildCache(const Standard_Real&           theParameter,
                                 const Standard_Boolean&        thePeriodic,
                                 const TColStd_Array1OfReal&    theFlatKnots,
                                 const TColgp_Array1OfPnt2d&    thePoles2d,
-                                const TColStd_Array1OfReal&    theWeights)
+                                const TColStd_Array1OfReal*    theWeights)
 {
   // Normalize theParameter for periodical B-splines
   Standard_Real aNewParam = theParameter;
@@ -113,7 +113,7 @@ void BSplCLib_Cache::BuildCache(const Standard_Real&           theParameter,
     myFlatKnots.Nullify();
 
   // Change the size of cached data if needed
-  myIsRational = (&theWeights != NULL);
+  myIsRational = (theWeights != NULL);
   Standard_Integer aPWColNumber = myIsRational ? 3 : 2;
   if (theDegree > myDegree)
     myPolesWeights = new TColStd_HArray2OfReal(1, theDegree + 1, 1, aPWColNumber);
@@ -137,7 +137,7 @@ void BSplCLib_Cache::BuildCache(const Standard_Real&           theParameter,
                                 const Standard_Boolean&        thePeriodic,
                                 const TColStd_Array1OfReal&    theFlatKnots,
                                 const TColgp_Array1OfPnt&      thePoles,
-                                const TColStd_Array1OfReal&    theWeights)
+                                const TColStd_Array1OfReal*    theWeights)
 {
   // Create list of knots with repetitions and normalize theParameter for periodical B-splines
   Standard_Real aNewParam = theParameter;
@@ -151,7 +151,7 @@ void BSplCLib_Cache::BuildCache(const Standard_Real&           theParameter,
     myFlatKnots.Nullify();
 
   // Change the size of cached data if needed
-  myIsRational = (&theWeights != NULL);
+  myIsRational = (theWeights != NULL);
   Standard_Integer aPWColNumber = myIsRational ? 4 : 3;
   if (theDegree > myDegree)
     myPolesWeights = new TColStd_HArray2OfReal(1, theDegree + 1, 1, aPWColNumber);
index 7ff2a52..c50a1a6 100644 (file)
 #include <TColgp_Array1OfPnt.hxx>
 #include <TColgp_Array1OfPnt2d.hxx>
 
-#ifndef NOWEIGHTS_CURVE
-#define NOWEIGHTS_CURVE (*((TColStd_Array1OfReal*) NULL))
-#endif
-
 //! \brief A cache class for B-spline curves.
 //!
 //! Defines all data, that can be cached on a span of B-spline curve.
@@ -54,7 +50,7 @@ public:
                                  const Standard_Boolean&        thePeriodic,
                                  const TColStd_Array1OfReal&    theFlatKnots,
                                  const TColgp_Array1OfPnt2d&    thePoles2d,
-                                 const TColStd_Array1OfReal&    theWeights = NOWEIGHTS_CURVE);
+                                 const TColStd_Array1OfReal*    theWeights = NULL);
   //! Constructor for caching of 3D curves
   //! \param theDegree     degree of the B-spline
   //! \param thePeriodic   identify the B-spline is periodic
@@ -65,7 +61,7 @@ public:
                                  const Standard_Boolean&        thePeriodic,
                                  const TColStd_Array1OfReal&    theFlatKnots,
                                  const TColgp_Array1OfPnt&      thePoles,
-                                 const TColStd_Array1OfReal&    theWeights = NOWEIGHTS_CURVE);
+                                 const TColStd_Array1OfReal*    theWeights = NULL);
 
   //! Verifies validity of the cache using flat parameter of the point
   //! \param theParameter parameter of the point placed in the span
@@ -83,7 +79,7 @@ public:
                                   const Standard_Boolean&        thePeriodic,
                                   const TColStd_Array1OfReal&    theFlatKnots,
                                   const TColgp_Array1OfPnt2d&    thePoles2d,
-                                  const TColStd_Array1OfReal&    theWeights = NOWEIGHTS_CURVE);
+                                  const TColStd_Array1OfReal*    theWeights = NULL);
   //! Recomputes the cache data for 3D curves. Does not verify validity of the cache
   //! \param theParameter  the value on the knot's axis to identify the span
   //! \param theDegree     degree of the B-spline
@@ -96,7 +92,7 @@ public:
                                   const Standard_Boolean&        thePeriodic,
                                   const TColStd_Array1OfReal&    theFlatKnots,
                                   const TColgp_Array1OfPnt&      thePoles,
-                                  const TColStd_Array1OfReal&    theWeights = NOWEIGHTS_CURVE);
+                                  const TColStd_Array1OfReal*    theWeights = NULL);
 
   //! Calculates the point on B-spline in the selected point
   //! \param[in]  theParameter parameter of calculation of the value
index f35fdd5..3a4abb0 100644 (file)
@@ -84,16 +84,16 @@ Standard_Boolean BSplCLib::RemoveKnot
  const Standard_Integer         Degree,  
  const Standard_Boolean         Periodic,
  const Array1OfPoints&          Poles,
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  const TColStd_Array1OfReal&    Knots,  
  const TColStd_Array1OfInteger& Mults,
  Array1OfPoints&                NewPoles,   
- TColStd_Array1OfReal&          NewWeights,
+ TColStd_Array1OfReal*          NewWeights,
  TColStd_Array1OfReal&          NewKnots,  
  TColStd_Array1OfInteger&       NewMults,
  const Standard_Real            Tolerance) 
 {
-  Standard_Boolean rational = &Weights  != NULL;
+  Standard_Boolean rational = Weights  != NULL;
   Standard_Integer dim;
   dim = Dimension_gen;
   if (rational) dim++;
@@ -101,14 +101,14 @@ Standard_Boolean BSplCLib::RemoveKnot
   TColStd_Array1OfReal poles(1,dim*Poles.Length());
   TColStd_Array1OfReal newpoles(1,dim*NewPoles.Length());
   
-  if (rational) PLib::SetPoles(Poles,Weights,poles);
+  if (rational) PLib::SetPoles(Poles,*Weights,poles);
   else          PLib::SetPoles(Poles,poles);
   
   if (!RemoveKnot(Index,Mult,Degree,Periodic,dim,
                  poles,Knots,Mults,newpoles,NewKnots,NewMults,Tolerance))
     return Standard_False;
 
-  if (rational) PLib::GetPoles(newpoles,NewPoles,NewWeights);
+  if (rational) PLib::GetPoles(newpoles,NewPoles,*NewWeights);
   else          PLib::GetPoles(newpoles,NewPoles);
   return Standard_True;
 }
@@ -122,19 +122,19 @@ void BSplCLib::InsertKnots
 (const Standard_Integer         Degree, 
  const Standard_Boolean         Periodic,
  const Array1OfPoints&          Poles,  
- const TColStd_Array1OfReal&    Weights,  
+ const TColStd_Array1OfReal*    Weights,  
  const TColStd_Array1OfReal&    Knots,    
  const TColStd_Array1OfInteger& Mults, 
  const TColStd_Array1OfReal&    AddKnots,    
- const TColStd_Array1OfInteger& AddMults, 
+ const TColStd_Array1OfInteger* AddMults, 
  Array1OfPoints&                NewPoles,     
- TColStd_Array1OfReal&          NewWeights,
+ TColStd_Array1OfReal*          NewWeights,
  TColStd_Array1OfReal&          NewKnots,    
  TColStd_Array1OfInteger&       NewMults, 
  const Standard_Real            Epsilon,
  const Standard_Boolean         Add) 
 {
-  Standard_Boolean rational = &Weights  != NULL;
+  Standard_Boolean rational = Weights  != NULL;
   Standard_Integer dim;
   dim = Dimension_gen;
   if (rational) dim++;
@@ -142,13 +142,13 @@ void BSplCLib::InsertKnots
   TColStd_Array1OfReal poles(1,dim*Poles.Length());
   TColStd_Array1OfReal newpoles(1,dim*NewPoles.Length());
   
-  if (rational) PLib::SetPoles(Poles,Weights,poles);
+  if (rational) PLib::SetPoles(Poles,*Weights,poles);
   else          PLib::SetPoles(Poles,poles);
   
   InsertKnots(Degree,Periodic,dim,poles,Knots,Mults,
              AddKnots,AddMults,newpoles,NewKnots,NewMults,Epsilon,Add);
   
-  if (rational) PLib::GetPoles(newpoles,NewPoles,NewWeights);
+  if (rational) PLib::GetPoles(newpoles,NewPoles,*NewWeights);
   else          PLib::GetPoles(newpoles,NewPoles);
 }
 
@@ -163,11 +163,11 @@ void  BSplCLib::InsertKnot(const Standard_Integer ,
                           const Standard_Integer Degree, 
                           const Standard_Boolean Periodic, 
                           const Array1OfPoints& Poles, 
-                          const TColStd_Array1OfReal& Weights, 
+                          const TColStd_Array1OfReal* Weights, 
                           const TColStd_Array1OfReal& Knots, 
                           const TColStd_Array1OfInteger& Mults, 
                           Array1OfPoints& NewPoles, 
-                          TColStd_Array1OfReal& NewWeights)
+                          TColStd_Array1OfReal* NewWeights)
 {
   TColStd_Array1OfReal k(1,1);
   k(1) = U;
@@ -176,7 +176,7 @@ void  BSplCLib::InsertKnot(const Standard_Integer ,
   TColStd_Array1OfReal    nk(1,Knots.Length()+1);
   TColStd_Array1OfInteger nm(1,Knots.Length()+1);
   InsertKnots(Degree,Periodic,Poles,Weights,Knots,Mults,
-             k,m,NewPoles,NewWeights,nk,nm,Epsilon(U));
+             k,&m,NewPoles,NewWeights,nk,nm,Epsilon(U));
 }
 
 //=======================================================================
@@ -189,11 +189,11 @@ void  BSplCLib::RaiseMultiplicity(const Standard_Integer KnotIndex,
                                  const Standard_Integer Degree, 
                                  const Standard_Boolean Periodic,
                                  const Array1OfPoints& Poles,
-                                 const TColStd_Array1OfReal& Weights, 
+                                 const TColStd_Array1OfReal* Weights, 
                                  const TColStd_Array1OfReal& Knots, 
                                  const TColStd_Array1OfInteger& Mults, 
                                  Array1OfPoints& NewPoles,
-                                 TColStd_Array1OfReal& NewWeights)
+                                 TColStd_Array1OfReal* NewWeights)
 {
   TColStd_Array1OfReal k(1,1);
   k(1) = Knots(KnotIndex);
@@ -202,7 +202,7 @@ void  BSplCLib::RaiseMultiplicity(const Standard_Integer KnotIndex,
   TColStd_Array1OfReal    nk(1,Knots.Length());
   TColStd_Array1OfInteger nm(1,Knots.Length());
   InsertKnots(Degree,Periodic,Poles,Weights,Knots,Mults,
-             k,m,NewPoles,NewWeights,nk,nm,Epsilon(k(1)));
+             k,&m,NewPoles,NewWeights,nk,nm,Epsilon(k(1)));
 }
 
 //=======================================================================
@@ -215,15 +215,15 @@ void BSplCLib::IncreaseDegree
  const Standard_Integer          NewDegree,
  const Standard_Boolean          Periodic,
  const Array1OfPoints&           Poles,
- const TColStd_Array1OfReal&     Weights,
+ const TColStd_Array1OfReal*     Weights,
  const TColStd_Array1OfReal&     Knots,
  const TColStd_Array1OfInteger&  Mults,
  Array1OfPoints&                 NewPoles,
- TColStd_Array1OfReal&           NewWeights,
+ TColStd_Array1OfReal*           NewWeights,
  TColStd_Array1OfReal&           NewKnots,
  TColStd_Array1OfInteger&        NewMults) 
 {
-  Standard_Boolean rational = &Weights  != NULL;
+  Standard_Boolean rational = Weights  != NULL;
   Standard_Integer dim;
   dim = Dimension_gen;
   if (rational) dim++;
@@ -231,13 +231,13 @@ void BSplCLib::IncreaseDegree
   TColStd_Array1OfReal poles(1,dim*Poles.Length());
   TColStd_Array1OfReal newpoles(1,dim*NewPoles.Length());
   
-  if (rational) PLib::SetPoles(Poles,Weights,poles);
+  if (rational) PLib::SetPoles(Poles,*Weights,poles);
   else          PLib::SetPoles(Poles,poles);
   
   IncreaseDegree(Degree,NewDegree,Periodic,dim,poles,Knots,Mults,
                 newpoles,NewKnots,NewMults);
   
-  if (rational) PLib::GetPoles(newpoles,NewPoles,NewWeights);
+  if (rational) PLib::GetPoles(newpoles,NewPoles,*NewWeights);
   else          PLib::GetPoles(newpoles,NewPoles);
 }
 
@@ -251,13 +251,13 @@ void  BSplCLib::Unperiodize
  const TColStd_Array1OfInteger& Mults,
  const TColStd_Array1OfReal&    Knots,
  const Array1OfPoints&          Poles,
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  TColStd_Array1OfInteger& NewMults,
  TColStd_Array1OfReal&    NewKnots,
  Array1OfPoints&          NewPoles,
- TColStd_Array1OfReal&    NewWeights)
+ TColStd_Array1OfReal*    NewWeights)
 {
-  Standard_Boolean rational = &Weights  != NULL;
+  Standard_Boolean rational = Weights  != NULL;
   Standard_Integer dim;
   dim = Dimension_gen;
   if (rational) dim++;
@@ -265,13 +265,13 @@ void  BSplCLib::Unperiodize
   TColStd_Array1OfReal poles(1,dim*Poles.Length());
   TColStd_Array1OfReal newpoles(1,dim*NewPoles.Length());
   
-  if (rational) PLib::SetPoles(Poles,Weights,poles);
+  if (rational) PLib::SetPoles(Poles,*Weights,poles);
   else          PLib::SetPoles(Poles,poles);
   
   Unperiodize(Degree, dim, Mults, Knots, poles,
              NewMults,NewKnots, newpoles);
   
-  if (rational) PLib::GetPoles(newpoles,NewPoles,NewWeights);
+  if (rational) PLib::GetPoles(newpoles,NewPoles,*NewWeights);
   else          PLib::GetPoles(newpoles,NewPoles);
 }
 
@@ -285,15 +285,15 @@ void BSplCLib::Trimming(const Standard_Integer         Degree,
                        const TColStd_Array1OfReal&    Knots, 
                        const TColStd_Array1OfInteger& Mults,
                        const Array1OfPoints&          Poles,
-                       const TColStd_Array1OfReal&    Weights, 
+                       const TColStd_Array1OfReal*    Weights, 
                        const Standard_Real            U1,
                        const Standard_Real            U2, 
                        TColStd_Array1OfReal&    NewKnots,
                        TColStd_Array1OfInteger& NewMults,
                        Array1OfPoints&          NewPoles,
-                       TColStd_Array1OfReal&    NewWeights)
+                       TColStd_Array1OfReal*    NewWeights)
 {
-  Standard_Boolean rational = &Weights  != NULL;
+  Standard_Boolean rational = Weights  != NULL;
   Standard_Integer dim;
   dim = Dimension_gen;
   if (rational) dim++;
@@ -301,13 +301,13 @@ void BSplCLib::Trimming(const Standard_Integer         Degree,
   TColStd_Array1OfReal poles(1,dim*Poles.Length());
   TColStd_Array1OfReal newpoles(1,dim*NewPoles.Length());
   
-  if (rational) PLib::SetPoles(Poles,Weights,poles);
+  if (rational) PLib::SetPoles(Poles,*Weights,poles);
   else          PLib::SetPoles(Poles,poles);
   
   Trimming(Degree, Periodic, dim, Knots, Mults, poles, U1, U2,
           NewKnots, NewMults, newpoles);
   
-  if (rational) PLib::GetPoles(newpoles,NewPoles,NewWeights);
+  if (rational) PLib::GetPoles(newpoles,NewPoles,*NewWeights);
   else          PLib::GetPoles(newpoles,NewPoles);
 }
 
@@ -332,7 +332,7 @@ void BSplCLib::Trimming(const Standard_Integer         Degree,
 void  BSplCLib::BuildEval(const Standard_Integer         Degree,
                          const Standard_Integer         Index,
                          const Array1OfPoints&          Poles, 
-                         const TColStd_Array1OfReal&    Weights,
+                         const TColStd_Array1OfReal*    Weights,
                          Standard_Real&                 LP)
 {
   Standard_Real w, *pole = &LP;
@@ -340,7 +340,7 @@ void  BSplCLib::BuildEval(const Standard_Integer         Degree,
   Standard_Integer PUpper = Poles.Upper();
   Standard_Integer i;
   Standard_Integer ip = PLower + Index - 1;
-  if (&Weights == NULL) {
+  if (Weights == NULL) {
     for (i = 0; i <= Degree; i++) {
       ip++;
       if (ip > PUpper) ip = PLower;
@@ -354,7 +354,7 @@ void  BSplCLib::BuildEval(const Standard_Integer         Degree,
       ip++;
       if (ip > PUpper) ip = PLower;
       const Point& P = Poles(ip);
-      pole[Dimension_gen] = w = Weights(ip);
+      pole[Dimension_gen] = w = (*Weights)(ip);
       PointToCoords (pole, P, * w);
       pole += Dimension_gen + 1;
     }
@@ -375,9 +375,9 @@ static void PrepareEval
  const Standard_Integer         Degree,     
  const Standard_Boolean         Periodic,
  const Array1OfPoints&          Poles,  
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  const TColStd_Array1OfReal&    Knots,  
- const TColStd_Array1OfInteger& Mults,
+ const TColStd_Array1OfInteger* Mults,
  BSplCLib_DataContainer& dc) 
 {
   // Set the Index
@@ -385,16 +385,16 @@ static void PrepareEval
 
   // make the knots
   BSplCLib::BuildKnots(Degree,index,Periodic,Knots,Mults,*dc.knots);
-  if (&Mults == NULL)
+  if (Mults == NULL)
     index -= Knots.Lower() + Degree;
   else
-    index = BSplCLib::PoleIndex(Degree,index,Periodic,Mults);
+    index = BSplCLib::PoleIndex(Degree,index,Periodic,*Mults);
   
   // check truly rational
-  rational = (&Weights != NULL);
+  rational = (Weights != NULL);
   if (rational) {
-    Standard_Integer WLower = Weights.Lower() + index;
-    rational = BSplCLib::IsRational(Weights, WLower, WLower + Degree);
+    Standard_Integer WLower = Weights->Lower() + index;
+    rational = BSplCLib::IsRational(*Weights, WLower, WLower + Degree);
   }
   
   // make the poles
@@ -419,9 +419,9 @@ void BSplCLib::D0
  const Standard_Integer         Degree,     
  const Standard_Boolean         Periodic,
  const Array1OfPoints&          Poles,  
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  const TColStd_Array1OfReal&    Knots,  
- const TColStd_Array1OfInteger& Mults,  
+ const TColStd_Array1OfInteger* Mults,  
  Point&                         P) 
 {                    
 //  Standard_Integer k,dim,index = Index;
@@ -451,9 +451,9 @@ void BSplCLib::D1
  const Standard_Integer         Degree,     
  const Standard_Boolean         Periodic,
  const Array1OfPoints&          Poles,  
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  const TColStd_Array1OfReal&    Knots,  
- const TColStd_Array1OfInteger& Mults,  
+ const TColStd_Array1OfInteger* Mults,  
  Point&                         P,
  Vector&                        V) 
 {                    
@@ -484,9 +484,9 @@ void BSplCLib::D2
  const Standard_Integer         Degree,     
  const Standard_Boolean         Periodic,
  const Array1OfPoints&          Poles,  
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  const TColStd_Array1OfReal&    Knots,  
- const TColStd_Array1OfInteger& Mults,  
+ const TColStd_Array1OfInteger* Mults,  
  Point&                         P,
  Vector&                        V1,
  Vector&                        V2) 
@@ -522,9 +522,9 @@ void BSplCLib::D3
  const Standard_Integer         Degree,     
  const Standard_Boolean         Periodic,
  const Array1OfPoints&          Poles,  
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  const TColStd_Array1OfReal&    Knots,  
- const TColStd_Array1OfInteger& Mults,  
+ const TColStd_Array1OfInteger* Mults,  
  Point&                         P,
  Vector&                        V1,
  Vector&                        V2,
@@ -566,9 +566,9 @@ void BSplCLib::DN
  const Standard_Integer         Degree,     
  const Standard_Boolean         Periodic,
  const Array1OfPoints&          Poles,  
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  const TColStd_Array1OfReal&    Knots,  
- const TColStd_Array1OfInteger& Mults,  
+ const TColStd_Array1OfInteger* Mults,  
  Vector&                        VN) 
 {                    
   Standard_Integer dim,index = Index;
@@ -724,7 +724,7 @@ void  BSplCLib::CacheD0(const Standard_Real                  Parameter,
                        const  Standard_Real                  CacheParameter,
                        const  Standard_Real                  SpanLenght,
                        const  Array1OfPoints&                PolesArray,
-                       const  TColStd_Array1OfReal&          WeightsArray,
+                       const  TColStd_Array1OfReal*          WeightsArray,
                        Point&                                aPoint)
 {
   //
@@ -742,9 +742,10 @@ void  BSplCLib::CacheD0(const Standard_Real                  Parameter,
                       Degree * Dimension_gen,
                       PArray[0],
                       myPoint[0]) ;
-  if (&WeightsArray != NULL) {
+  if (WeightsArray != NULL) {
+    const TColStd_Array1OfReal& refWeights = *WeightsArray;
     Standard_Real *
-      WArray = (Standard_Real *) &WeightsArray(WeightsArray.Lower()) ;
+      WArray = (Standard_Real *) &refWeights(refWeights.Lower()) ;
     PLib::NoDerivativeEvalPolynomial(NewParameter,
                         Degree,
                         1,
@@ -767,7 +768,7 @@ void  BSplCLib::CacheD1(const Standard_Real                  Parameter,
                         const  Standard_Real                  CacheParameter,
                         const  Standard_Real                  SpanLenght,
                        const  Array1OfPoints&                PolesArray,
-                       const  TColStd_Array1OfReal&          WeightsArray,
+                       const  TColStd_Array1OfReal*          WeightsArray,
                        Point&                                aPoint,
                        Vector&                               aVector) 
 {
@@ -799,9 +800,10 @@ void  BSplCLib::CacheD1(const Standard_Real                  Parameter,
 
   ModifyCoords (LocalPDerivatives + Dimension_gen, /= SpanLenght);
   
-  if (&WeightsArray != NULL) {
+  if (WeightsArray != NULL) {
+    const TColStd_Array1OfReal& refWeights = *WeightsArray;
     Standard_Real *
-      WArray = (Standard_Real *) &WeightsArray(WeightsArray.Lower()) ;
+      WArray = (Standard_Real *) &refWeights(refWeights.Lower()) ;
     PLib::EvalPolynomial(NewParameter,
                         1,
                         Degree,
@@ -835,7 +837,7 @@ void  BSplCLib::CacheD2(const Standard_Real                  Parameter,
                        const  Standard_Real                  CacheParameter,
                        const  Standard_Real                  SpanLenght,
                        const  Array1OfPoints&                PolesArray,
-                       const  TColStd_Array1OfReal&          WeightsArray,
+                       const  TColStd_Array1OfReal*          WeightsArray,
                        Point&                                aPoint,
                        Vector&                               aVector1, 
                        Vector&                               aVector2) 
@@ -879,9 +881,10 @@ void  BSplCLib::CacheD2(const Standard_Real                  Parameter,
     Index += Dimension_gen;
   }
 
-  if (&WeightsArray != NULL) {
+  if (WeightsArray != NULL) {
+    const TColStd_Array1OfReal& refWeights = *WeightsArray;
     Standard_Real *
-      WArray = (Standard_Real *) &WeightsArray(WeightsArray.Lower()) ;
+      WArray = (Standard_Real *) &refWeights(refWeights.Lower()) ;
     
     PLib::EvalPolynomial(NewParameter,
                         2,
@@ -925,7 +928,7 @@ void  BSplCLib::CacheD3(const Standard_Real                  Parameter,
                        const  Standard_Real                  CacheParameter,
                        const  Standard_Real                  SpanLenght,
                        const  Array1OfPoints&                PolesArray,
-                       const  TColStd_Array1OfReal&          WeightsArray,
+                       const  TColStd_Array1OfReal*          WeightsArray,
                        Point&                                aPoint,
                        Vector&                               aVector1, 
                        Vector&                               aVector2,
@@ -972,9 +975,10 @@ void  BSplCLib::CacheD3(const Standard_Real                  Parameter,
     Index  += Dimension_gen;
   }
   
-  if (&WeightsArray != NULL) {
+  if (WeightsArray != NULL) {
+    const TColStd_Array1OfReal& refWeights = *WeightsArray;
     Standard_Real *
-      WArray = (Standard_Real *) &WeightsArray(WeightsArray.Lower()) ;
+      WArray = (Standard_Real *) &refWeights(refWeights.Lower()) ;
     
     PLib::EvalPolynomial(NewParameter,
                         3,
@@ -1023,9 +1027,9 @@ void BSplCLib::BuildCache
  const Standard_Integer         Degree,     
  const TColStd_Array1OfReal&    FlatKnots,   
  const Array1OfPoints&          Poles,  
- const TColStd_Array1OfReal&    Weights,
+ const TColStd_Array1OfReal*    Weights,
  Array1OfPoints&                CachePoles,
- TColStd_Array1OfReal&          CacheWeights)
+ TColStd_Array1OfReal*          CacheWeights)
 {                    
   Standard_Integer ii,
   Dimension,
@@ -1069,7 +1073,7 @@ void BSplCLib::BuildCache
     LocalIndex = Dimension_gen;
     LocalValue = 1.0e0 ;      
     for (ii = 1 ; ii <= Degree + 1 ; ii++) {
-      CacheWeights(ii) = dc.poles[LocalIndex] * LocalValue ;
+      (*CacheWeights)(ii) = dc.poles[LocalIndex] * LocalValue ;
       LocalIndex += Dimension_gen + 1;
       LocalValue *= SpanDomain / (Standard_Real) ii ;
     }
@@ -1082,10 +1086,10 @@ void BSplCLib::BuildCache
       LocalValue *= SpanDomain / (Standard_Real) ii ;
     }
 
-    if (&Weights != NULL) { 
+    if (Weights != NULL) { 
       for (ii = 1 ; ii <= Degree + 1 ; ii++)
-       CacheWeights(ii) = 0.0e0 ;
-      CacheWeights(1) = 1.0e0 ;
+       (*CacheWeights)(ii) = 0.0e0 ;
+      (*CacheWeights)(1) = 1.0e0 ;
     }
   }
 }
@@ -1096,7 +1100,7 @@ void BSplCLib::BuildCache(const Standard_Real          theParameter,
                           const Standard_Integer       theDegree,
                           const TColStd_Array1OfReal&  theFlatKnots,
                           const Array1OfPoints&        thePoles,
-                          const TColStd_Array1OfReal&  theWeights,
+                          const TColStd_Array1OfReal*  theWeights,
                                 TColStd_Array2OfReal&  theCacheArray)
 {
   Standard_Real    aParam = theParameter;
@@ -1123,7 +1127,7 @@ void BSplCLib::BuildCache(const Standard_Real          theParameter,
   //
 
   Standard_Integer aCacheShift = // helps to store weights when PrepareEval did not found that the curve is locally polynomial
-    (&theWeights != NULL && !isRational) ? aDimension + 1 : aDimension;
+    (theWeights != NULL && !isRational) ? aDimension + 1 : aDimension;
 
   BSplCLib::Bohm(aParam, theDegree, theDegree, *dc.knots, aDimension, *dc.poles);
 
@@ -1388,7 +1392,7 @@ void BSplCLib::MovePointAndTangent (const Standard_Real      U,
 //=======================================================================
 
 void BSplCLib::Resolution(const Array1OfPoints&          Poles,  
-                         const TColStd_Array1OfReal&    Weights,
+                         const TColStd_Array1OfReal*    Weights,
                          const Standard_Integer         NumPoles,
                          const TColStd_Array1OfReal&    FlatKnots, 
                          const Standard_Integer         Degree,
index 4feae65..877e17b 100644 (file)
@@ -272,11 +272,11 @@ static Standard_Boolean  PrepareEval (const Standard_Real            U,
                                       const Standard_Boolean         UPer,
                                       const Standard_Boolean         VPer,
                                       const TColgp_Array2OfPnt&      Poles,
-                                      const TColStd_Array2OfReal&    Weights,
+                                      const TColStd_Array2OfReal*    Weights,
                                       const TColStd_Array1OfReal&    UKnots,
                                       const TColStd_Array1OfReal&    VKnots,
-                                      const TColStd_Array1OfInteger& UMults,
-                                      const TColStd_Array1OfInteger& VMults,
+                                      const TColStd_Array1OfInteger* UMults,
+                                      const TColStd_Array1OfInteger* VMults,
                                       Standard_Real& u1,     // first  parameter to use
                                       Standard_Real& u2,     // second parameter to use
                                       Standard_Integer& d1,  // first degree
@@ -311,15 +311,15 @@ static Standard_Boolean  PrepareEval (const Standard_Real            U,
     BSplCLib::BuildKnots(UDegree,uindex,UPer,UKnots,UMults,*dc.knots1);
     BSplCLib::BuildKnots(VDegree,vindex,VPer,VKnots,VMults,*dc.knots2);
     
-    if (&UMults == NULL)
+    if (UMults == NULL)
       uindex -= UKLower + UDegree;
     else
-      uindex  = BSplCLib::PoleIndex(UDegree,uindex,UPer,UMults);
+      uindex  = BSplCLib::PoleIndex(UDegree,uindex,UPer,*UMults);
 
-    if (&VMults == NULL)
+    if (VMults == NULL)
       vindex -= VKLower + VDegree;
     else
-      vindex  = BSplCLib::PoleIndex(VDegree,vindex,VPer,VMults);
+      vindex  = BSplCLib::PoleIndex(VDegree,vindex,VPer,*VMults);
 
     // get the poles
     Standard_Integer i,j,ip,jp;
@@ -341,7 +341,7 @@ static Standard_Boolean  PrepareEval (const Standard_Real            U,
       if(ip < PLowerRow)       ip = PUpperRow;
       if(jp < PLowerCol)       jp = PUpperCol;
       
-      w  = Weights.Value(ip,jp);
+      w  = Weights->Value(ip,jp);
       Standard_Real eps = Epsilon(w);
       Standard_Real dw;
 
@@ -354,7 +354,7 @@ static Standard_Boolean  PrepareEval (const Standard_Real            U,
 
         for (j = 0; j <= VDegree && !rational; j++)
           {
-          dw = Weights.Value(ip,jp) - w;
+          dw = Weights->Value(ip,jp) - w;
           if (dw < 0)
             dw = - dw;
 
@@ -392,7 +392,7 @@ static Standard_Boolean  PrepareEval (const Standard_Real            U,
         for (j = 0; j <= d2; j++)
           {
           const gp_Pnt& P = Poles  .Value(ip,jp);
-          pole[3] = w     = Weights.Value(ip,jp);
+          pole[3] = w     = Weights->Value(ip,jp);
           pole[0] = P.X() * w;
           pole[1] = P.Y() * w;
           pole[2] = P.Z() * w;
@@ -462,15 +462,15 @@ static Standard_Boolean  PrepareEval (const Standard_Real            U,
     BSplCLib::BuildKnots(UDegree,uindex,UPer,UKnots,UMults,*dc.knots2);
     BSplCLib::BuildKnots(VDegree,vindex,VPer,VKnots,VMults,*dc.knots1);
 
-    if (&UMults == NULL)
+    if (UMults == NULL)
       uindex -= UKLower + UDegree;
     else
-      uindex  = BSplCLib::PoleIndex(UDegree,uindex,UPer,UMults);
+      uindex  = BSplCLib::PoleIndex(UDegree,uindex,UPer,*UMults);
 
-    if (&VMults == NULL)
+    if (VMults == NULL)
       vindex -= VKLower + VDegree;
     else
-      vindex  = BSplCLib::PoleIndex(VDegree,vindex,VPer,VMults);
+      vindex  = BSplCLib::PoleIndex(VDegree,vindex,VPer,*VMults);
 
     // get the poles
     Standard_Integer i,j,ip,jp;
@@ -495,7 +495,7 @@ static Standard_Boolean  PrepareEval (const Standard_Real            U,
       if(jp < PLowerCol)
         jp = PUpperCol;
 
-      w  = Weights.Value(ip,jp);
+      w  = Weights->Value(ip,jp);
       Standard_Real eps = Epsilon(w);
       Standard_Real dw;
 
@@ -508,7 +508,7 @@ static Standard_Boolean  PrepareEval (const Standard_Real            U,
 
         for (j = 0; j <= VDegree && !rational; j++)
           {
-          dw = Weights.Value(ip,jp) - w;
+          dw = Weights->Value(ip,jp) - w;
           if (dw < 0) dw = - dw;
           rational = dw > eps;
 
@@ -544,7 +544,7 @@ static Standard_Boolean  PrepareEval (const Standard_Real            U,
         for (j = 0; j <= d2; j++)
           {
           const gp_Pnt& P = Poles.Value(ip,jp);
-          pole[3] = w     = Weights.Value(ip,jp);
+          pole[3] = w     = Weights->Value(ip,jp);
           pole[0] = P.X() * w;
           pole[1] = P.Y() * w;
           pole[2] = P.Z() * w;
@@ -611,11 +611,11 @@ void  BSplSLib::D0
  const Standard_Integer UIndex, 
  const Standard_Integer VIndex,
  const TColgp_Array2OfPnt& Poles,
- const TColStd_Array2OfReal& Weights,
+ const TColStd_Array2OfReal* Weights,
  const TColStd_Array1OfReal& UKnots,
  const TColStd_Array1OfReal& VKnots,
- const TColStd_Array1OfInteger& UMults,
- const TColStd_Array1OfInteger& VMults,
+ const TColStd_Array1OfInteger* UMults,
+ const TColStd_Array1OfInteger* VMults,
  const Standard_Integer UDegree,
  const Standard_Integer VDegree,
  const Standard_Boolean URat,
@@ -660,11 +660,11 @@ void  BSplSLib::HomogeneousD0
  const Standard_Integer UIndex, 
  const Standard_Integer VIndex,
  const TColgp_Array2OfPnt& Poles,
- const TColStd_Array2OfReal& Weights,
+ const TColStd_Array2OfReal* Weights,
  const TColStd_Array1OfReal& UKnots,
  const TColStd_Array1OfReal& VKnots,
- const TColStd_Array1OfInteger& UMults,
- const TColStd_Array1OfInteger& VMults,
+ const TColStd_Array1OfInteger* UMults,
+ const TColStd_Array1OfInteger* VMults,
  const Standard_Integer UDegree,
  const Standard_Integer VDegree,
  const Standard_Boolean URat,
@@ -715,11 +715,11 @@ void  BSplSLib::D1
  const Standard_Integer UIndex,
  const Standard_Integer VIndex,
  const TColgp_Array2OfPnt& Poles,
- const TColStd_Array2OfReal& Weights,
+ const TColStd_Array2OfReal* Weights,
  const TColStd_Array1OfReal& UKnots,
  const TColStd_Array1OfReal& VKnots,
- const TColStd_Array1OfInteger& UMults,
- const TColStd_Array1OfInteger& VMults,
+ const TColStd_Array1OfInteger* UMults,
+ const TColStd_Array1OfInteger* VMults,
  const Standard_Integer UDegree,
  const Standard_Integer VDegree,
  const Standard_Boolean URat,
@@ -813,11 +813,11 @@ void  BSplSLib::HomogeneousD1
  const Standard_Integer UIndex,
  const Standard_Integer VIndex,
  const TColgp_Array2OfPnt& Poles,
- const TColStd_Array2OfReal& Weights,
+ const TColStd_Array2OfReal* Weights,
  const TColStd_Array1OfReal& UKnots,
  const TColStd_Array1OfReal& VKnots,
- const TColStd_Array1OfInteger& UMults,
- const TColStd_Array1OfInteger& VMults,
+ const TColStd_Array1OfInteger* UMults,
+ const TColStd_Array1OfInteger* VMults,
  const Standard_Integer UDegree,
  const Standard_Integer VDegree,
  const Standard_Boolean URat,
@@ -886,11 +886,11 @@ void  BSplSLib::D2
  const Standard_Integer UIndex,
  const Standard_Integer VIndex,
  const TColgp_Array2OfPnt& Poles,
- const TColStd_Array2OfReal& Weights,
+ const TColStd_Array2OfReal* Weights,
  const TColStd_Array1OfReal& UKnots,
  const TColStd_Array1OfReal& VKnots,
- const TColStd_Array1OfInteger& UMults,
- const TColStd_Array1OfInteger& VMults,
+ const TColStd_Array1OfInteger* UMults,
+ const TColStd_Array1OfInteger* VMults,
  const Standard_Integer UDegree,
  const Standard_Integer VDegree,
  const Standard_Boolean URat,
@@ -1020,11 +1020,11 @@ void  BSplSLib::D3
  const Standard_Integer UIndex,
  const Standard_Integer VIndex,
  const TColgp_Array2OfPnt& Poles,
- const TColStd_Array2OfReal& Weights,
+ const TColStd_Array2OfReal* Weights,
  const TColStd_Array1OfReal& UKnots,
  const TColStd_Array1OfReal& VKnots,
- const TColStd_Array1OfInteger& UMults,
- const TColStd_Array1OfInteger& VMults,
+ const TColStd_Array1OfInteger* UMults,
+ const TColStd_Array1OfInteger* VMults,
  const Standard_Integer UDegree,
  const Standard_Integer VDegree,
  const Standard_Boolean URat,
@@ -1221,11 +1221,11 @@ void  BSplSLib::DN
  const Standard_Integer UIndex,
  const Standard_Integer VIndex,
  const TColgp_Array2OfPnt& Poles,
- const TColStd_Array2OfReal& Weights,
+ const TColStd_Array2OfReal* Weights,
  const TColStd_Array1OfReal& UKnots,
  const TColStd_Array1OfReal& VKnots,
- const TColStd_Array1OfInteger& UMults,
- const TColStd_Array1OfInteger& VMults,
+ const TColStd_Array1OfInteger* UMults,
+ const TColStd_Array1OfInteger* VMults,
  const Standard_Integer UDegree,
  const Standard_Integer VDegree,
  const Standard_Boolean URat,
@@ -1294,17 +1294,17 @@ void  BSplSLib::DN
 void  BSplSLib::Iso(const Standard_Real            Param, 
                    const Standard_Boolean         IsU,
                    const TColgp_Array2OfPnt&      Poles,
-                   const TColStd_Array2OfReal&    Weights,
+                   const TColStd_Array2OfReal*    Weights,
                    const TColStd_Array1OfReal&    Knots,
-                   const TColStd_Array1OfInteger& Mults,
+                   const TColStd_Array1OfInteger* Mults,
                    const Standard_Integer         Degree,
                    const Standard_Boolean         Periodic,
                    TColgp_Array1OfPnt&            CPoles,
-                   TColStd_Array1OfReal&          CWeights)
+                   TColStd_Array1OfReal*          CWeights)
 {
   Standard_Integer index = 0;
   Standard_Real    u = Param;
-  Standard_Boolean rational = &Weights != NULL;
+  Standard_Boolean rational = Weights != NULL;
   Standard_Integer dim = rational ? 4 : 3;
   
   // compute local knots
@@ -1312,10 +1312,10 @@ void  BSplSLib::Iso(const Standard_Real            Param,
   NCollection_LocalArray<Standard_Real> locknots1 (2*Degree);  
   BSplCLib::LocateParameter(Degree,Knots,Mults,u,Periodic,index,u);
   BSplCLib::BuildKnots(Degree,index,Periodic,Knots,Mults,*locknots1);
-  if (&Mults == NULL)
+  if (Mults == NULL)
     index -= Knots.Lower() + Degree;
   else
-    index = BSplCLib::PoleIndex(Degree,index,Periodic,Mults);
+    index = BSplCLib::PoleIndex(Degree,index,Periodic,*Mults);
   
   
   // copy the local poles
@@ -1347,7 +1347,7 @@ void  BSplSLib::Iso(const Standard_Real            Param,
       
       const gp_Pnt& P  = IsU ? Poles(index,j)   : Poles(j,index);
       if (rational) { 
-       pole[3] = w      = IsU ? Weights(index,j) : Weights(j,index);
+       pole[3] = w      = IsU ? (*Weights)(index,j) : (*Weights)(j,index);
        pole[0] = P.X() * w;
        pole[1] = P.Y() * w;
        pole[2] = P.Z() * w;
@@ -1372,7 +1372,7 @@ void  BSplSLib::Iso(const Standard_Real            Param,
   for (i = CPoles.Lower(); i <= CPoles.Upper(); i++) {
     gp_Pnt& P = CPoles(i);
     if (rational) {
-      CWeights(i) = w = pole[3];
+      (*CWeights)(i) = w = pole[3];
       P.SetX( pole[0] / w);
       P.SetY( pole[1] / w);
       P.SetZ( pole[2] / w);
@@ -1386,10 +1386,10 @@ void  BSplSLib::Iso(const Standard_Real            Param,
   }
   
   // if the input is not rational but weights are wanted
-  if (!rational && (&CWeights != NULL)) {
+  if (!rational && (CWeights != NULL)) {
 
-    for (i = CWeights.Lower(); i <= CWeights.Upper(); i++)
-      CWeights(i) = 1.;
+    for (i = CWeights->Lower(); i <= CWeights->Upper(); i++)
+      (*CWeights)(i) = 1.;
   }
 }
 
@@ -1734,19 +1734,19 @@ void  BSplSLib::InsertKnots(const Standard_Boolean         UDirection,
                            const Standard_Integer         Degree, 
                            const Standard_Boolean         Periodic, 
                            const TColgp_Array2OfPnt&      Poles, 
-                           const TColStd_Array2OfReal&    Weights, 
+                           const TColStd_Array2OfReal*    Weights, 
                            const TColStd_Array1OfReal&    Knots, 
                            const TColStd_Array1OfInteger& Mults, 
                            const TColStd_Array1OfReal&    AddKnots, 
-                           const TColStd_Array1OfInteger& AddMults, 
+                           const TColStd_Array1OfInteger* AddMults, 
                            TColgp_Array2OfPnt&      NewPoles,
-                           TColStd_Array2OfReal&    NewWeights,
+                           TColStd_Array2OfReal*    NewWeights,
                            TColStd_Array1OfReal&    NewKnots,
                            TColStd_Array1OfInteger& NewMults, 
                            const Standard_Real            Epsilon, 
                            const Standard_Boolean         Add )
 {
-  Standard_Boolean rational = &Weights != NULL;
+  Standard_Boolean rational = Weights != NULL;
   Standard_Integer dim = 3;
   if (rational) dim++;
   
@@ -1754,7 +1754,7 @@ void  BSplSLib::InsertKnots(const Standard_Boolean         UDirection,
   TColStd_Array1OfReal 
     newpoles( 1, dim*NewPoles.RowLength()*NewPoles.ColLength());
   
-  if (rational) SetPoles(Poles,Weights,poles,UDirection);
+  if (rational) SetPoles(Poles,*Weights,poles,UDirection);
   else          SetPoles(Poles,poles,UDirection);
   
   if (UDirection) {
@@ -1767,7 +1767,7 @@ void  BSplSLib::InsertKnots(const Standard_Boolean         UDirection,
                        AddKnots,AddMults,newpoles,NewKnots,NewMults,
                        Epsilon,Add);
   
-  if (rational) GetPoles(newpoles,NewPoles,NewWeights,UDirection);
+  if (rational) GetPoles(newpoles,NewPoles,*NewWeights,UDirection);
   else          GetPoles(newpoles,NewPoles,UDirection);
 }
 
@@ -1783,16 +1783,16 @@ Standard_Boolean  BSplSLib::RemoveKnot
  const Standard_Integer         Degree, 
  const Standard_Boolean         Periodic, 
  const TColgp_Array2OfPnt&      Poles, 
- const TColStd_Array2OfReal&    Weights, 
+ const TColStd_Array2OfReal*    Weights, 
  const TColStd_Array1OfReal&    Knots, 
  const TColStd_Array1OfInteger& Mults,
  TColgp_Array2OfPnt&      NewPoles,
- TColStd_Array2OfReal&    NewWeights,
+ TColStd_Array2OfReal*    NewWeights,
  TColStd_Array1OfReal&    NewKnots,
  TColStd_Array1OfInteger& NewMults,
  const Standard_Real            Tolerance)
 {
-  Standard_Boolean rational = &Weights != NULL;
+  Standard_Boolean rational = Weights != NULL;
   Standard_Integer dim = 3;
   if (rational) dim++;
   
@@ -1800,7 +1800,7 @@ Standard_Boolean  BSplSLib::RemoveKnot
   TColStd_Array1OfReal 
     newpoles( 1, dim*NewPoles.RowLength()*NewPoles.ColLength());
   
-  if (rational) SetPoles(Poles,Weights,poles,UDirection);
+  if (rational) SetPoles(Poles,*Weights,poles,UDirection);
   else          SetPoles(Poles,poles,UDirection);
   
   if (UDirection) {
@@ -1815,7 +1815,7 @@ Standard_Boolean  BSplSLib::RemoveKnot
                             Tolerance))
     return Standard_False;
   
-  if (rational) GetPoles(newpoles,NewPoles,NewWeights,UDirection);
+  if (rational) GetPoles(newpoles,NewPoles,*NewWeights,UDirection);
   else          GetPoles(newpoles,NewPoles,UDirection);
   return Standard_True;
 }
@@ -1831,15 +1831,15 @@ void  BSplSLib::IncreaseDegree
  const Standard_Integer         NewDegree, 
  const Standard_Boolean         Periodic, 
  const TColgp_Array2OfPnt&      Poles, 
- const TColStd_Array2OfReal&    Weights,
+ const TColStd_Array2OfReal*    Weights,
  const TColStd_Array1OfReal&    Knots,
  const TColStd_Array1OfInteger& Mults, 
  TColgp_Array2OfPnt&      NewPoles, 
- TColStd_Array2OfReal&    NewWeights, 
+ TColStd_Array2OfReal*    NewWeights, 
  TColStd_Array1OfReal&    NewKnots, 
  TColStd_Array1OfInteger& NewMults)
 {
-  Standard_Boolean rational = &Weights != NULL;
+  Standard_Boolean rational = Weights != NULL;
   Standard_Integer dim = 3;
   if (rational) dim++;
   
@@ -1847,7 +1847,7 @@ void  BSplSLib::IncreaseDegree
   TColStd_Array1OfReal 
     newpoles( 1, dim*NewPoles.RowLength()*NewPoles.ColLength());
   
-  if (rational) SetPoles(Poles,Weights,poles,UDirection);
+  if (rational) SetPoles(Poles,*Weights,poles,UDirection);
   else          SetPoles(Poles,poles,UDirection);
   
   if (UDirection) {
@@ -1860,7 +1860,7 @@ void  BSplSLib::IncreaseDegree
   BSplCLib::IncreaseDegree(Degree,NewDegree,Periodic,dim,poles,Knots,Mults,
                           newpoles,NewKnots,NewMults);
   
-  if (rational) GetPoles(newpoles,NewPoles,NewWeights,UDirection);
+  if (rational) GetPoles(newpoles,NewPoles,*NewWeights,UDirection);
   else          GetPoles(newpoles,NewPoles,UDirection);
 }
 
@@ -1875,13 +1875,13 @@ void  BSplSLib::Unperiodize
  const TColStd_Array1OfInteger& Mults,
  const TColStd_Array1OfReal&    Knots,
  const TColgp_Array2OfPnt&      Poles, 
- const TColStd_Array2OfReal&    Weights,
+ const TColStd_Array2OfReal*    Weights,
  TColStd_Array1OfInteger& NewMults,
  TColStd_Array1OfReal&    NewKnots,
  TColgp_Array2OfPnt&      NewPoles,
- TColStd_Array2OfReal&    NewWeights)
+ TColStd_Array2OfReal*    NewWeights)
 {
-  Standard_Boolean rational = &Weights != NULL;
+  Standard_Boolean rational = Weights != NULL;
   Standard_Integer dim = 3;
   if (rational) dim++;
   
@@ -1889,7 +1889,7 @@ void  BSplSLib::Unperiodize
   TColStd_Array1OfReal 
     newpoles( 1, dim*NewPoles.RowLength()*NewPoles.ColLength());
   
-  if (rational) SetPoles(Poles,Weights,poles,UDirection);
+  if (rational) SetPoles(Poles,*Weights,poles,UDirection);
   else          SetPoles(Poles,poles,UDirection);
   
   if (UDirection) {
@@ -1902,7 +1902,7 @@ void  BSplSLib::Unperiodize
   BSplCLib::Unperiodize(Degree, dim, Mults, Knots, poles, 
                        NewMults, NewKnots, newpoles);
   
-  if (rational) GetPoles(newpoles,NewPoles,NewWeights,UDirection);
+  if (rational) GetPoles(newpoles,NewPoles,*NewWeights,UDirection);
   else          GetPoles(newpoles,NewPoles,UDirection);
 }
 
@@ -1927,14 +1927,14 @@ void BSplSLib::BuildCache
  const TColStd_Array1OfReal&    UFlatKnots,   
  const TColStd_Array1OfReal&    VFlatKnots,   
  const TColgp_Array2OfPnt&      Poles,  
- const TColStd_Array2OfReal&    Weights,
+ const TColStd_Array2OfReal*    Weights,
  TColgp_Array2OfPnt&            CachePoles,
- TColStd_Array2OfReal&          CacheWeights)
+ TColStd_Array2OfReal*          CacheWeights)
 {  
   Standard_Boolean rational,rational_u,rational_v,flag_u_or_v;                  
   Standard_Integer kk,d1,d1p1,d2,d2p1,ii,jj,iii,jjj,Index;
   Standard_Real u1,min_degree_domain,max_degree_domain,f,factor[2],u2;
-  if (&Weights != NULL) 
+  if (Weights != NULL) 
     rational_u = rational_v = Standard_True;
   else
     rational_u = rational_v = Standard_False;
@@ -1992,7 +1992,7 @@ void BSplSLib::BuildCache
        P.SetX( f * dc.poles[Index]); Index++;
        P.SetY( f * dc.poles[Index]); Index++;
        P.SetZ( f * dc.poles[Index]); Index++;
-       CacheWeights(iii ,jjj) = f * dc.poles[Index] ;
+       (*CacheWeights)(iii ,jjj) = f * dc.poles[Index] ;
        factor[1] *= min_degree_domain / (Standard_Real) (jjj) ;
       }
       factor[0] *= max_degree_domain / (Standard_Real) (iii) ;
@@ -2030,7 +2030,7 @@ void BSplSLib::BuildCache
       }
       factor[0] *= max_degree_domain / (Standard_Real) (iii) ;
     }
-    if (&Weights != NULL) {
+    if (Weights != NULL) {
       //
       // means that PrepareEval did found out that the surface was 
       // locally polynomial but since the surface is constructed
@@ -2040,10 +2040,10 @@ void BSplSLib::BuildCache
       for (ii = 1 ; ii <= d2p1 ; ii++) {
        
        for (jj = 1 ; jj <= d1p1 ; jj++) {
-         CacheWeights(ii,jj) = 0.0e0 ;
+         (*CacheWeights)(ii,jj) = 0.0e0 ;
        }
       }
-      CacheWeights(1,1) = 1.0e0 ;
+      (*CacheWeights)(1,1) = 1.0e0 ;
     }
   }
 }
@@ -2061,13 +2061,13 @@ void BSplSLib::BuildCache(const Standard_Real          theU,
                           const TColStd_Array1OfReal&  theUFlatKnots,
                           const TColStd_Array1OfReal&  theVFlatKnots,
                           const TColgp_Array2OfPnt&    thePoles,
-                          const TColStd_Array2OfReal&  theWeights,
+                          const TColStd_Array2OfReal*  theWeights,
                                 TColStd_Array2OfReal&  theCacheArray)
 {
   Standard_Boolean flag_u_or_v;
   Standard_Integer d1, d2;
   Standard_Real    u1, u2;
-  Standard_Boolean isRationalOnParam = (&theWeights != NULL);
+  Standard_Boolean isRationalOnParam = (theWeights != NULL);
   Standard_Boolean isRational;
 
   BSplSLib_DataContainer dc(theUDegree, theVDegree);
@@ -2158,7 +2158,7 @@ void  BSplSLib::CacheD0(const Standard_Real                  UParameter,
                        const  Standard_Real                 USpanLenght,
                        const  Standard_Real                 VSpanLenght,
                        const  TColgp_Array2OfPnt&           PolesArray,
-                       const  TColStd_Array2OfReal&         WeightsArray,
+                       const  TColStd_Array2OfReal*         WeightsArray,
                         gp_Pnt&                              aPoint)
 {
   //
@@ -2210,11 +2210,12 @@ void  BSplSLib::CacheD0(const Standard_Real                  UParameter,
                       (min_degree << 1) + min_degree,
                       locpoles[0],
                       myPoint[0]) ;
-  if (&WeightsArray != NULL) {
+  if (WeightsArray != NULL) {
     dimension = min_degree + 1 ;
+    const TColStd_Array2OfReal& refWeights = *WeightsArray;
     Standard_Real *
       WArray = (Standard_Real *) 
-       &WeightsArray(WeightsArray.LowerCol(),WeightsArray.LowerRow()) ;
+       &refWeights(refWeights.LowerCol(),refWeights.LowerRow()) ;
     PLib::NoDerivativeEvalPolynomial(new_parameter[0],
                         max_degree,
                         dimension,
@@ -2251,7 +2252,7 @@ void  BSplSLib::CacheD1(const Standard_Real                  UParameter,
                        const  Standard_Real                 USpanLenght,
                        const  Standard_Real                 VSpanLenght,
                        const  TColgp_Array2OfPnt&           PolesArray,
-                       const  TColStd_Array2OfReal&         WeightsArray,
+                       const  TColStd_Array2OfReal*         WeightsArray,
                         gp_Pnt&                              aPoint,
                        gp_Vec&                              aVecU,
                         gp_Vec&                              aVecV)
@@ -2290,7 +2291,7 @@ void  BSplSLib::CacheD1(const Standard_Real                  UParameter,
   // the coefficients
   //
   //
-  if (&WeightsArray != NULL) {
+  if (WeightsArray != NULL) {
 
     local_poles_array            [0][0][0] = 0.0e0 ;
     local_poles_array            [0][0][1] = 0.0e0 ;
@@ -2375,11 +2376,12 @@ void  BSplSLib::CacheD1(const Standard_Real                  UParameter,
                       locpoles[dimension],
                       local_poles_array[1][0][0]) ;
   
-  if (&WeightsArray != NULL) {
+  if (WeightsArray != NULL) {
     dimension = min_degree + 1 ;
+    const TColStd_Array2OfReal& refWeights = *WeightsArray;
     Standard_Real *
       WArray = (Standard_Real *) 
-       &WeightsArray(WeightsArray.LowerCol(),WeightsArray.LowerRow()) ;
+       &refWeights(refWeights.LowerCol(),refWeights.LowerRow()) ;
     PLib::EvalPolynomial(new_parameter[0],
                         1,
                         max_degree,
@@ -2456,7 +2458,7 @@ void  BSplSLib::CacheD2(const Standard_Real                  UParameter,
                        const  Standard_Real                 USpanLenght,
                        const  Standard_Real                 VSpanLenght,
                        const  TColgp_Array2OfPnt&           PolesArray,
-                       const  TColStd_Array2OfReal&         WeightsArray,
+                       const  TColStd_Array2OfReal*         WeightsArray,
                         gp_Pnt&                              aPoint,
                         gp_Vec&                              aVecU,
                         gp_Vec&                              aVecV,
@@ -2535,7 +2537,7 @@ void  BSplSLib::CacheD2(const Standard_Real                  UParameter,
   // the coefficients
   //
   //
-  if (&WeightsArray != NULL) {
+  if (WeightsArray != NULL) {
     
     local_poles_and_weights_array[0][0][0] = 0.0e0 ;
     local_poles_and_weights_array[0][0][1] = 0.0e0 ;
@@ -2664,11 +2666,12 @@ void  BSplSLib::CacheD2(const Standard_Real                  UParameter,
                       locpoles[dimension + dimension],
                       local_poles_array[2][0][0]) ;
   
-  if (&WeightsArray != NULL) {
+  if (WeightsArray != NULL) {
     dimension = min_degree + 1 ;
+    const TColStd_Array2OfReal& refWeights = *WeightsArray;
     Standard_Real *
       WArray = (Standard_Real *) 
-        &WeightsArray(WeightsArray.LowerCol(),WeightsArray.LowerRow()) ;
+        &refWeights(refWeights.LowerCol(),refWeights.LowerRow()) ;
     PLib::EvalPolynomial(new_parameter[0],
                         MinIndMax,
                         max_degree,
@@ -3004,7 +3007,7 @@ void BSplSLib::MovePoint (const Standard_Real            U,
 //=======================================================================
 
 void BSplSLib::Resolution(const TColgp_Array2OfPnt&      Poles,
-                         const TColStd_Array2OfReal&    Weights,
+                         const TColStd_Array2OfReal*    Weights,
                          const TColStd_Array1OfReal&    UKnots,
                          const TColStd_Array1OfReal&    VKnots,
                          const TColStd_Array1OfInteger& UMults,
@@ -3056,7 +3059,8 @@ void BSplSLib::Resolution(const TColgp_Array2OfPnt&      Poles,
   PColLength = Poles.ColLength();
   if (URational || VRational) {
     Standard_Integer Wsize = PRowLength * PColLength;
-    const Standard_Real * WG = &Weights(Weights.LowerRow(),Weights.LowerCol());
+    const TColStd_Array2OfReal& refWights = *Weights;
+    const Standard_Real * WG = &refWights(refWights.LowerRow(), refWights.LowerCol());
     min_weights = WG[0];
     
     for (ii = 1 ; ii < Wsize ; ii++) {
@@ -3091,9 +3095,9 @@ void BSplSLib::Resolution(const TColgp_Array2OfPnt&      Poles,
        upper[1] = jj + VD2 + 1;
        if (upper[1] > num_poles[1]) upper[1] = num_poles[1];
        const gp_Pnt& Pij = Poles  .Value(ii_index,jj_index);
-       Wij               = Weights.Value(ii_index,jj_index);
+       Wij               = Weights->Value(ii_index,jj_index);
        const gp_Pnt& Pmj = Poles  .Value(ii_minus,jj_index);
-       Wmj               = Weights.Value(ii_minus,jj_index);
+       Wmj               = Weights->Value(ii_minus,jj_index);
        Xij = Pij.X();
        Yij = Pij.Y();
        Zij = Pij.Z();
@@ -3180,9 +3184,9 @@ void BSplSLib::Resolution(const TColgp_Array2OfPnt&      Poles,
        upper[1] = jj + UD2 + 1;
        if (upper[1] > num_poles[0]) upper[1] = num_poles[0];
        const gp_Pnt& Pji = Poles  .Value(jj_index,ii_index);
-       Wji               = Weights.Value(jj_index,ii_index);
+       Wji               = Weights->Value(jj_index,ii_index);
        const gp_Pnt& Pjm = Poles  .Value(jj_index,ii_minus);
-       Wjm               = Weights.Value(jj_index,ii_minus);
+       Wjm               = Weights->Value(jj_index,ii_minus);
        Xji = Pji.X();
        Yji = Pji.Y();
        Zji = Pji.Z();
@@ -3449,10 +3453,10 @@ void BSplSLib::FunctionMultiply
  const Standard_Integer                      VBSplineDegree,
  const TColStd_Array1OfReal&                 UBSplineKnots,
  const TColStd_Array1OfReal&                 VBSplineKnots,
- const TColStd_Array1OfInteger &             UMults,
- const TColStd_Array1OfInteger &             VMults,
+ const TColStd_Array1OfInteger *             UMults,
+ const TColStd_Array1OfInteger *             VMults,
  const TColgp_Array2OfPnt&                   Poles,
- const TColStd_Array2OfReal&                 Weights,
+ const TColStd_Array2OfReal*                 Weights,
  const TColStd_Array1OfReal&                 UFlatKnots,
  const TColStd_Array1OfReal&                 VFlatKnots,
  const Standard_Integer                      UNewDegree,
index cbcc002..85eb522 100644 (file)
@@ -71,6 +71,10 @@ class gp_Vec;
 //! parametric U direction  and the columns indice corresponds
 //! to the parametric V direction.
 //!
+//! Note: weight and multiplicity arrays can be passed by pointer for
+//! some functions so that NULL pointer is valid.
+//! That means no weights/no multiplicities passed.
+//! 
 //! KeyWords :
 //! B-spline surface, Functions, Library
 //!
@@ -177,20 +181,20 @@ public:
   //! Warning: <RDers> must be dimensionned properly.
   Standard_EXPORT static void RationalDerivative (const Standard_Integer UDeg, const Standard_Integer VDeg, const Standard_Integer N, const Standard_Integer M, Standard_Real& Ders, Standard_Real& RDers, const Standard_Boolean All = Standard_True);
   
-  Standard_EXPORT static void D0 (const Standard_Real U, const Standard_Real V, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger& UMults, const TColStd_Array1OfInteger& VMults, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, gp_Pnt& P);
+  Standard_EXPORT static void D0 (const Standard_Real U, const Standard_Real V, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger* UMults, const TColStd_Array1OfInteger* VMults, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, gp_Pnt& P);
   
-  Standard_EXPORT static void D1 (const Standard_Real U, const Standard_Real V, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger& UMults, const TColStd_Array1OfInteger& VMults, const Standard_Integer Degree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv);
+  Standard_EXPORT static void D1 (const Standard_Real U, const Standard_Real V, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger* UMults, const TColStd_Array1OfInteger* VMults, const Standard_Integer Degree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv);
   
-  Standard_EXPORT static void D2 (const Standard_Real U, const Standard_Real V, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger& UMults, const TColStd_Array1OfInteger& VMults, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv);
+  Standard_EXPORT static void D2 (const Standard_Real U, const Standard_Real V, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger* UMults, const TColStd_Array1OfInteger* VMults, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, gp_Pnt& P, gp_Vec& Vu, gp_Vec& Vv, gp_Vec& Vuu, gp_Vec& Vvv, gp_Vec& Vuv);
   
-  Standard_EXPORT static void D3 (const Standard_Real U, const Standard_Real V, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger& UMults, const TColStd_Array1OfInteger& VMults, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, gp_Pnt& P, gp_Vec& 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);
+  Standard_EXPORT static void D3 (const Standard_Real U, const Standard_Real V, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger* UMults, const TColStd_Array1OfInteger* VMults, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, gp_Pnt& P, gp_Vec& 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);
   
-  Standard_EXPORT static void DN (const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger& UMults, const TColStd_Array1OfInteger& VMults, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, gp_Vec& Vn);
+  Standard_EXPORT static void DN (const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger* UMults, const TColStd_Array1OfInteger* VMults, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, gp_Vec& Vn);
   
   //! Computes the  poles and weights of an isoparametric
   //! curve at parameter  <Param> (UIso if <IsU> is True,
   //! VIso  else).
-  Standard_EXPORT static void Iso (const Standard_Real Param, const Standard_Boolean IsU, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer Degree, const Standard_Boolean Periodic, TColgp_Array1OfPnt& CPoles, TColStd_Array1OfReal& CWeights);
+  Standard_EXPORT static void Iso (const Standard_Real Param, const Standard_Boolean IsU, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger* Mults, const Standard_Integer Degree, const Standard_Boolean Periodic, TColgp_Array1OfPnt& CPoles, TColStd_Array1OfReal* CWeights);
   
   //! Reverses the array of poles. Last is the Index of
   //! the new first Row( Col) of Poles.
@@ -207,13 +211,13 @@ public:
   //! any and returns in P the Numerator value and
   //! in W the Denominator value if Weights are present
   //! otherwise returns 1.0e0
-  Standard_EXPORT static void HomogeneousD0 (const Standard_Real U, const Standard_Real V, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger& UMults, const TColStd_Array1OfInteger& VMults, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, Standard_Real& W, gp_Pnt& P);
+  Standard_EXPORT static void HomogeneousD0 (const Standard_Real U, const Standard_Real V, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger* UMults, const TColStd_Array1OfInteger* VMults, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, Standard_Real& W, gp_Pnt& P);
   
   //! 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
-  Standard_EXPORT static void HomogeneousD1 (const Standard_Real U, const Standard_Real V, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger& UMults, const TColStd_Array1OfInteger& VMults, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, gp_Pnt& N, gp_Vec& Nu, gp_Vec& Nv, Standard_Real& D, Standard_Real& Du, Standard_Real& Dv);
+  Standard_EXPORT static void HomogeneousD1 (const Standard_Real U, const Standard_Real V, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger* UMults, const TColStd_Array1OfInteger* VMults, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, gp_Pnt& N, gp_Vec& Nu, gp_Vec& Nv, Standard_Real& D, Standard_Real& Du, Standard_Real& Dv);
   
   //! Reverses the array of weights.
   Standard_EXPORT static void Reverse (TColStd_Array2OfReal& Weights, const Standard_Integer Last, const Standard_Boolean UDirection);
@@ -252,27 +256,27 @@ public:
   //! VFirstIndex, VLastIndex = 0
   Standard_EXPORT static void MovePoint (const Standard_Real U, const Standard_Real V, const gp_Vec& Displ, const Standard_Integer UIndex1, const Standard_Integer UIndex2, const Standard_Integer VIndex1, const Standard_Integer VIndex2, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean Rational, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, const TColStd_Array1OfReal& UFlatKnots, const TColStd_Array1OfReal& VFlatKnots, Standard_Integer& UFirstIndex, Standard_Integer& ULastIndex, Standard_Integer& VFirstIndex, Standard_Integer& VLastIndex, TColgp_Array2OfPnt& NewPoles);
   
-  Standard_EXPORT static void InsertKnots (const Standard_Boolean UDirection, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& AddKnots, const TColStd_Array1OfInteger& AddMults, TColgp_Array2OfPnt& NewPoles, TColStd_Array2OfReal& NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Epsilon, const Standard_Boolean Add = Standard_True);
+  Standard_EXPORT static void InsertKnots (const Standard_Boolean UDirection, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& AddKnots, const TColStd_Array1OfInteger* AddMults, TColgp_Array2OfPnt& NewPoles, TColStd_Array2OfReal* NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Epsilon, const Standard_Boolean Add = Standard_True);
   
-  Standard_EXPORT static Standard_Boolean RemoveKnot (const Standard_Boolean UDirection, const Standard_Integer Index, const Standard_Integer Mult, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array2OfPnt& NewPoles, TColStd_Array2OfReal& NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Tolerance);
+  Standard_EXPORT static Standard_Boolean RemoveKnot (const Standard_Boolean UDirection, const Standard_Integer Index, const Standard_Integer Mult, const Standard_Integer Degree, const Standard_Boolean Periodic, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array2OfPnt& NewPoles, TColStd_Array2OfReal* NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults, const Standard_Real Tolerance);
   
-  Standard_EXPORT static void IncreaseDegree (const Standard_Boolean UDirection, const Standard_Integer Degree, const Standard_Integer NewDegree, const Standard_Boolean Periodic, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array2OfPnt& NewPoles, TColStd_Array2OfReal& NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults);
+  Standard_EXPORT static void IncreaseDegree (const Standard_Boolean UDirection, const Standard_Integer Degree, const Standard_Integer NewDegree, const Standard_Boolean Periodic, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, TColgp_Array2OfPnt& NewPoles, TColStd_Array2OfReal* NewWeights, TColStd_Array1OfReal& NewKnots, TColStd_Array1OfInteger& NewMults);
   
-  Standard_EXPORT static void Unperiodize (const Standard_Boolean UDirection, const Standard_Integer Degree, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& Knots, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, TColStd_Array1OfInteger& NewMults, TColStd_Array1OfReal& NewKnots, TColgp_Array2OfPnt& NewPoles, TColStd_Array2OfReal& NewWeights);
+  Standard_EXPORT static void Unperiodize (const Standard_Boolean UDirection, const Standard_Integer Degree, const TColStd_Array1OfInteger& Mults, const TColStd_Array1OfReal& Knots, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, TColStd_Array1OfInteger& NewMults, TColStd_Array1OfReal& NewKnots, TColgp_Array2OfPnt& NewPoles, TColStd_Array2OfReal* NewWeights);
   
   //! Used as argument for a non rational curve.
-    static TColStd_Array2OfReal& NoWeights();
+    static TColStd_Array2OfReal* NoWeights();
   
   //! 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
-  Standard_EXPORT static void BuildCache (const Standard_Real U, const Standard_Real V, const Standard_Real USpanDomain, const Standard_Real VSpanDomain, const Standard_Boolean UPeriodicFlag, const Standard_Boolean VPeriodicFlag, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColStd_Array1OfReal& UFlatKnots, const TColStd_Array1OfReal& VFlatKnots, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, TColgp_Array2OfPnt& CachePoles, TColStd_Array2OfReal& CacheWeights);
+  Standard_EXPORT static void BuildCache (const Standard_Real U, const Standard_Real V, const Standard_Real USpanDomain, const Standard_Real VSpanDomain, const Standard_Boolean UPeriodicFlag, const Standard_Boolean VPeriodicFlag, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Integer UIndex, const Standard_Integer VIndex, const TColStd_Array1OfReal& UFlatKnots, const TColStd_Array1OfReal& VFlatKnots, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, TColgp_Array2OfPnt& CachePoles, TColStd_Array2OfReal* CacheWeights);
   
   //! Perform the evaluation of the Taylor expansion
   //! of the Bspline normalized between 0 and 1.
   //! Structure of result optimized for BSplSLib_Cache.
-  Standard_EXPORT static void BuildCache (const Standard_Real theU, const Standard_Real theV, const Standard_Real theUSpanDomain, const Standard_Real theVSpanDomain, const Standard_Boolean theUPeriodic, const Standard_Boolean theVPeriodic, const Standard_Integer theUDegree, const Standard_Integer theVDegree, const Standard_Integer theUIndex, const Standard_Integer theVIndex, const TColStd_Array1OfReal& theUFlatKnots, const TColStd_Array1OfReal& theVFlatKnots, const TColgp_Array2OfPnt& thePoles, const TColStd_Array2OfReal& theWeights, TColStd_Array2OfReal& theCacheArray);
+  Standard_EXPORT static void BuildCache (const Standard_Real theU, const Standard_Real theV, const Standard_Real theUSpanDomain, const Standard_Real theVSpanDomain, const Standard_Boolean theUPeriodic, const Standard_Boolean theVPeriodic, const Standard_Integer theUDegree, const Standard_Integer theVDegree, const Standard_Integer theUIndex, const Standard_Integer theVIndex, const TColStd_Array1OfReal& theUFlatKnots, const TColStd_Array1OfReal& theVFlatKnots, const TColgp_Array2OfPnt& thePoles, const TColStd_Array2OfReal* theWeights, TColStd_Array2OfReal& theCacheArray);
   
   //! Perform the evaluation of the of the cache
   //! the parameter must be normalized between
@@ -285,12 +289,12 @@ public:
   //! constructed the SpanLength is to normalize
   //! the polynomial in the cache to avoid bad conditioning
   //! effects
-  Standard_EXPORT static void CacheD0 (const Standard_Real U, const Standard_Real V, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Real UCacheParameter, const Standard_Real VCacheParameter, const Standard_Real USpanLenght, const Standard_Real VSpanLength, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, gp_Pnt& Point);
+  Standard_EXPORT static void CacheD0 (const Standard_Real U, const Standard_Real V, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Real UCacheParameter, const Standard_Real VCacheParameter, const Standard_Real USpanLenght, const Standard_Real VSpanLength, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, gp_Pnt& Point);
   
   //! Calls CacheD0 for Bezier Surfaces Arrays computed with
   //! the method PolesCoefficients.
   //! Warning: To be used for BezierSurfaces ONLY!!!
-    static void CoefsD0 (const Standard_Real U, const Standard_Real V, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, gp_Pnt& Point);
+    static void CoefsD0 (const Standard_Real U, const Standard_Real V, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, gp_Pnt& Point);
   
   //! Perform the evaluation of the of the cache
   //! the parameter must be normalized between
@@ -303,12 +307,12 @@ public:
   //! constructed the SpanLength is to normalize
   //! the polynomial in the cache to avoid bad conditioning
   //! effects
-  Standard_EXPORT static void CacheD1 (const Standard_Real U, const Standard_Real V, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Real UCacheParameter, const Standard_Real VCacheParameter, const Standard_Real USpanLenght, const Standard_Real VSpanLength, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, gp_Pnt& Point, gp_Vec& VecU, gp_Vec& VecV);
+  Standard_EXPORT static void CacheD1 (const Standard_Real U, const Standard_Real V, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Real UCacheParameter, const Standard_Real VCacheParameter, const Standard_Real USpanLenght, const Standard_Real VSpanLength, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, gp_Pnt& Point, gp_Vec& VecU, gp_Vec& VecV);
   
   //! Calls CacheD0 for Bezier Surfaces Arrays computed with
   //! the method PolesCoefficients.
   //! Warning: To be used for BezierSurfaces ONLY!!!
-    static void CoefsD1 (const Standard_Real U, const Standard_Real V, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, gp_Pnt& Point, gp_Vec& VecU, gp_Vec& VecV);
+    static void CoefsD1 (const Standard_Real U, const Standard_Real V, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, gp_Pnt& Point, gp_Vec& VecU, gp_Vec& VecV);
   
   //! Perform the evaluation of the of the cache
   //! the parameter must be normalized between
@@ -321,12 +325,12 @@ public:
   //! constructed the SpanLength is to normalize
   //! the polynomial in the cache to avoid bad conditioning
   //! effects
-  Standard_EXPORT static void CacheD2 (const Standard_Real U, const Standard_Real V, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Real UCacheParameter, const Standard_Real VCacheParameter, const Standard_Real USpanLenght, const Standard_Real VSpanLength, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, gp_Pnt& Point, gp_Vec& VecU, gp_Vec& VecV, gp_Vec& VecUU, gp_Vec& VecUV, gp_Vec& VecVV);
+  Standard_EXPORT static void CacheD2 (const Standard_Real U, const Standard_Real V, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Real UCacheParameter, const Standard_Real VCacheParameter, const Standard_Real USpanLenght, const Standard_Real VSpanLength, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, gp_Pnt& Point, gp_Vec& VecU, gp_Vec& VecV, gp_Vec& VecUU, gp_Vec& VecUV, gp_Vec& VecVV);
   
   //! Calls CacheD0 for Bezier Surfaces Arrays computed with
   //! the method PolesCoefficients.
   //! Warning: To be used for BezierSurfaces ONLY!!!
-    static void CoefsD2 (const Standard_Real U, const Standard_Real V, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, gp_Pnt& Point, gp_Vec& VecU, gp_Vec& VecV, gp_Vec& VecUU, gp_Vec& VecUV, gp_Vec& VecVV);
+    static void CoefsD2 (const Standard_Real U, const Standard_Real V, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, gp_Pnt& Point, gp_Vec& VecU, gp_Vec& VecV, gp_Vec& VecUU, gp_Vec& VecUV, gp_Vec& VecVV);
   
   //! Warning! To be used for BezierSurfaces ONLY!!!
     static void PolesCoefficients (const TColgp_Array2OfPnt& Poles, TColgp_Array2OfPnt& CachePoles);
@@ -335,7 +339,7 @@ public:
   //! evaluation  of the Taylor expansion for beziersurfaces
   //! at parameters 0.,0.;
   //! Warning: To be used for BezierSurfaces ONLY!!!
-  Standard_EXPORT static void PolesCoefficients (const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, TColgp_Array2OfPnt& CachePoles, TColStd_Array2OfReal& CacheWeights);
+  Standard_EXPORT static void PolesCoefficients (const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, TColgp_Array2OfPnt& CachePoles, TColStd_Array2OfReal* CacheWeights);
   
   //! Given a tolerance in 3D space returns two
   //! tolerances, one in U one in V such that for
@@ -344,7 +348,7 @@ public:
   //! | u1 - u0 | < UTolerance and
   //! | v1 - v0 | < VTolerance
   //! we have |f (u1,v1) - f (u0,v0)| < Tolerance3D
-  Standard_EXPORT static void Resolution (const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger& UMults, const TColStd_Array1OfInteger& VMults, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, const Standard_Real Tolerance3D, Standard_Real& UTolerance, Standard_Real& VTolerance);
+  Standard_EXPORT static void Resolution (const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, const TColStd_Array1OfReal& UKnots, const TColStd_Array1OfReal& VKnots, const TColStd_Array1OfInteger& UMults, const TColStd_Array1OfInteger& VMults, const Standard_Integer UDegree, const Standard_Integer VDegree, const Standard_Boolean URat, const Standard_Boolean VRat, const Standard_Boolean UPer, const Standard_Boolean VPer, const Standard_Real Tolerance3D, Standard_Real& UTolerance, Standard_Real& VTolerance);
   
   //! Performs the interpolation of the data points given in
   //! the   Poles       array      in   the      form
@@ -408,7 +412,7 @@ public:
   //! BSpline : the method used is interpolation at Schoenenberg
   //! points of a(u,v)*F(u,v)
   //! --
-  Standard_EXPORT static void FunctionMultiply (const BSplSLib_EvaluatorFunction& Function, const Standard_Integer UBSplineDegree, const Standard_Integer VBSplineDegree, const TColStd_Array1OfReal& UBSplineKnots, const TColStd_Array1OfReal& VBSplineKnots, const TColStd_Array1OfInteger& UMults, const TColStd_Array1OfInteger& VMults, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal& Weights, const TColStd_Array1OfReal& UFlatKnots, const TColStd_Array1OfReal& VFlatKnots, const Standard_Integer UNewDegree, const Standard_Integer VNewDegree, TColgp_Array2OfPnt& NewNumerator, TColStd_Array2OfReal& NewDenominator, Standard_Integer& Status);
+  Standard_EXPORT static void FunctionMultiply (const BSplSLib_EvaluatorFunction& Function, const Standard_Integer UBSplineDegree, const Standard_Integer VBSplineDegree, const TColStd_Array1OfReal& UBSplineKnots, const TColStd_Array1OfReal& VBSplineKnots, const TColStd_Array1OfInteger* UMults, const TColStd_Array1OfInteger* VMults, const TColgp_Array2OfPnt& Poles, const TColStd_Array2OfReal* Weights, const TColStd_Array1OfReal& UFlatKnots, const TColStd_Array1OfReal& VFlatKnots, const Standard_Integer UNewDegree, const Standard_Integer VNewDegree, TColgp_Array2OfPnt& NewNumerator, TColStd_Array2OfReal& NewDenominator, Standard_Integer& Status);
 
 
 
index 00369c9..3f385bd 100644 (file)
@@ -26,7 +26,7 @@
 inline void BSplSLib::CoefsD0(const Standard_Real U, 
                              const Standard_Real V, 
                              const TColgp_Array2OfPnt& Poles, 
-                             const TColStd_Array2OfReal& Weights, 
+                             const TColStd_Array2OfReal* Weights, 
                              gp_Pnt& Point)
 {
   BSplSLib::CacheD0(U, V,
@@ -43,7 +43,7 @@ inline void BSplSLib::CoefsD0(const Standard_Real U,
 inline void BSplSLib::CoefsD1(const Standard_Real U, 
                              const Standard_Real V, 
                              const TColgp_Array2OfPnt& Poles, 
-                             const TColStd_Array2OfReal& Weights, 
+                             const TColStd_Array2OfReal* Weights, 
                              gp_Pnt& Point, 
                              gp_Vec& VecU, 
                              gp_Vec& VecV)
@@ -62,7 +62,7 @@ inline void BSplSLib::CoefsD1(const Standard_Real U,
 inline void BSplSLib::CoefsD2(const Standard_Real U, 
                              const Standard_Real V, 
                              const TColgp_Array2OfPnt& Poles, 
-                             const TColStd_Array2OfReal& Weights, 
+                             const TColStd_Array2OfReal* Weights, 
                              gp_Pnt& Point,
                              gp_Vec& VecU, 
                              gp_Vec& VecV, 
@@ -95,8 +95,8 @@ inline void BSplSLib::PolesCoefficients(const TColgp_Array2OfPnt& Poles,
 //purpose  : 
 //=======================================================================
 
-inline TColStd_Array2OfReal&  BSplSLib::NoWeights()
+inline TColStd_Array2OfReal*  BSplSLib::NoWeights()
 {
-  return (*((TColStd_Array2OfReal*) NULL));
+  return NULL;
 }
 
index 0faf6b6..5e6abc0 100644 (file)
@@ -30,9 +30,9 @@
 //=======================================================================
 
 void BSplSLib::PolesCoefficients (const TColgp_Array2OfPnt& Poles, 
-                                 const TColStd_Array2OfReal& Weights, 
+                                 const TColStd_Array2OfReal* Weights, 
                                  TColgp_Array2OfPnt& CachePoles, 
-                                 TColStd_Array2OfReal& CacheWeights)
+                                 TColStd_Array2OfReal* CacheWeights)
 {
   Standard_Integer i;
   Standard_Integer uclas = Poles.ColLength(); 
@@ -67,8 +67,8 @@ void BSplSLib::PolesCoefficients (const TColgp_Array2OfPnt& Poles,
                         uclas - 1,vclas - 1,0,0,
                         biduflatknots,bidvflatknots,
                         Poles,Weights,
-                        CPoles,CWeights);
-    if (&Weights == NULL) {
+                        CPoles,&CWeights);
+    if (Weights == NULL) {
       
       for (ii = 1; ii <= uclas; ii++) {
        
@@ -83,7 +83,7 @@ void BSplSLib::PolesCoefficients (const TColgp_Array2OfPnt& Poles,
        
        for (jj = 1; jj <= vclas; jj++) {
          CachePoles  (ii, jj) = CPoles  (jj, ii);
-         CacheWeights(ii, jj) = CWeights(jj, ii);
+         (*CacheWeights)(ii, jj) = CWeights(jj, ii);
        }
       }
     }
index 6946c18..33ebb37 100644 (file)
@@ -49,7 +49,7 @@ BSplSLib_Cache::BSplSLib_Cache(const Standard_Integer&        theDegreeU,
                                const Standard_Boolean&        thePeriodicV,
                                const TColStd_Array1OfReal&    theFlatKnotsV,
                                const TColgp_Array2OfPnt&      thePoles,
-                               const TColStd_Array2OfReal&    theWeights)
+                               const TColStd_Array2OfReal*    theWeights)
 {
   Standard_Real aU = theFlatKnotsU.Value(theFlatKnotsU.Lower() + theDegreeU);
   Standard_Real aV = theFlatKnotsV.Value(theFlatKnotsV.Lower() + theDegreeV);
@@ -107,7 +107,7 @@ void BSplSLib_Cache::BuildCache(const Standard_Real&           theParameterU,
                                 const Standard_Boolean&        thePeriodicV, 
                                 const TColStd_Array1OfReal&    theFlatKnotsV, 
                                 const TColgp_Array2OfPnt&      thePoles, 
-                                const TColStd_Array2OfReal&    theWeights)
+                                const TColStd_Array2OfReal*    theWeights)
 {
   // Normalize the parameters for periodical B-splines
   Standard_Real aNewParamU = theParameterU;
@@ -134,7 +134,7 @@ void BSplSLib_Cache::BuildCache(const Standard_Real&           theParameterU,
   Standard_Integer aMaxDegree = Max(theDegreeU, theDegreeV);
 
   // Change the size of cached data if needed
-  myIsRational = (&theWeights != NULL);
+  myIsRational = (theWeights != NULL);
   Standard_Integer aPWColNumber = myIsRational ? 4 : 3;
   if (theDegreeU > myDegree[0] || theDegreeV > myDegree[1])
     myPolesWeights = new TColStd_HArray2OfReal(1, aMaxDegree + 1, 1, aPWColNumber * (aMinDegree + 1));
index 59e677b..942899b 100644 (file)
 #include <TColStd_Array1OfReal.hxx>
 #include <TColStd_Array2OfReal.hxx>
 
-#ifndef NOWEIGHTS_SURF
-#define NOWEIGHTS_SURF (*((TColStd_Array2OfReal*) NULL))
-#endif
-
 //! \brief A cache class for B-spline surfaces.
 //!
 //! Defines all data, that can be cached on a span of B-spline surface.
@@ -58,7 +54,7 @@ public:
                                  const Standard_Boolean&        thePeriodicV,
                                  const TColStd_Array1OfReal&    theFlatKnotsV,
                                  const TColgp_Array2OfPnt&      thePoles,
-                                 const TColStd_Array2OfReal&    theWeights = NOWEIGHTS_SURF);
+                                 const TColStd_Array2OfReal*    theWeights = NULL);
 
   //! Verifies validity of the cache using parameters of the point
   //! \param theParameterU  first parameter of the point placed in the span
@@ -86,7 +82,7 @@ public:
                                   const Standard_Boolean&        thePeriodicV, 
                                   const TColStd_Array1OfReal&    theFlatKnotsV, 
                                   const TColgp_Array2OfPnt&      thePoles, 
-                                  const TColStd_Array2OfReal&    theWeights = NOWEIGHTS_SURF);
+                                  const TColStd_Array2OfReal*    theWeights = NULL);
 
   //! Calculates the point on B-spline for specified parameters
   //! \param[in]  theU      first parameter for calculation of the value
index a282273..74c270f 100644 (file)
@@ -173,8 +173,8 @@ void Convert_CompBezierCurves2dToBSplineCurve2d::Perform()
     Inc = myDegree - Deg;
     if ( Inc > 0) {
       BSplCLib::IncreaseDegree(myDegree, 
-                              mySequence(i)->Array1(), PLib::NoWeights(),
-                              Points, PLib::NoWeights());
+                              mySequence(i)->Array1(), BSplCLib::NoWeights(),
+                              Points, BSplCLib::NoWeights());
     }
     else {
       Points = mySequence(i)->Array1();
index 9eb4b3d..2e7ae3d 100644 (file)
@@ -169,8 +169,8 @@ void Convert_CompBezierCurvesToBSplineCurve::Perform()
     Inc = myDegree - Deg;
     if ( Inc > 0) {
       BSplCLib::IncreaseDegree(myDegree, 
-                              mySequence(i)->Array1(), PLib::NoWeights(), 
-                              Points, PLib::NoWeights());
+                              mySequence(i)->Array1(), BSplCLib::NoWeights(), 
+                              Points, BSplCLib::NoWeights());
     }
     else {
       Points = mySequence(i)->Array1();
index dc499cb..7ca0086 100644 (file)
@@ -176,7 +176,7 @@ void CosAndSinRationalC1(Standard_Real Parameter,
                          const Standard_Integer         EvalDegree,
                          const TColgp_Array1OfPnt2d&    EvalPoles,
                          const TColStd_Array1OfReal&    EvalKnots,
-                         const TColStd_Array1OfInteger& EvalMults,
+                         const TColStd_Array1OfInteger* EvalMults,
                          Standard_Real Result[2]) 
 {
  gp_Pnt2d a_point ;
@@ -216,7 +216,7 @@ void  CosAndSinQuasiAngular(Standard_Real  Parameter,
 //                         const TColStd_Array1OfReal&    EvalKnots,
                            const TColStd_Array1OfReal&    ,
 //                         const TColStd_Array1OfInteger& EvalMults,
-                           const TColStd_Array1OfInteger& ,
+                           const TColStd_Array1OfInteger* ,
                            Standard_Real  Result[2])
 {
   Standard_Real 
@@ -249,7 +249,7 @@ void AlgorithmicCosAndSin(Standard_Integer               Degree,
                          const Standard_Integer         EvalDegree,
                          const TColgp_Array1OfPnt2d&    EvalPoles,
                          const TColStd_Array1OfReal&    EvalKnots,
-                         const TColStd_Array1OfInteger& EvalMults,
+                         const TColStd_Array1OfInteger* EvalMults,
                          Convert_CosAndSinEvalFunction  Evaluator,
                          TColStd_Array1OfReal&          CosNumerator,
                           TColStd_Array1OfReal&          SinNumerator,
@@ -571,7 +571,7 @@ void Convert_ConicToBSplineCurve::BuildCosAndSin(
                         temp_degree,
                         temp_poles,
                         temp_knots,
-                        temp_mults,
+                        &temp_mults,
                         *EvaluatorPtr,
                         CosNumeratorPtr->ChangeArray1(),
                         SinNumeratorPtr->ChangeArray1(),
@@ -744,9 +744,9 @@ void Convert_ConicToBSplineCurve::BuildCosAndSin(
                    temp_degree,
                    Standard_False,
                    temp_cos_ptr->Array1(),
-                   temp_denominator_ptr->Array1(),
+                   &temp_denominator_ptr->Array1(),
                    temp_knots_ptr->Array1(),
-                   temp_mults_ptr->Array1(),
+                   &temp_mults_ptr->Array1(),
                    value1) ;
 
        BSplCLib::D0(param,
@@ -754,9 +754,9 @@ void Convert_ConicToBSplineCurve::BuildCosAndSin(
                    temp_degree,
                    Standard_False,
                    temp_sin_ptr->Array1(),
-                   temp_denominator_ptr->Array1(),
+                   &temp_denominator_ptr->Array1(),
                    temp_knots_ptr->Array1(),
-                   temp_mults_ptr->Array1(),
+                   &temp_mults_ptr->Array1(),
                    value2) ;
        BSplCLib::D0(param,
                    0,
@@ -765,7 +765,7 @@ void Convert_ConicToBSplineCurve::BuildCosAndSin(
                    temp_denominator_ptr->Array1(),
                    BSplCLib::NoWeights(),
                    temp_knots_ptr->Array1(),
-                   temp_mults_ptr->Array1(),
+                   &temp_mults_ptr->Array1(),
                    value3) ;
      contact_order_array(ii) = 0 ;
      
index 52bf590..340995f 100644 (file)
@@ -25,7 +25,7 @@ typedef void   Convert_CosAndSinEvalFunction(Standard_Real,
                                             const Standard_Integer,
                                             const TColgp_Array1OfPnt2d&,
                                             const TColStd_Array1OfReal&, 
-                                            const TColStd_Array1OfInteger&,
+                                            const TColStd_Array1OfInteger*,
                                             Standard_Real Result[2]) ; 
 
 #endif
index c5507f7..505bbcf 100644 (file)
@@ -96,7 +96,7 @@ FairCurve_Batten::FairCurve_Batten(const gp_Pnt2d& P1,
                            Iknots->Array1(), 
                            Imults->Array1(), 
                            Npoles->ChangeArray1(),
-                           Nweight->ChangeArray1(),
+                           &Nweight->ChangeArray1(),
                            Nknots->ChangeArray1(),
                            Nmults->ChangeArray1() );
 
index 6a386c2..286ffcc 100644 (file)
@@ -262,9 +262,9 @@ void Geom_BSplineCurve::IncreaseDegree  (const Standard_Integer Degree)
     
     BSplCLib::IncreaseDegree
       (deg,Degree, periodic,
-       poles->Array1(),weights->Array1(),
+       poles->Array1(),&weights->Array1(),
        knots->Array1(),mults->Array1(),
-       npoles->ChangeArray1(),nweights->ChangeArray1(),
+       npoles->ChangeArray1(),&nweights->ChangeArray1(),
        nknots->ChangeArray1(),nmults->ChangeArray1());
   }
   else {
@@ -273,7 +273,7 @@ void Geom_BSplineCurve::IncreaseDegree  (const Standard_Integer Degree)
        poles->Array1(),BSplCLib::NoWeights(),
        knots->Array1(),mults->Array1(),
        npoles->ChangeArray1(),
-       *((TColStd_Array1OfReal*) NULL),
+       BSplCLib::NoWeights(),
        nknots->ChangeArray1(),nmults->ChangeArray1());
   }
 
@@ -369,7 +369,7 @@ void  Geom_BSplineCurve::InsertKnots(const TColStd_Array1OfReal& Knots,
 
   if (!BSplCLib::PrepareInsertKnots(deg,periodic,
                                    knots->Array1(),mults->Array1(),
-                                   Knots,Mults,nbpoles,nbknots,Epsilon,Add))
+                                   Knots,&Mults,nbpoles,nbknots,Epsilon,Add))
     Standard_ConstructionError::Raise("Geom_BSplineCurve::InsertKnots");
 
   if (nbpoles == poles->Length()) return;
@@ -387,10 +387,10 @@ void  Geom_BSplineCurve::InsertKnots(const TColStd_Array1OfReal& Knots,
     Handle(TColStd_HArray1OfReal) nweights = 
       new TColStd_HArray1OfReal(1,nbpoles);
     BSplCLib::InsertKnots(deg,periodic,
-                         poles->Array1(), weights->Array1(),
+                         poles->Array1(), &weights->Array1(),
                          knots->Array1(), mults->Array1(),
-                         Knots, Mults,
-                         npoles->ChangeArray1(), nweights->ChangeArray1(),
+                         Knots, &Mults,
+                         npoles->ChangeArray1(), &nweights->ChangeArray1(),
                          nknots->ChangeArray1(), nmults->ChangeArray1(),
                          Epsilon, Add);
     weights = nweights;
@@ -399,9 +399,9 @@ void  Geom_BSplineCurve::InsertKnots(const TColStd_Array1OfReal& Knots,
     BSplCLib::InsertKnots(deg,periodic,
                          poles->Array1(), BSplCLib::NoWeights(),
                          knots->Array1(), mults->Array1(),
-                         Knots, Mults,
+                         Knots, &Mults,
                          npoles->ChangeArray1(),
-                         *((TColStd_Array1OfReal*) NULL),
+        BSplCLib::NoWeights(),
                          nknots->ChangeArray1(), nmults->ChangeArray1(),
                          Epsilon, Add);
   }
@@ -455,9 +455,9 @@ Standard_Boolean  Geom_BSplineCurve::RemoveKnot(const Standard_Integer Index,
       new TColStd_HArray1OfReal(1,npoles->Length());
     if (!BSplCLib::RemoveKnot
        (Index, M, deg, periodic,
-        poles->Array1(),weights->Array1(), 
+        poles->Array1(),&weights->Array1(), 
         knots->Array1(),mults->Array1(),
-        npoles->ChangeArray1(), nweights->ChangeArray1(),
+        npoles->ChangeArray1(), &nweights->ChangeArray1(),
         nknots->ChangeArray1(),nmults->ChangeArray1(),
         Tolerance))
       return Standard_False;
@@ -469,7 +469,7 @@ Standard_Boolean  Geom_BSplineCurve::RemoveKnot(const Standard_Integer Index,
         poles->Array1(), BSplCLib::NoWeights(),
         knots->Array1(),mults->Array1(),
         npoles->ChangeArray1(),
-        *((TColStd_Array1OfReal*) NULL),
+   BSplCLib::NoWeights(),
         nknots->ChangeArray1(),nmults->ChangeArray1(),
         Tolerance))
       return Standard_False;
@@ -936,9 +936,9 @@ void Geom_BSplineCurve::SetNotPeriodic ()
       
       BSplCLib::Unperiodize
        (deg,mults->Array1(),knots->Array1(),poles->Array1(),
-        weights->Array1(),nmults->ChangeArray1(),
+        &weights->Array1(),nmults->ChangeArray1(),
         nknots->ChangeArray1(),npoles->ChangeArray1(),
-        nweights->ChangeArray1());
+        &nweights->ChangeArray1());
       
     }
     else {
@@ -947,7 +947,7 @@ void Geom_BSplineCurve::SetNotPeriodic ()
        (deg,mults->Array1(),knots->Array1(),poles->Array1(),
         BSplCLib::NoWeights(),nmults->ChangeArray1(),
         nknots->ChangeArray1(),npoles->ChangeArray1(),
-        *((TColStd_Array1OfReal*) NULL));
+   BSplCLib::NoWeights());
       
     }
     poles   = npoles;
index 919fe00..d749f22 100644 (file)
@@ -770,7 +770,7 @@ public:
   Standard_EXPORT void Weights (TColStd_Array1OfReal& W) const;
   
   //! Returns the weights of the B-spline curve;
-  Standard_EXPORT const TColStd_Array1OfReal& Weights() const;
+  Standard_EXPORT const TColStd_Array1OfReal* Weights() const;
   
   //! Applies the transformation T to this BSpline curve.
   Standard_EXPORT void Transform (const gp_Trsf& T);
index eab23c6..2cb0abe 100644 (file)
@@ -189,21 +189,21 @@ void Geom_BSplineCurve::D0(const Standard_Real U, gp_Pnt& P) const
   Standard_Integer aSpanIndex = 0;
   Standard_Real aNewU(U);
   PeriodicNormalization(aNewU);
-  BSplCLib::LocateParameter(deg, knots->Array1(), mults->Array1(), U, periodic, aSpanIndex, aNewU);
+  BSplCLib::LocateParameter(deg, knots->Array1(), &mults->Array1(), U, periodic, aSpanIndex, aNewU);
   if (aNewU < knots->Value(aSpanIndex))
     aSpanIndex--;
   if (rational) 
   {
     BSplCLib::D0(aNewU,aSpanIndex,deg,periodic,POLES,
-      weights->Array1(),
-      knots->Array1(), mults->Array1(),
+      &weights->Array1(),
+      knots->Array1(), &mults->Array1(),
       P);
   }
   else 
   {
     BSplCLib::D0(aNewU,aSpanIndex,deg,periodic,POLES,
-      *((TColStd_Array1OfReal*) NULL),
-      knots->Array1(), mults->Array1(),
+      BSplCLib::NoWeights(),
+      knots->Array1(), &mults->Array1(),
       P);
   }
 }
@@ -220,21 +220,21 @@ void Geom_BSplineCurve::D1 (const Standard_Real U,
   Standard_Integer aSpanIndex = 0;
   Standard_Real aNewU(U);
   PeriodicNormalization(aNewU);
-  BSplCLib::LocateParameter(deg, knots->Array1(), mults->Array1(), U, periodic, aSpanIndex, aNewU);
+  BSplCLib::LocateParameter(deg, knots->Array1(), &mults->Array1(), U, periodic, aSpanIndex, aNewU);
   if (aNewU < knots->Value(aSpanIndex))
     aSpanIndex--;
   if (rational) 
   {
     BSplCLib::D1(aNewU,aSpanIndex,deg,periodic,POLES,
-      weights->Array1(),
-      knots->Array1(), mults->Array1(),
+      &weights->Array1(),
+      knots->Array1(), &mults->Array1(),
       P, V1);
   }
   else 
   {
     BSplCLib::D1(aNewU,aSpanIndex,deg,periodic,POLES,
-      *((TColStd_Array1OfReal*) NULL),
-      knots->Array1(), mults->Array1(),
+      BSplCLib::NoWeights(),
+      knots->Array1(), &mults->Array1(),
       P, V1);
   }
 }
@@ -252,21 +252,21 @@ void Geom_BSplineCurve::D2(const Standard_Real U,
   Standard_Integer aSpanIndex = 0;
   Standard_Real aNewU(U);
   PeriodicNormalization(aNewU);
-  BSplCLib::LocateParameter(deg, knots->Array1(), mults->Array1(), U, periodic, aSpanIndex, aNewU);
+  BSplCLib::LocateParameter(deg, knots->Array1(), &mults->Array1(), U, periodic, aSpanIndex, aNewU);
   if (aNewU < knots->Value(aSpanIndex))
     aSpanIndex--;
   if (rational) 
   {
     BSplCLib::D2(aNewU,aSpanIndex,deg,periodic,POLES,
-      weights->Array1(),
-      knots->Array1(), mults->Array1(),
+      &weights->Array1(),
+      knots->Array1(), &mults->Array1(),
       P, V1, V2);
   }
   else 
   {
     BSplCLib::D2(aNewU,aSpanIndex,deg,periodic,POLES,
-      *((TColStd_Array1OfReal*) NULL),
-      knots->Array1(), mults->Array1(),
+      BSplCLib::NoWeights(),
+      knots->Array1(), &mults->Array1(),
       P, V1, V2);
   }
 }
@@ -285,21 +285,21 @@ void Geom_BSplineCurve::D3(const Standard_Real U,
   Standard_Integer aSpanIndex = 0;
   Standard_Real aNewU(U);
   PeriodicNormalization(aNewU);
-  BSplCLib::LocateParameter(deg, knots->Array1(), mults->Array1(), U, periodic, aSpanIndex, aNewU);
+  BSplCLib::LocateParameter(deg, knots->Array1(), &mults->Array1(), U, periodic, aSpanIndex, aNewU);
   if (aNewU < knots->Value(aSpanIndex))
     aSpanIndex--;
   if (rational) 
   {
     BSplCLib::D3(aNewU,aSpanIndex,deg,periodic,POLES,
-      weights->Array1(),
-      knots->Array1(), mults->Array1(),
+      &weights->Array1(),
+      knots->Array1(), &mults->Array1(),
       P, V1, V2, V3);
   }
   else 
   {
     BSplCLib::D3(aNewU,aSpanIndex,deg,periodic,POLES,
-      *((TColStd_Array1OfReal*) NULL),
-      knots->Array1(), mults->Array1(),
+      BSplCLib::NoWeights(),
+      knots->Array1(), &mults->Array1(),
       P, V1, V2, V3);
   }
 }
@@ -315,12 +315,12 @@ gp_Vec Geom_BSplineCurve::DN(const Standard_Real    U,
   gp_Vec V;
   if (rational) {
     BSplCLib::DN(U,N,0,deg,periodic,POLES,
-      weights->Array1(),
+      &weights->Array1(),
       FKNOTS,FMULTS,V);
   }
   else {
     BSplCLib::DN(U,N,0,deg,periodic,POLES,
-      *((TColStd_Array1OfReal*) NULL),
+      BSplCLib::NoWeights(),
       FKNOTS,FMULTS,V);
   }
   return V;
@@ -476,12 +476,12 @@ void  Geom_BSplineCurve::LocalD0
   index = BSplCLib::FlatIndex(deg,index,mults->Array1(),periodic);
   if (rational) {
     BSplCLib::D0(u,index,deg,periodic,POLES,
-                weights->Array1(),
+                &weights->Array1(),
                 FKNOTS,FMULTS,P);
   }
   else {
     BSplCLib::D0(u,index,deg,periodic,POLES,
-                *((TColStd_Array1OfReal*) NULL),
+     BSplCLib::NoWeights(),
                 FKNOTS,FMULTS,P);
   }
 }
@@ -506,12 +506,12 @@ void Geom_BSplineCurve::LocalD1 (const Standard_Real    U,
   index = BSplCLib::FlatIndex(deg,index,mults->Array1(),periodic);
   if (rational) {
     BSplCLib::D1(u,index,deg,periodic,POLES,
-                weights->Array1(),
+                &weights->Array1(),
                 FKNOTS,FMULTS,P,V1);
   }
   else {
     BSplCLib::D1(u,index,deg,periodic,POLES,
-                *((TColStd_Array1OfReal*) NULL),
+                BSplCLib::NoWeights(),
                 FKNOTS,FMULTS,P,V1);
   }
 }
@@ -538,12 +538,12 @@ void Geom_BSplineCurve::LocalD2
   index = BSplCLib::FlatIndex(deg,index,mults->Array1(),periodic);
   if (rational) {
     BSplCLib::D2(u,index,deg,periodic,POLES,
-                weights->Array1(),
+                &weights->Array1(),
                 FKNOTS,FMULTS,P,V1,V2);
   }
   else {
     BSplCLib::D2(u,index,deg,periodic,POLES,
-                *((TColStd_Array1OfReal*) NULL),
+                BSplCLib::NoWeights(),
                 FKNOTS,FMULTS,P,V1,V2);
   }
 }
@@ -571,12 +571,12 @@ void Geom_BSplineCurve::LocalD3
   index = BSplCLib::FlatIndex(deg,index,mults->Array1(),periodic);
   if (rational) {
     BSplCLib::D3(u,index,deg,periodic,POLES,
-                weights->Array1(),
+                &weights->Array1(),
                 FKNOTS,FMULTS,P,V1,V2,V3);
   }
   else {
     BSplCLib::D3(u,index,deg,periodic,POLES,
-                *((TColStd_Array1OfReal*) NULL),
+                BSplCLib::NoWeights(),
                 FKNOTS,FMULTS,P,V1,V2,V3);
   }
 }
@@ -603,12 +603,12 @@ gp_Vec Geom_BSplineCurve::LocalDN
   gp_Vec V;
   if (rational) {
     BSplCLib::DN(u,N,index,deg,periodic,POLES,
-                weights->Array1(),
+                &weights->Array1(),
                 FKNOTS,FMULTS,V);
   }
   else {
     BSplCLib::DN(u,N,index,deg,periodic,POLES,
-                *((TColStd_Array1OfReal*) NULL),
+                BSplCLib::NoWeights(),
                 FKNOTS,FMULTS,V);
   }
   return V;
@@ -738,10 +738,10 @@ void Geom_BSplineCurve::Weights
   }
 }
 
-const TColStd_Array1OfReal& Geom_BSplineCurve::Weights() const
+const TColStd_Array1OfReal* Geom_BSplineCurve::Weights() const
 {
   if (IsRational())
-    return weights->Array1();
+    return &weights->Array1();
   return BSplCLib::NoWeights();
 }
 
@@ -845,7 +845,7 @@ void Geom_BSplineCurve::Resolution(const Standard_Real Tolerance3D,
          new_weights(ii) = weights->Array1()((ii-1) % poles->Length() + 1) ;
        }
        BSplCLib::Resolution(new_poles,
-                            new_weights,
+                            &new_weights,
                             new_poles.Length(),
                             flatknots->Array1(),
                             deg,
@@ -854,7 +854,7 @@ void Geom_BSplineCurve::Resolution(const Standard_Real Tolerance3D,
       }
       else {
        BSplCLib::Resolution(new_poles,
-                            *((TColStd_Array1OfReal*) NULL),
+                            BSplCLib::NoWeights(),
                             new_poles.Length(),
                             flatknots->Array1(),
                             deg,
@@ -866,7 +866,7 @@ void Geom_BSplineCurve::Resolution(const Standard_Real Tolerance3D,
     else {
       if (rational) {
        BSplCLib::Resolution(poles->Array1(),
-                            weights->Array1(),
+                            &weights->Array1(),
                             poles->Length(),
                             flatknots->Array1(),
                             deg,
@@ -875,7 +875,7 @@ void Geom_BSplineCurve::Resolution(const Standard_Real Tolerance3D,
       }
       else {
        BSplCLib::Resolution(poles->Array1(),
-                            *((TColStd_Array1OfReal*) NULL),
+                            BSplCLib::NoWeights(),
                             poles->Length(),
                             flatknots->Array1(),
                             deg,
index f83dd3f..5a854e9 100644 (file)
@@ -383,9 +383,9 @@ void Geom_BSplineSurface::IncreaseDegree (const Standard_Integer UDegree,
       
       BSplSLib::IncreaseDegree
        (Standard_True, udeg, UDegree, uperiodic,
-        poles->Array2(),weights->Array2(),
+        poles->Array2(),&weights->Array2(),
         uknots->Array1(),umults->Array1(),
-        npoles->ChangeArray2(),nweights->ChangeArray2(),
+        npoles->ChangeArray2(),&nweights->ChangeArray2(),
         nknots->ChangeArray1(),nmults->ChangeArray1());
     }
     else {
@@ -394,7 +394,7 @@ void Geom_BSplineSurface::IncreaseDegree (const Standard_Integer UDegree,
        (Standard_True, udeg, UDegree, uperiodic,
         poles->Array2(),BSplSLib::NoWeights(),
         uknots->Array1(),umults->Array1(),
-        npoles->ChangeArray2(),*((TColStd_Array2OfReal*) NULL),
+        npoles->ChangeArray2(),BSplSLib::NoWeights(),
         nknots->ChangeArray1(),nmults->ChangeArray1());
     }
     udeg    = UDegree;
@@ -435,9 +435,9 @@ void Geom_BSplineSurface::IncreaseDegree (const Standard_Integer UDegree,
       
       BSplSLib::IncreaseDegree
        (Standard_False, vdeg, VDegree, vperiodic,
-        poles->Array2(),weights->Array2(),
+        poles->Array2(),&weights->Array2(),
         vknots->Array1(),vmults->Array1(),
-        npoles->ChangeArray2(),nweights->ChangeArray2(),
+        npoles->ChangeArray2(),&nweights->ChangeArray2(),
         nknots->ChangeArray1(),nmults->ChangeArray1());
     }
     else {
@@ -446,7 +446,7 @@ void Geom_BSplineSurface::IncreaseDegree (const Standard_Integer UDegree,
        (Standard_False, vdeg, VDegree, vperiodic,
         poles->Array2(),BSplSLib::NoWeights(),
         vknots->Array1(),vmults->Array1(),
-        npoles->ChangeArray2(),*((TColStd_Array2OfReal*) NULL),
+        npoles->ChangeArray2(),BSplSLib::NoWeights(),
         nknots->ChangeArray1(),nmults->ChangeArray1());
     }
     vdeg    = VDegree;
index 66ad128..f3dcb92 100644 (file)
@@ -991,7 +991,7 @@ public:
   
   //! Returns the weights of the B-spline surface.
   //! value and derivatives computation
-  Standard_EXPORT const TColStd_Array2OfReal& Weights() const;
+  Standard_EXPORT const TColStd_Array2OfReal* Weights() const;
   
   Standard_EXPORT void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const;
   
index 8fc3cde..f0ade1c 100644 (file)
@@ -119,7 +119,7 @@ void Geom_BSplineSurface::D0(const Standard_Real U,
   Standard_Real aNewV = V;
   PeriodicNormalization(aNewU, aNewV);
 
-  BSplSLib::D0(aNewU,aNewV,0,0,POLES,WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
+  BSplSLib::D0(aNewU,aNewV,0,0,POLES,&WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
        udeg,vdeg,urational,vrational,uperiodic,vperiodic,
        P);
 }
@@ -141,13 +141,13 @@ void Geom_BSplineSurface::D1(const Standard_Real U,
 
   Standard_Integer uindex = 0, vindex = 0;
 
-  BSplCLib::LocateParameter(udeg, uknots->Array1(), umults->Array1(), U, uperiodic, uindex, aNewU);
+  BSplCLib::LocateParameter(udeg, uknots->Array1(), &umults->Array1(), U, uperiodic, uindex, aNewU);
   uindex = BSplCLib::FlatIndex(udeg, uindex, umults->Array1(), uperiodic);
 
-  BSplCLib::LocateParameter(vdeg, vknots->Array1(), vmults->Array1(), V, vperiodic, vindex, aNewV);
+  BSplCLib::LocateParameter(vdeg, vknots->Array1(), &vmults->Array1(), V, vperiodic, vindex, aNewV);
   vindex = BSplCLib::FlatIndex(vdeg, vindex, vmults->Array1(), vperiodic);
 
-  BSplSLib::D1(aNewU,aNewV,uindex,vindex,POLES,WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
+  BSplSLib::D1(aNewU,aNewV,uindex,vindex,POLES,&WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
        udeg,vdeg,urational,vrational,uperiodic,vperiodic,
        P, D1U, D1V);
 }
@@ -172,13 +172,13 @@ void Geom_BSplineSurface::D2 (const Standard_Real U,
 
   Standard_Integer uindex = 0, vindex = 0;
 
-  BSplCLib::LocateParameter(udeg, uknots->Array1(), umults->Array1(), U, uperiodic, uindex, aNewU);
+  BSplCLib::LocateParameter(udeg, uknots->Array1(), &umults->Array1(), U, uperiodic, uindex, aNewU);
   uindex = BSplCLib::FlatIndex(udeg, uindex, umults->Array1(), uperiodic);
 
-  BSplCLib::LocateParameter(vdeg, vknots->Array1(), vmults->Array1(), V, vperiodic, vindex, aNewV);
+  BSplCLib::LocateParameter(vdeg, vknots->Array1(), &vmults->Array1(), V, vperiodic, vindex, aNewV);
   vindex = BSplCLib::FlatIndex(vdeg, vindex, vmults->Array1(), vperiodic);
 
-  BSplSLib::D2(aNewU,aNewV,uindex,vindex,POLES,WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
+  BSplSLib::D2(aNewU,aNewV,uindex,vindex,POLES,&WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
        udeg,vdeg,urational,vrational,uperiodic,vperiodic,
        P, D1U, D1V, D2U, D2V, D2UV);
 }
@@ -201,7 +201,7 @@ void Geom_BSplineSurface::D3 (const Standard_Real U,
                                    gp_Vec&       D3UUV,
                                    gp_Vec&       D3UVV) const
 {
-  BSplSLib::D3(U,V,0,0,POLES,WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
+  BSplSLib::D3(U,V,0,0,POLES,&WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
               udeg,vdeg,urational,vrational,uperiodic,vperiodic,
               P,D1U,D1V,D2U,D2V,D2UV,D3U,D3V,D3UUV,D3UVV);
   }
@@ -217,7 +217,7 @@ gp_Vec Geom_BSplineSurface::DN (const Standard_Real    U,
                                const Standard_Integer Nv ) const
 {
   gp_Vec Vn;
-  BSplSLib::DN(U,V,Nu,Nv,0,0,POLES,WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
+  BSplSLib::DN(U,V,Nu,Nv,0,0,POLES,&WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
               udeg,vdeg,urational,vrational,uperiodic,vperiodic,
               Vn);
   return Vn;
@@ -268,7 +268,7 @@ void Geom_BSplineSurface::LocalD0 (const Standard_Real    U,
   vindex = BSplCLib::FlatIndex(vdeg,vindex,vmults->Array1(),vperiodic);
 
 //  BSplSLib::D0(U,V,uindex,vindex,POLES,WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
-  BSplSLib::D0(u,v,uindex,vindex,POLES,WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
+  BSplSLib::D0(u,v,uindex,vindex,POLES,&WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
               udeg,vdeg,urational,vrational,uperiodic,vperiodic,
               P);
 }
@@ -302,7 +302,7 @@ void Geom_BSplineSurface::LocalD1 (const Standard_Real    U,
                            vindex,v);
   vindex = BSplCLib::FlatIndex(vdeg,vindex,vmults->Array1(),vperiodic);
 
-  BSplSLib::D1(u,v,uindex,vindex,POLES,WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
+  BSplSLib::D1(u,v,uindex,vindex,POLES,&WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
               udeg,vdeg,urational,vrational,uperiodic,vperiodic,
               P,D1U,D1V);
 }
@@ -339,7 +339,7 @@ void Geom_BSplineSurface::LocalD2 (const Standard_Real    U,
                            vindex,v);
   vindex = BSplCLib::FlatIndex(vdeg,vindex,vmults->Array1(),vperiodic);
 
-  BSplSLib::D2(u,v,uindex,vindex,POLES,WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
+  BSplSLib::D2(u,v,uindex,vindex,POLES,&WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
               udeg,vdeg,urational,vrational,uperiodic,vperiodic,
               P,D1U,D1V,D2U,D2V,D2UV);
 }
@@ -380,7 +380,7 @@ void Geom_BSplineSurface::LocalD3 (const Standard_Real    U,
                            vindex,v);
   vindex = BSplCLib::FlatIndex(vdeg,vindex,vmults->Array1(),vperiodic);
 
-  BSplSLib::D3(u,v,uindex,vindex,POLES,WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
+  BSplSLib::D3(u,v,uindex,vindex,POLES,&WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
               udeg,vdeg,urational,vrational,uperiodic,vperiodic,
               P,D1U,D1V,D2U,D2V,D2UV,D3U,D3V,D3UUV,D3UVV);
 }
@@ -415,7 +415,7 @@ gp_Vec Geom_BSplineSurface::LocalDN  (const Standard_Real    U,
 
   gp_Vec Vn;
   BSplSLib::DN(u,v,Nu,Nv,uindex,vindex,
-              POLES,WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
+              POLES,&WEIGHTS,UFKNOTS,VFKNOTS,FMULTS,FMULTS,
               udeg,vdeg,urational,vrational,uperiodic,vperiodic,
               Vn);
   return Vn;
@@ -466,8 +466,8 @@ Handle(Geom_Curve) Geom_BSplineSurface::UIso (const Standard_Real U) const
   Handle(Geom_BSplineCurve) C;
 
   if ( urational || vrational) {
-    BSplSLib::Iso(U,Standard_True,POLES,WEIGHTS,UFKNOTS,FMULTS,udeg,uperiodic,
-                 cpoles,cweights);
+    BSplSLib::Iso(U,Standard_True,POLES,&WEIGHTS,UFKNOTS,FMULTS,udeg,uperiodic,
+                 cpoles,&cweights);
     C = new Geom_BSplineCurve(cpoles,cweights,
                              vknots->Array1(),
                              vmults->Array1(),
@@ -475,9 +475,9 @@ Handle(Geom_Curve) Geom_BSplineSurface::UIso (const Standard_Real U) const
   }
   else {
     BSplSLib::Iso(U,Standard_True,POLES,
-                 *((TColStd_Array2OfReal*) NULL),
+                 BSplSLib::NoWeights(),
                  UFKNOTS,FMULTS,udeg,uperiodic,
-                 cpoles,cweights);
+                 cpoles,&cweights);
     C = new Geom_BSplineCurve(cpoles,
                              vknots->Array1(),
                              vmults->Array1(),
@@ -501,8 +501,8 @@ Handle(Geom_Curve) Geom_BSplineSurface::UIso (const Standard_Real U,
   Handle(Geom_BSplineCurve) C;
 
   if ( urational || vrational) {
-    BSplSLib::Iso(U,Standard_True,POLES,WEIGHTS,UFKNOTS,FMULTS,udeg,uperiodic,
-                 cpoles,cweights);
+    BSplSLib::Iso(U,Standard_True,POLES,&WEIGHTS,UFKNOTS,FMULTS,udeg,uperiodic,
+                 cpoles,&cweights);
     C = new Geom_BSplineCurve(cpoles,cweights,
                              vknots->Array1(),
                              vmults->Array1(),
@@ -511,9 +511,9 @@ Handle(Geom_Curve) Geom_BSplineSurface::UIso (const Standard_Real U,
   }
   else {
     BSplSLib::Iso(U,Standard_True,POLES,
-                 *((TColStd_Array2OfReal*) NULL),
+                 BSplSLib::NoWeights(),
                  UFKNOTS,FMULTS,udeg,uperiodic,
-                 cpoles,cweights);
+                 cpoles,&cweights);
     C = new Geom_BSplineCurve(cpoles,
                              vknots->Array1(),
                              vmults->Array1(),
@@ -651,9 +651,9 @@ Handle(Geom_Curve) Geom_BSplineSurface::VIso (const Standard_Real V) const
 
   if ( urational || vrational) {
     BSplSLib::Iso(V,Standard_False,POLES,
-                 WEIGHTS,
+                 &WEIGHTS,
                  VFKNOTS,FMULTS,vdeg,vperiodic,
-                 cpoles,cweights);
+                 cpoles,&cweights);
     C = new Geom_BSplineCurve(cpoles,cweights,
                              uknots->Array1(),
                              umults->Array1(),
@@ -661,9 +661,9 @@ Handle(Geom_Curve) Geom_BSplineSurface::VIso (const Standard_Real V) const
   }
   else {
     BSplSLib::Iso(V,Standard_False,POLES,
-                 *((TColStd_Array2OfReal*) NULL),
+                 BSplSLib::NoWeights(),
                  VFKNOTS,FMULTS,vdeg,vperiodic,
-                 cpoles,cweights);
+                 cpoles,&cweights);
     C = new Geom_BSplineCurve(cpoles,
                              uknots->Array1(),
                              umults->Array1(),
@@ -688,9 +688,9 @@ Handle(Geom_Curve) Geom_BSplineSurface::VIso (const Standard_Real V,
 
   if ( urational || vrational) {
     BSplSLib::Iso(V,Standard_False,POLES,
-                 WEIGHTS,
+                 &WEIGHTS,
                  VFKNOTS,FMULTS,vdeg,vperiodic,
-                 cpoles,cweights);
+                 cpoles,&cweights);
     C = new Geom_BSplineCurve(cpoles,cweights,
                              uknots->Array1(),
                              umults->Array1(),
@@ -699,9 +699,9 @@ Handle(Geom_Curve) Geom_BSplineSurface::VIso (const Standard_Real V,
   }
   else {
     BSplSLib::Iso(V,Standard_False,POLES,
-                 *((TColStd_Array2OfReal*) NULL),
+                 BSplSLib::NoWeights(),
                  VFKNOTS,FMULTS,vdeg,vperiodic,
-                 cpoles,cweights);
+                 cpoles,&cweights);
     C = new Geom_BSplineCurve(cpoles,
                              uknots->Array1(),
                              umults->Array1(),
@@ -767,10 +767,10 @@ void Geom_BSplineSurface::Weights (TColStd_Array2OfReal& W) const
   W = weights->Array2();
 }
 
-const TColStd_Array2OfReal& Geom_BSplineSurface::Weights() const
+const TColStd_Array2OfReal* Geom_BSplineSurface::Weights() const
 {
   if (urational || vrational)
-    return weights->Array2();
+    return &weights->Array2();
   return BSplSLib::NoWeights();
 }
 
@@ -1136,10 +1136,10 @@ void Geom_BSplineSurface::SetUNotPeriodic ()
 
       BSplSLib::Unperiodize(Standard_True         , udeg, 
                            umults->Array1()      , uknots->Array1(),
-                           poles->Array2()       , weights->Array2(),
+                           poles->Array2()       , &weights->Array2(),
                            nmults->ChangeArray1(), nknots->ChangeArray1(),
                            npoles->ChangeArray2(),
-                           nweights->ChangeArray2());
+                           &nweights->ChangeArray2());
     }
     else {
 
@@ -1148,7 +1148,7 @@ void Geom_BSplineSurface::SetUNotPeriodic ()
                            poles->Array2()       , BSplSLib::NoWeights(),
                            nmults->ChangeArray1(), nknots->ChangeArray1(),
                            npoles->ChangeArray2(),
-                           *((TColStd_Array2OfReal*) NULL));
+                           BSplSLib::NoWeights());
     }
     poles     = npoles;
     weights   = nweights;
@@ -1188,10 +1188,10 @@ void Geom_BSplineSurface::SetVNotPeriodic ()
 
       BSplSLib::Unperiodize(Standard_False        , vdeg, 
                            vmults->Array1()      , vknots->Array1(),
-                           poles->Array2()       , weights->Array2(),
+                           poles->Array2()       , &weights->Array2(),
                            nmults->ChangeArray1(), nknots->ChangeArray1(),
                            npoles->ChangeArray2(),
-                           nweights->ChangeArray2());
+                           &nweights->ChangeArray2());
     }
     else {
 
@@ -1200,7 +1200,7 @@ void Geom_BSplineSurface::SetVNotPeriodic ()
                            poles->Array2()       , BSplSLib::NoWeights(),
                            nmults->ChangeArray1(), nknots->ChangeArray1(),
                            npoles->ChangeArray2(),
-                           *((TColStd_Array2OfReal*) NULL));
+                           BSplSLib::NoWeights());
     }
     poles     = npoles;
     weights   = nweights;
@@ -1772,7 +1772,7 @@ void  Geom_BSplineSurface::InsertUKnots
 
   if ( !BSplCLib::PrepareInsertKnots(udeg,uperiodic,
                                     uknots->Array1(),umults->Array1(),
-                                    Knots,Mults,nbpoles,nbknots,
+                                    Knots,&Mults,nbpoles,nbknots,
                                     ParametricTolerance,Add))
     Standard_ConstructionError::Raise("Geom_BSplineSurface::InsertUKnots");
   
@@ -1795,11 +1795,11 @@ void  Geom_BSplineSurface::InsertUKnots
   if ( urational || vrational) {
     BSplSLib::InsertKnots(Standard_True,
                          udeg, uperiodic,
-                         poles->Array2() , weights->Array2(),
+                         poles->Array2() , &weights->Array2(),
                          uknots->Array1(), umults->Array1(),
-                         Knots, Mults,
+                         Knots, &Mults,
                          npoles->ChangeArray2(),
-                         nweights->ChangeArray2(),
+                         &nweights->ChangeArray2(),
                          nknots->ChangeArray1(), nmults->ChangeArray1(),
                          ParametricTolerance, Add);
   }
@@ -1808,9 +1808,9 @@ void  Geom_BSplineSurface::InsertUKnots
                          udeg, uperiodic,
                          poles->Array2() , BSplSLib::NoWeights(),
                          uknots->Array1(), umults->Array1(),
-                         Knots, Mults,
+                         Knots, &Mults,
                          npoles->ChangeArray2(),
-                         *((TColStd_Array2OfReal*) NULL),
+                         BSplSLib::NoWeights(),
                          nknots->ChangeArray1(), nmults->ChangeArray1(),
                          ParametricTolerance, Add);
   }
@@ -1839,7 +1839,7 @@ void  Geom_BSplineSurface::InsertVKnots
 
   if ( !BSplCLib::PrepareInsertKnots(vdeg,vperiodic,
                                     vknots->Array1(),vmults->Array1(),
-                                    Knots,Mults,nbpoles,nbknots,
+                                    Knots,&Mults,nbpoles,nbknots,
                                     ParametricTolerance, Add))
     Standard_ConstructionError::Raise("Geom_BSplineSurface::InsertVKnots");
   
@@ -1862,11 +1862,11 @@ void  Geom_BSplineSurface::InsertVKnots
   if ( urational || vrational) {
     BSplSLib::InsertKnots(Standard_False,
                          vdeg, vperiodic,
-                         poles->Array2() , weights->Array2(),
+                         poles->Array2() , &weights->Array2(),
                          vknots->Array1(), vmults->Array1(),
-                         Knots, Mults,
+                         Knots, &Mults,
                          npoles->ChangeArray2(),
-                         nweights->ChangeArray2(),
+                         &nweights->ChangeArray2(),
                          nknots->ChangeArray1(), nmults->ChangeArray1(),
                          ParametricTolerance, Add);
   }
@@ -1875,9 +1875,9 @@ void  Geom_BSplineSurface::InsertVKnots
                          vdeg, vperiodic,
                          poles->Array2() , BSplSLib::NoWeights(),
                          vknots->Array1(), vmults->Array1(),
-                         Knots, Mults,
+                         Knots, &Mults,
                          npoles->ChangeArray2(),
-                         *((TColStd_Array2OfReal*) NULL),
+                         BSplSLib::NoWeights(),
                          nknots->ChangeArray1(), nmults->ChangeArray1(),
                          ParametricTolerance, Add);
   }
@@ -1934,10 +1934,10 @@ Standard_Boolean  Geom_BSplineSurface::RemoveUKnot
                                1, npoles->RowLength());
     if (!BSplSLib::RemoveKnot(Standard_True,
                              Index,M,udeg,uperiodic,
-                             poles->Array2(),weights->Array2(),
+                             poles->Array2(),&weights->Array2(),
                              uknots->Array1(),umults->Array1(),
                              npoles->ChangeArray2(),
-                             nweights->ChangeArray2(),
+                             &nweights->ChangeArray2(),
                              nknots->ChangeArray1(),nmults->ChangeArray1(),
                              Tolerance))
       return Standard_False;
@@ -1955,7 +1955,7 @@ Standard_Boolean  Geom_BSplineSurface::RemoveUKnot
                              poles->Array2(),BSplSLib::NoWeights(),
                              uknots->Array1(),umults->Array1(),
                              npoles->ChangeArray2(),
-                             *((TColStd_Array2OfReal*) NULL),
+                             BSplSLib::NoWeights(),
                              nknots->ChangeArray1(),nmults->ChangeArray1(),
                              Tolerance))
       return Standard_False;
@@ -2017,10 +2017,10 @@ Standard_Boolean  Geom_BSplineSurface::RemoveVKnot
 
     if (!BSplSLib::RemoveKnot(Standard_False,
                              Index,M,vdeg,vperiodic,
-                             poles->Array2(),weights->Array2(),
+                             poles->Array2(),&weights->Array2(),
                              vknots->Array1(),vmults->Array1(),
                              npoles->ChangeArray2(),
-                             nweights->ChangeArray2(),
+                             &nweights->ChangeArray2(),
                              nknots->ChangeArray1(),nmults->ChangeArray1(),
                              Tolerance))
       return Standard_False;
@@ -2038,7 +2038,7 @@ Standard_Boolean  Geom_BSplineSurface::RemoveVKnot
                              poles->Array2(),BSplSLib::NoWeights(),
                              vknots->Array1(),vmults->Array1(),
                              npoles->ChangeArray2(),
-                             *((TColStd_Array2OfReal*) NULL),
+                             BSplSLib::NoWeights(),
                              nknots->ChangeArray1(),nmults->ChangeArray1(),
                              Tolerance))
       return Standard_False;
@@ -2064,7 +2064,7 @@ void   Geom_BSplineSurface::Resolution( const Standard_Real  Tolerance3D,
 {
   if(!maxderivinvok){
     BSplSLib::Resolution(poles  ->Array2(),
-                        weights->Array2(),
+                        &weights->Array2(),
                         uknots ->Array1(),
                         vknots ->Array1(),
                         umults ->Array1(),
index 108d9f3..ec94e90 100644 (file)
@@ -152,19 +152,19 @@ void Geom_BezierCurve::Increase (const Standard_Integer Deg)
     nweights = new TColStd_HArray1OfReal(1,Deg+1);
     BSplCLib::IncreaseDegree(Degree(), Deg, 0,
                             poles->Array1(),
-                            weights->Array1(),
+                            &weights->Array1(),
                             bidknots, bidmults,
                             npoles->ChangeArray1(),
-                            nweights->ChangeArray1(),
+                            &nweights->ChangeArray1(),
                             bidknots, bidmults);
   }
   else {
     BSplCLib::IncreaseDegree(Degree(), Deg, 0,
                             poles->Array1(),
-                            *((TColStd_Array1OfReal*) NULL),
+                            BSplCLib::NoWeights(),
                             bidknots, bidmults,
                             npoles->ChangeArray1(),
-                            *((TColStd_Array1OfReal*) NULL),
+                            BSplCLib::NoWeights(),
                             bidknots, bidmults);
   }
 
@@ -386,19 +386,16 @@ void Geom_BezierCurve::Segment(const Standard_Real U1, const Standard_Real U2)
   if(!CoefficientsOK(0.)) UpdateCoefficients(0.);
   if (IsRational()) {
     PLib::Trimming(U1,U2,coeffs->ChangeArray1(),
-                  wcoeffs->ChangeArray1());
+                  &wcoeffs->ChangeArray1());
     PLib::CoefficientsPoles(coeffs->Array1(),
-                           wcoeffs->Array1(),
+                           &wcoeffs->Array1(),
                            poles->ChangeArray1(),
-                           weights->ChangeArray1());
+                           &weights->ChangeArray1());
   }
   else {
-    PLib::Trimming(U1,U2,coeffs->ChangeArray1(),
-                  *((TColStd_Array1OfReal*) NULL));
-    PLib::CoefficientsPoles(coeffs->Array1(),
-                           *((TColStd_Array1OfReal*) NULL),
-                           poles->ChangeArray1(),
-                           *((TColStd_Array1OfReal*) NULL));
+    PLib::Trimming(U1,U2,coeffs->ChangeArray1(), PLib::NoWeights());
+    PLib::CoefficientsPoles(coeffs->Array1(), PLib::NoWeights(),
+                                             poles->ChangeArray1(), PLib::NoWeights());
   }
   UpdateCoefficients();
 }
@@ -550,13 +547,11 @@ void Geom_BezierCurve::D0 (const Standard_Real U, gp_Pnt& P ) const
   if (IsRational())
     BSplCLib::CacheD0(U,Degree(),parametercache,spanlenghtcache,
                      coeffs->Array1(),
-                     wcoeffs->Array1(),
+                     &wcoeffs->Array1(),
                      P);
   else 
     BSplCLib::CacheD0(U,Degree(),parametercache,spanlenghtcache,
-                     coeffs->Array1(),
-                     *((TColStd_Array1OfReal*) NULL),P
-                     );
+                     coeffs->Array1(), BSplCLib::NoWeights(), P);
 }
 
 //=======================================================================
@@ -573,12 +568,12 @@ void Geom_BezierCurve::D1(const Standard_Real U, gp_Pnt& P, gp_Vec& V1) const
   if (IsRational())
     BSplCLib::CacheD1(U,Degree(),parametercache,spanlenghtcache,
                      coeffs->Array1(),
-                     wcoeffs->Array1(),
+                     &wcoeffs->Array1(),
                      P,V1);
   else 
     BSplCLib::CacheD1(U,Degree(),parametercache,spanlenghtcache,
                      coeffs->Array1(),
-                     *((TColStd_Array1OfReal*) NULL),
+                     BSplCLib::NoWeights(),
                      P,V1);
 }
 
@@ -599,12 +594,12 @@ void Geom_BezierCurve::D2 (const Standard_Real U,
   if (IsRational())
     BSplCLib::CacheD2(U,Degree(),parametercache,spanlenghtcache,
                      coeffs->Array1(),
-                     wcoeffs->Array1(),
+                     &wcoeffs->Array1(),
                      P,V1,V2);
   else 
     BSplCLib::CacheD2(U,Degree(),parametercache,spanlenghtcache,
                      coeffs->Array1(),
-                     *((TColStd_Array1OfReal*) NULL),
+                     BSplCLib::NoWeights(),
                      P,V1,V2);
 }
 
@@ -624,12 +619,12 @@ void Geom_BezierCurve::D3 (const Standard_Real U,
   if (IsRational())
     BSplCLib::CacheD3(U,Degree(),parametercache,spanlenghtcache,
                      coeffs->Array1(),
-                     wcoeffs->Array1(),
+                     &wcoeffs->Array1(),
                      P,V1,V2,V3);
   else 
     BSplCLib::CacheD3(U,Degree(),parametercache,spanlenghtcache,
                      coeffs->Array1(),
-                     *((TColStd_Array1OfReal*) NULL),
+                     BSplCLib::NoWeights(),
                      P,V1,V2,V3);
 }
 
@@ -652,14 +647,14 @@ gp_Vec Geom_BezierCurve::DN (const Standard_Real U,
 //    BSplCLib::DN(U,N,0,Degree(),0.,
     BSplCLib::DN(U,N,0,Degree(),Standard_False,
                 poles->Array1(),
-                weights->Array1(),
-                bidknots,bidmults,V);
+                &weights->Array1(),
+                bidknots,&bidmults,V);
   else 
 //    BSplCLib::DN(U,N,0,Degree(),0.,
     BSplCLib::DN(U,N,0,Degree(),Standard_False,
                 poles->Array1(),
-                *((TColStd_Array1OfReal*) NULL),
-                bidknots,bidmults,V);
+                BSplCLib::NoWeights(),
+                bidknots,&bidmults,V);
   return V;
 }
 
@@ -804,7 +799,7 @@ void Geom_BezierCurve::Resolution(const Standard_Real Tolerance3D,
     
     if (IsRational()) {  
       BSplCLib::Resolution(poles->Array1(),
-                          weights->Array1(),
+                          &weights->Array1(),
                           poles->Length(),
                           bidflatknots,
                           Degree(),
@@ -902,15 +897,15 @@ void Geom_BezierCurve::UpdateCoefficients(const Standard_Real )
   if (IsRational())
     BSplCLib::BuildCache(parametercache,spanlenghtcache,0,Degree(),
                         bidflatknots,poles->Array1(),
-                        weights->Array1(),
+                        &weights->Array1(),
                         coeffs->ChangeArray1(),
-                        wcoeffs->ChangeArray1());
+                        &wcoeffs->ChangeArray1());
   else
     BSplCLib::BuildCache(parametercache,spanlenghtcache,0,Degree(),
                         bidflatknots,poles->Array1(),
-                        *((TColStd_Array1OfReal*) NULL),
+                        BSplCLib::NoWeights(),
                         coeffs->ChangeArray1(),
-                        *((TColStd_Array1OfReal*) NULL));
+                        BSplCLib::NoWeights());
   validcache = 1;
 }
 
index 4af0033..c60f171 100644 (file)
@@ -594,20 +594,20 @@ void Geom_BezierSurface::Increase (const Standard_Integer UDeg,
       
       BSplSLib::IncreaseDegree(1, oldUDeg, UDeg, 0,
                               poles->Array2(),
-                              weights->Array2(),
+                              &weights->Array2(),
                               biduknots, bidumults,
                               npoles->ChangeArray2(), 
-                              nweights->ChangeArray2(),
+                              &nweights->ChangeArray2(),
                               biduknots, bidumults);
       weights = nweights;
     }
     else {
       BSplSLib::IncreaseDegree(1, oldUDeg, UDeg, 0,
                               poles->Array2(),
-                              *((TColStd_Array2OfReal*) NULL),
+                              BSplSLib::NoWeights(),
                               biduknots, bidumults,
                               npoles->ChangeArray2(), 
-                              *((TColStd_Array2OfReal*) NULL),
+                              BSplSLib::NoWeights(),
                               biduknots, bidumults);
     }
     poles   = npoles;
@@ -620,20 +620,20 @@ void Geom_BezierSurface::Increase (const Standard_Integer UDeg,
       
       BSplSLib::IncreaseDegree(0, oldVDeg, VDeg, 0,
                               poles->Array2(),
-                              weights->Array2(),
+                              &weights->Array2(),
                               bidvknots, bidvmults,
                               npoles->ChangeArray2(), 
-                              nweights->ChangeArray2(),
+                              &nweights->ChangeArray2(),
                               bidvknots, bidvmults);
       weights = nweights;
     }
     else {
       BSplSLib::IncreaseDegree(0, oldVDeg, VDeg, 0,
                               poles->Array2(),
-                              *((TColStd_Array2OfReal*) NULL),
+                              BSplSLib::NoWeights(),
                               bidvknots, bidvmults,
                               npoles->ChangeArray2(), 
-                              *((TColStd_Array2OfReal*) NULL),
+                              BSplSLib::NoWeights(),
                               bidvknots, bidvmults);
       
     }
@@ -1000,23 +1000,19 @@ void Geom_BezierSurface::Segment
                 vlast  = 2*(V2 - 0.5);
   if (rat) {
     PLib::UTrimming (ufirst, ulast, Coefs->ChangeArray2(),
-                    WCoefs->ChangeArray2());
+                    &WCoefs->ChangeArray2());
     PLib::VTrimming (vfirst, vlast, Coefs->ChangeArray2(),
-                    WCoefs->ChangeArray2());
+                    &WCoefs->ChangeArray2());
     PLib::CoefficientsPoles(Coefs->Array2(),
-                           WCoefs->Array2(),
+                           &WCoefs->Array2(),
                            poles->ChangeArray2(),
-                           weights->ChangeArray2());
+                           &weights->ChangeArray2());
   }
   else {
-    PLib::UTrimming (ufirst, ulast, Coefs->ChangeArray2(),
-                    *((TColStd_Array2OfReal*) NULL));
-    PLib::VTrimming (vfirst, vlast, Coefs->ChangeArray2(),
-                    *((TColStd_Array2OfReal*) NULL));
-    PLib::CoefficientsPoles (Coefs->Array2(),
-                            *((TColStd_Array2OfReal*) NULL),
-                            poles->ChangeArray2(),
-                            *((TColStd_Array2OfReal*) NULL));
+    PLib::UTrimming (ufirst, ulast, Coefs->ChangeArray2(), PLib::NoWeights2());
+    PLib::VTrimming (vfirst, vlast, Coefs->ChangeArray2(), PLib::NoWeights2());
+    PLib::CoefficientsPoles (Coefs->Array2(), PLib::NoWeights2(),
+                                              poles->ChangeArray2(), PLib::NoWeights2());
   }
   UpdateCoefficients();
 }
@@ -1468,7 +1464,7 @@ void Geom_BezierSurface::D0 (const Standard_Real U,
                        uparameter_11, vparameter_11,
                        uspanlenght_11, vspanlenght_11,
                        coeffs->Array2(),
-                       wcoeffs->Array2(),
+                       &wcoeffs->Array2(),
                        P);
     }
     else { 
@@ -1476,7 +1472,7 @@ void Geom_BezierSurface::D0 (const Standard_Real U,
                        uparameter_11, vparameter_11,
                        uspanlenght_11, vspanlenght_11,
                        coeffs->Array2(),
-                       *((TColStd_Array2OfReal*) NULL),
+                       BSplSLib::NoWeights(),
                        P);
     }
   }
@@ -1491,8 +1487,8 @@ void Geom_BezierSurface::D0 (const Standard_Real U,
     TColStd_Array1OfInteger bidvmults(mult_v[0],1,2); bidvmults.Init(VDegree() + 1);
     if (urational || vrational) { 
         BSplSLib::D0(U, V, 1,1,poles->Array2(),
-                    weights->Array2(),
-                    biduknots,bidvknots,bidumults,bidvmults,
+                    &weights->Array2(),
+                    biduknots,bidvknots,&bidumults,&bidvmults,
                     UDegree(),VDegree(),
                     urational,vrational,Standard_False,Standard_False,
                     P) ;
@@ -1500,8 +1496,8 @@ void Geom_BezierSurface::D0 (const Standard_Real U,
     else {
       
       BSplSLib::D0(U, V, 1,1,poles->Array2(),
-                  *((TColStd_Array2OfReal*) NULL),
-                  biduknots,bidvknots,bidumults,bidvmults,
+                  BSplSLib::NoWeights(),
+                  biduknots,bidvknots,&bidumults,&bidvmults,
                   UDegree(),VDegree(),
                   urational,vrational,Standard_False,Standard_False,
                   P) ;
@@ -1537,7 +1533,7 @@ void Geom_BezierSurface::D1
                       uparameter_11, vparameter_11,
                       uspanlenght_11, vspanlenght_11,
                       coeffs->Array2(),
-                      wcoeffs->Array2(), 
+                      &wcoeffs->Array2(), 
                       P, D1U, D1V);
    }
    else { 
@@ -1545,7 +1541,7 @@ void Geom_BezierSurface::D1
                       uparameter_11, vparameter_11,
                       uspanlenght_11, vspanlenght_11,
                       coeffs->Array2(),
-                      *((TColStd_Array2OfReal*) NULL), 
+                      BSplSLib::NoWeights(), 
                       P, D1U, D1V);
    }
   }
@@ -1560,16 +1556,16 @@ void Geom_BezierSurface::D1
     TColStd_Array1OfInteger bidvmults(mult_v[0],1,2); bidvmults.Init(VDegree() + 1);
     if (urational || vrational) { 
       BSplSLib::D1(U, V, 1,1,poles->Array2(),
-                  weights->Array2(),
-                  biduknots,bidvknots,bidumults,bidvmults,
+                  &weights->Array2(),
+                  biduknots,bidvknots,&bidumults,&bidvmults,
                   UDegree(),VDegree(),
                   urational,vrational,Standard_False,Standard_False,
                   P,D1U, D1V) ;
     }
     else {
       BSplSLib::D1(U, V, 1,1,poles->Array2(),
-                  *((TColStd_Array2OfReal*) NULL),
-                  biduknots,bidvknots,bidumults,bidvmults,
+                  BSplSLib::NoWeights(),
+                  biduknots,bidvknots,&bidumults,&bidvmults,
                   UDegree(),VDegree(),
                   urational,vrational,Standard_False,Standard_False,
                   P,D1U, D1V) ;
@@ -1606,7 +1602,7 @@ void Geom_BezierSurface::D2
                        uparameter_11, vparameter_11,
                        uspanlenght_11, vspanlenght_11,
                        coeffs->Array2(),
-                       wcoeffs->Array2(), 
+                       &wcoeffs->Array2(), 
                        P, D1U, D1V, D2U, D2UV , D2V);
     }
     else { 
@@ -1615,7 +1611,7 @@ void Geom_BezierSurface::D2
                        uparameter_11, vparameter_11,
                        uspanlenght_11, vspanlenght_11,
                        coeffs->Array2(),
-                       *((TColStd_Array2OfReal*) NULL), 
+                       BSplSLib::NoWeights(), 
                        P, D1U, D1V, D2U, D2UV , D2V);
     }
   }
@@ -1631,8 +1627,8 @@ void Geom_BezierSurface::D2
     if (urational || vrational) { 
       //-- ATTENTION a l'ORDRE d'appel ds BSPLSLIB 
       BSplSLib::D2(U, V, 1,1,poles->Array2(),
-                  weights->Array2(),
-                  biduknots,bidvknots,bidumults,bidvmults,
+                  &weights->Array2(),
+                  biduknots,bidvknots,&bidumults,&bidvmults,
                   UDegree(),VDegree(),
                   urational,vrational,Standard_False,Standard_False,
                   P,D1U, D1V, D2U, D2V , D2UV) ;
@@ -1640,8 +1636,8 @@ void Geom_BezierSurface::D2
     else {
       //-- ATTENTION a l'ORDRE d'appel ds BSPLSLIB 
       BSplSLib::D2(U, V, 1,1,poles->Array2(),
-                  *((TColStd_Array2OfReal*) NULL),
-                  biduknots,bidvknots,bidumults,bidvmults,
+                  BSplSLib::NoWeights(),
+                  biduknots,bidvknots,&bidumults,&bidvmults,
                   UDegree(),VDegree(),
                   urational,vrational,Standard_False,Standard_False,
                   P,D1U, D1V, D2U, D2V, D2UV ) ;
@@ -1667,8 +1663,8 @@ void Geom_BezierSurface::D3
   TColStd_Array1OfInteger bidvmults(1,2); bidvmults.Init(VDegree() + 1);
   if (urational || vrational) { 
     BSplSLib::D3 (U, V, 0, 0, poles->Array2(),
-                 weights->Array2(),
-                 biduknots, bidvknots, bidumults, bidvmults,
+                 &weights->Array2(),
+                 biduknots, bidvknots, &bidumults, &bidvmults,
                  UDegree(), VDegree(), urational, vrational, 0, 0,
                  P,
                  D1U, D1V,
@@ -1677,8 +1673,8 @@ void Geom_BezierSurface::D3
   }
   else { 
     BSplSLib::D3 (U, V, 0, 0, poles->Array2(),
-                 *((TColStd_Array2OfReal*) NULL),
-                 biduknots, bidvknots, bidumults, bidvmults,
+                 BSplSLib::NoWeights(),
+                 biduknots, bidvknots, &bidumults, &bidvmults,
                  UDegree(), VDegree(), urational, vrational, 0, 0,
                  P,
                  D1U, D1V,
@@ -1706,15 +1702,15 @@ gp_Vec Geom_BezierSurface::DN
   TColStd_Array1OfInteger bidvmults(1,2); bidvmults.Init(VDegree() + 1);
   if (urational || vrational) { 
     BSplSLib::DN (U, V, Nu, Nv, 0, 0, poles->Array2(),
-                 weights->Array2(),
-                 biduknots, bidvknots, bidumults, bidvmults,
+                 &weights->Array2(),
+                 biduknots, bidvknots, &bidumults, &bidvmults,
                  UDegree(), VDegree(), urational, vrational, 0, 0,
                  Derivative);
   }
   else { 
     BSplSLib::DN (U, V, Nu, Nv, 0, 0, poles->Array2(),
-                 *((TColStd_Array2OfReal*) NULL),
-                 biduknots, bidvknots, bidumults, bidvmults,
+                 BSplSLib::NoWeights(),
+                 biduknots, bidvknots, &bidumults, &bidvmults,
                  UDegree(), VDegree(), urational, vrational, 0, 0,
                  Derivative);
   }
@@ -1797,9 +1793,9 @@ Handle(Geom_Curve) Geom_BezierSurface::UIso (const Standard_Real U) const
     TColStd_Array1OfReal VCurveWeights 
       (Weights.LowerCol() , Weights.UpperCol());
     BSplSLib::Iso (U, 1, Poles,
-                  Weights,
-                  biduknots, bidumults,
-                  UDegree(), 0, VCurvePoles, VCurveWeights);
+                  &Weights,
+                  biduknots, &bidumults,
+                  UDegree(), 0, VCurvePoles, &VCurveWeights);
     if (urational)
       UIsoCurve = new Geom_BezierCurve (VCurvePoles, VCurveWeights);
     else
@@ -1807,8 +1803,8 @@ Handle(Geom_Curve) Geom_BezierSurface::UIso (const Standard_Real U) const
   }
   else {
     BSplSLib::Iso (U, 1, Poles,
-                  *((TColStd_Array2OfReal*) NULL),
-                  biduknots, bidumults,
+                  BSplSLib::NoWeights(),
+                  biduknots, &bidumults,
                   UDegree(), 0, VCurvePoles, PLib::NoWeights());
     UIsoCurve = new Geom_BezierCurve (VCurvePoles);
   }
@@ -1843,9 +1839,9 @@ Handle(Geom_Curve) Geom_BezierSurface::VIso (const Standard_Real V) const
     TColStd_Array1OfReal VCurveWeights 
       (Weights.LowerRow() , Weights.UpperRow());
     BSplSLib::Iso (V, 0, Poles,
-                  Weights,
-                  bidvknots, bidvmults,
-                  VDegree(), 0, VCurvePoles, VCurveWeights);
+                  &Weights,
+                  bidvknots, &bidvmults,
+                  VDegree(), 0, VCurvePoles, &VCurveWeights);
     if (vrational)
       VIsoCurve = new Geom_BezierCurve (VCurvePoles, VCurveWeights);
     else
@@ -1853,8 +1849,8 @@ Handle(Geom_Curve) Geom_BezierSurface::VIso (const Standard_Real V) const
   }
   else {
     BSplSLib::Iso (V, 0, Poles,
-                  *((TColStd_Array2OfReal*) NULL),
-                  bidvknots, bidvmults,
+                  BSplSLib::NoWeights(),
+                  bidvknots, &bidvmults,
                   VDegree(), 0, VCurvePoles, PLib::NoWeights());
     VIsoCurve = new Geom_BezierCurve (VCurvePoles);
   }
@@ -2030,7 +2026,7 @@ void Geom_BezierSurface::Resolution(const Standard_Real  Tolerance3D,
     TColStd_Array1OfInteger bidvmults(1,2); bidvmults.Init(VDegree() + 1);
     if(urational || vrational){
       BSplSLib::Resolution(poles->Array2(),
-                          weights->Array2(),
+                          &weights->Array2(),
                           biduknots,
                           bidvknots,
                           bidumults,
@@ -2047,7 +2043,7 @@ void Geom_BezierSurface::Resolution(const Standard_Real  Tolerance3D,
     }
     else{
       BSplSLib::Resolution(poles->Array2(),
-                          *((TColStd_Array2OfReal*) NULL),
+                          BSplSLib::NoWeights(),
                           biduknots,
                           bidvknots,
                           bidumults,
@@ -2139,9 +2135,9 @@ void  Geom_BezierSurface::UpdateCoefficients(const Standard_Real ,
                         UDegree(),VDegree(),0,0,
                         biduflatknots,bidvflatknots,
                         poles->Array2(),
-                        weights->Array2(),
+                        &weights->Array2(),
                         coeffs->ChangeArray2(),
-                        wcoeffs->ChangeArray2());
+                        &wcoeffs->ChangeArray2());
   }
   else {
     BSplSLib::BuildCache(uparameter_11,vparameter_11,
@@ -2149,9 +2145,9 @@ void  Geom_BezierSurface::UpdateCoefficients(const Standard_Real ,
                         UDegree(),VDegree(),0,0,
                         biduflatknots,bidvflatknots,
                         poles->Array2(),
-                        *((TColStd_Array2OfReal*) NULL),
+                        BSplSLib::NoWeights(),
                         coeffs->ChangeArray2(),
-                        *((TColStd_Array2OfReal*) NULL));
+                        BSplSLib::NoWeights());
   }
   validcache = 1;
 }
index 1e37d8b..b3ad8d6 100644 (file)
@@ -260,9 +260,9 @@ void Geom2d_BSplineCurve::IncreaseDegree
     
     BSplCLib::IncreaseDegree
       (deg,Degree, periodic,
-       poles->Array1(),weights->Array1(),
+       poles->Array1(),&weights->Array1(),
        knots->Array1(),mults->Array1(),
-       npoles->ChangeArray1(),nweights->ChangeArray1(),
+       npoles->ChangeArray1(),&nweights->ChangeArray1(),
        nknots->ChangeArray1(),nmults->ChangeArray1());
   }
   else {
@@ -270,10 +270,10 @@ void Geom2d_BSplineCurve::IncreaseDegree
     BSplCLib::IncreaseDegree
       (deg,Degree, periodic,
        poles->Array1(),
-       *((TColStd_Array1OfReal*) NULL),
+       BSplCLib::NoWeights(),
        knots->Array1(),mults->Array1(),
        npoles->ChangeArray1(),
-       *((TColStd_Array1OfReal*) NULL),
+       BSplCLib::NoWeights(),
        nknots->ChangeArray1(),nmults->ChangeArray1());
   }
 
@@ -368,7 +368,7 @@ void  Geom2d_BSplineCurve::InsertKnots(const TColStd_Array1OfReal& Knots,
 
   if (!BSplCLib::PrepareInsertKnots(deg,periodic,
                                    knots->Array1(),mults->Array1(),
-                                   Knots,Mults,nbpoles,nbknots,Epsilon,Add))
+                                   Knots,&Mults,nbpoles,nbknots,Epsilon,Add))
     Standard_ConstructionError::Raise("Geom2d_BSplineCurve::InsertKnots");
 
   if (nbpoles == poles->Length()) return;
@@ -386,10 +386,10 @@ void  Geom2d_BSplineCurve::InsertKnots(const TColStd_Array1OfReal& Knots,
     Handle(TColStd_HArray1OfReal) nweights = 
       new TColStd_HArray1OfReal(1,nbpoles);
     BSplCLib::InsertKnots(deg,periodic,
-                         poles->Array1(), weights->Array1(),
+                         poles->Array1(), &weights->Array1(),
                          knots->Array1(), mults->Array1(),
-                         Knots, Mults,
-                         npoles->ChangeArray1(), nweights->ChangeArray1(),
+                         Knots, &Mults,
+                         npoles->ChangeArray1(), &nweights->ChangeArray1(),
                          nknots->ChangeArray1(), nmults->ChangeArray1(),
                          Epsilon,Add);
     weights = nweights;
@@ -397,11 +397,11 @@ void  Geom2d_BSplineCurve::InsertKnots(const TColStd_Array1OfReal& Knots,
   else {
     BSplCLib::InsertKnots(deg,periodic,
                          poles->Array1(),
-                         *((TColStd_Array1OfReal*) NULL),
+                         BSplCLib::NoWeights(),
                          knots->Array1(), mults->Array1(),
-                         Knots, Mults,
+                         Knots, &Mults,
                          npoles->ChangeArray1(),
-                         *((TColStd_Array1OfReal*) NULL),
+                         BSplCLib::NoWeights(),
                          nknots->ChangeArray1(), nmults->ChangeArray1(),
                          Epsilon,Add);
   }
@@ -453,9 +453,9 @@ Standard_Boolean  Geom2d_BSplineCurve::RemoveKnot
       new TColStd_HArray1OfReal(1,npoles->Length());
     if (!BSplCLib::RemoveKnot
        (Index, M, deg, periodic,
-        poles->Array1(),weights->Array1(), 
+        poles->Array1(),&weights->Array1(), 
         knots->Array1(),mults->Array1(),
-        npoles->ChangeArray1(), nweights->ChangeArray1(),
+        npoles->ChangeArray1(), &nweights->ChangeArray1(),
         nknots->ChangeArray1(),nmults->ChangeArray1(),
         Tolerance))
       return Standard_False;
@@ -465,10 +465,10 @@ Standard_Boolean  Geom2d_BSplineCurve::RemoveKnot
     if (!BSplCLib::RemoveKnot
        (Index, M, deg, periodic,
         poles->Array1(),
-        *((TColStd_Array1OfReal*) NULL),
+        BSplCLib::NoWeights(),
         knots->Array1(),mults->Array1(),
         npoles->ChangeArray1(),
-        *((TColStd_Array1OfReal*) NULL),
+        BSplCLib::NoWeights(),
         nknots->ChangeArray1(),nmults->ChangeArray1(),
         Tolerance))
       return Standard_False;
@@ -1053,18 +1053,18 @@ void Geom2d_BSplineCurve::SetNotPeriodic ()
       
       BSplCLib::Unperiodize
        (deg,mults->Array1(),knots->Array1(),poles->Array1(),
-        weights->Array1(),nmults->ChangeArray1(),
+        &weights->Array1(),nmults->ChangeArray1(),
         nknots->ChangeArray1(),npoles->ChangeArray1(),
-        nweights->ChangeArray1());
+        &nweights->ChangeArray1());
       
     }
     else {
       
       BSplCLib::Unperiodize
        (deg,mults->Array1(),knots->Array1(),poles->Array1(),
-        *((TColStd_Array1OfReal*) NULL),nmults->ChangeArray1(),
+        BSplCLib::NoWeights(),nmults->ChangeArray1(),
         nknots->ChangeArray1(),npoles->ChangeArray1(),
-        *((TColStd_Array1OfReal*) NULL));
+        BSplCLib::NoWeights());
       
     }
     poles   = npoles;
index 02913b8..be06c28 100644 (file)
@@ -798,7 +798,7 @@ public:
   Standard_EXPORT void Weights (TColStd_Array1OfReal& W) const;
   
   //! Returns the weights of the B-spline curve;
-  Standard_EXPORT const TColStd_Array1OfReal& Weights() const;
+  Standard_EXPORT const TColStd_Array1OfReal* Weights() const;
   
   //! Applies the transformation T to this BSpline curve.
   Standard_EXPORT void Transform (const gp_Trsf2d& T);
index 20478f2..2253cf6 100644 (file)
@@ -195,21 +195,21 @@ void Geom2d_BSplineCurve::D0(const Standard_Real U,
   Standard_Integer aSpanIndex = 0;
   Standard_Real aNewU(U);
   PeriodicNormalization(aNewU);
-  BSplCLib::LocateParameter(deg, knots->Array1(), mults->Array1(), U, periodic, aSpanIndex, aNewU);
+  BSplCLib::LocateParameter(deg, knots->Array1(), &mults->Array1(), U, periodic, aSpanIndex, aNewU);
   if (aNewU < knots->Value(aSpanIndex))
     aSpanIndex--;
   if (rational) 
   {
     BSplCLib::D0(aNewU,aSpanIndex,deg,periodic,POLES,
-      weights->Array1(),
-      knots->Array1(), mults->Array1(),
+      &weights->Array1(),
+      knots->Array1(), &mults->Array1(),
       P);
   }
   else 
   {
     BSplCLib::D0(aNewU,aSpanIndex,deg,periodic,POLES,
-      *((TColStd_Array1OfReal*) NULL),
-      knots->Array1(), mults->Array1(),
+      BSplCLib::NoWeights(),
+      knots->Array1(), &mults->Array1(),
       P);
   }
 }
@@ -227,21 +227,21 @@ void Geom2d_BSplineCurve::D1(const Standard_Real U,
   Standard_Integer aSpanIndex = 0;
   Standard_Real aNewU(U);
   PeriodicNormalization(aNewU);
-  BSplCLib::LocateParameter(deg, knots->Array1(), mults->Array1(), U, periodic, aSpanIndex, aNewU);
+  BSplCLib::LocateParameter(deg, knots->Array1(), &mults->Array1(), U, periodic, aSpanIndex, aNewU);
   if (aNewU < knots->Value(aSpanIndex))
     aSpanIndex--;
   if (rational) 
   {
     BSplCLib::D1(aNewU,aSpanIndex,deg,periodic,POLES,
-      weights->Array1(),
-      knots->Array1(), mults->Array1(),
+      &weights->Array1(),
+      knots->Array1(), &mults->Array1(),
       P, V1);
   }
   else 
   {
     BSplCLib::D1(aNewU,aSpanIndex,deg,periodic,POLES,
-      *((TColStd_Array1OfReal*) NULL),
-      knots->Array1(), mults->Array1(),
+      BSplCLib::NoWeights(),
+      knots->Array1(), &mults->Array1(),
       P, V1);
   }
 }
@@ -259,21 +259,21 @@ void Geom2d_BSplineCurve::D2(const Standard_Real U,
   Standard_Integer aSpanIndex = 0;
   Standard_Real aNewU(U);
   PeriodicNormalization(aNewU);
-  BSplCLib::LocateParameter(deg, knots->Array1(), mults->Array1(), U, periodic, aSpanIndex, aNewU);
+  BSplCLib::LocateParameter(deg, knots->Array1(), &mults->Array1(), U, periodic, aSpanIndex, aNewU);
   if (aNewU < knots->Value(aSpanIndex))
     aSpanIndex--;
   if (rational) 
   {
     BSplCLib::D2(aNewU,aSpanIndex,deg,periodic,POLES,
-      weights->Array1(),
-      knots->Array1(), mults->Array1(),
+      &weights->Array1(),
+      knots->Array1(), &mults->Array1(),
       P, V1, V2);
   }
   else 
   {
     BSplCLib::D2(aNewU,aSpanIndex,deg,periodic,POLES,
-      *((TColStd_Array1OfReal*) NULL),
-      knots->Array1(), mults->Array1(),
+      BSplCLib::NoWeights(),
+      knots->Array1(), &mults->Array1(),
       P, V1, V2);
   }
 }
@@ -292,21 +292,21 @@ void Geom2d_BSplineCurve::D3(const Standard_Real U,
   Standard_Integer aSpanIndex = 0;
   Standard_Real aNewU(U);
   PeriodicNormalization(aNewU);
-  BSplCLib::LocateParameter(deg, knots->Array1(), mults->Array1(), U, periodic, aSpanIndex, aNewU);
+  BSplCLib::LocateParameter(deg, knots->Array1(), &mults->Array1(), U, periodic, aSpanIndex, aNewU);
   if (aNewU < knots->Value(aSpanIndex))
     aSpanIndex--;
   if (rational) 
   {
     BSplCLib::D3(aNewU,aSpanIndex,deg,periodic,POLES,
-      weights->Array1(),
-      knots->Array1(), mults->Array1(),
+      &weights->Array1(),
+      knots->Array1(), &mults->Array1(),
       P, V1, V2, V3);
   }
   else 
   {
     BSplCLib::D3(aNewU,aSpanIndex,deg,periodic,POLES,
-      *((TColStd_Array1OfReal*) NULL),
-      knots->Array1(), mults->Array1(),
+      BSplCLib::NoWeights(),
+      knots->Array1(), &mults->Array1(),
       P, V1, V2, V3);
   }
 }
@@ -323,12 +323,12 @@ gp_Vec2d Geom2d_BSplineCurve::DN(const Standard_Real    U,
 
   if ( rational ) {
     BSplCLib::DN(U,N,0,deg,periodic,POLES,
-      weights->Array1(),
-      FKNOTS,FMULTS,V);
+      &weights->Array1(),
+      FKNOTS,FMULTS, V);
   }
   else {
     BSplCLib::DN(U,N,0,deg,periodic,POLES,
-      *((TColStd_Array1OfReal*) NULL),
+      BSplCLib::NoWeights(),
       FKNOTS,FMULTS,V);
   }
   return V;
@@ -485,12 +485,12 @@ void  Geom2d_BSplineCurve::LocalD0
 
   if ( rational ) {
     BSplCLib::D0(u,index,deg,periodic,POLES,
-                weights->Array1(),
+                &weights->Array1(),
                 FKNOTS,FMULTS,P);
   }
   else {
     BSplCLib::D0(u,index,deg,periodic,POLES,
-                *((TColStd_Array1OfReal*) NULL),
+                BSplCLib::NoWeights(),
                 FKNOTS,FMULTS,P);
   }
 }
@@ -516,12 +516,12 @@ void Geom2d_BSplineCurve::LocalD1 (const Standard_Real    U,
   
   if (rational) {
     BSplCLib::D1(u,index,deg,periodic,POLES,
-                weights->Array1(),
+                &weights->Array1(),
                 FKNOTS,FMULTS,P,V1);
   }
   else {
     BSplCLib::D1(u,index,deg,periodic,POLES,
-                *((TColStd_Array1OfReal*) NULL),
+                BSplCLib::NoWeights(),
                 FKNOTS,FMULTS,P,V1);
   }
 }
@@ -549,12 +549,12 @@ void Geom2d_BSplineCurve::LocalD2
   
   if ( rational ) {
     BSplCLib::D2(u,index,deg,periodic,POLES,
-                weights->Array1(),
+                &weights->Array1(),
                 FKNOTS,FMULTS,P,V1,V2);
   }
   else {
     BSplCLib::D2(u,index,deg,periodic,POLES,
-                *((TColStd_Array1OfReal*) NULL),
+                BSplCLib::NoWeights(),
                 FKNOTS,FMULTS,P,V1,V2);
   }
 }
@@ -583,12 +583,12 @@ void Geom2d_BSplineCurve::LocalD3
   
   if ( rational ) {
     BSplCLib::D3(u,index,deg,periodic,POLES,
-                weights->Array1(),
+                &weights->Array1(),
                 FKNOTS,FMULTS,P,V1,V2,V3);
   }
   else {
     BSplCLib::D3(u,index,deg,periodic,POLES,
-                *((TColStd_Array1OfReal*) NULL),
+                BSplCLib::NoWeights(),
                 FKNOTS,FMULTS,P,V1,V2,V3);
   }
 }
@@ -616,12 +616,12 @@ gp_Vec2d Geom2d_BSplineCurve::LocalDN
 
   if ( rational ) {
     BSplCLib::DN(u,N,index,deg,periodic,POLES,
-                weights->Array1(),
+                &weights->Array1(),
                 FKNOTS,FMULTS,V);
   }
   else {
     BSplCLib::DN(u,N,index,deg,periodic,POLES,
-                *((TColStd_Array1OfReal*) NULL),
+                BSplCLib::NoWeights(),
                 FKNOTS,FMULTS,V);
   }
   return V;
@@ -750,10 +750,10 @@ void Geom2d_BSplineCurve::Weights
   }
 }
 
-const TColStd_Array1OfReal& Geom2d_BSplineCurve::Weights() const
+const TColStd_Array1OfReal* Geom2d_BSplineCurve::Weights() const
 {
   if (IsRational())
-    return weights->Array1();
+    return &weights->Array1();
   return BSplCLib::NoWeights();
 }
 
@@ -856,7 +856,7 @@ void Geom2d_BSplineCurve::Resolution(const Standard_Real ToleranceUV,
          new_weights(ii) = weights->Array1()(((ii-1) % poles->Length()) + 1) ;
        }
        BSplCLib::Resolution(new_poles,
-                            new_weights,
+                            &new_weights,
                             new_poles.Length(),
                             flatknots->Array1(),
                             deg,
@@ -865,7 +865,7 @@ void Geom2d_BSplineCurve::Resolution(const Standard_Real ToleranceUV,
       }
       else {
        BSplCLib::Resolution(new_poles,
-                            *((TColStd_Array1OfReal*) NULL),
+                            BSplCLib::NoWeights(),
                             new_poles.Length(),
                             flatknots->Array1(),
                             deg,
@@ -876,7 +876,7 @@ void Geom2d_BSplineCurve::Resolution(const Standard_Real ToleranceUV,
     else {
       if (rational) {
        BSplCLib::Resolution(poles->Array1(),
-                            weights->Array1(),
+                            &weights->Array1(),
                             poles->Length(),
                             flatknots->Array1(),
                             deg,
@@ -885,7 +885,7 @@ void Geom2d_BSplineCurve::Resolution(const Standard_Real ToleranceUV,
       }
       else {
        BSplCLib::Resolution(poles->Array1(),
-                            *((TColStd_Array1OfReal*) NULL),
+                            BSplCLib::NoWeights(),
                             poles->Length(),
                             flatknots->Array1(),
                             deg,
index 6ef7c8d..760fd88 100644 (file)
@@ -155,18 +155,18 @@ void Geom2d_BezierCurve::Increase (const Standard_Integer Deg)
   if (IsRational()) {
     nweights = new TColStd_HArray1OfReal(1,Deg+1);
     BSplCLib::IncreaseDegree(Degree(), Deg, 0,
-                            poles->Array1(),weights->Array1(),
+                            poles->Array1(),&weights->Array1(),
                             bidknots, bidmults,
-                            npoles->ChangeArray1(),nweights->ChangeArray1(),
+                            npoles->ChangeArray1(),&nweights->ChangeArray1(),
                             bidknots, bidmults);
   }
   else {
     BSplCLib::IncreaseDegree(Degree(), Deg, 0,
                             poles->Array1(),
-                            *((TColStd_Array1OfReal*) NULL),
+                            BSplCLib::NoWeights(),
                             bidknots, bidmults,
                             npoles->ChangeArray1(),
-                            *((TColStd_Array1OfReal*) NULL),
+                            BSplCLib::NoWeights(),
                             bidknots, bidmults);
   }
   
@@ -378,17 +378,14 @@ void Geom2d_BezierCurve::Segment
 //
 
   if (IsRational()) {
-    PLib::Trimming(U1,U2,coeffs->ChangeArray1(),wcoeffs->ChangeArray1());
-    PLib::CoefficientsPoles(coeffs->Array1(),wcoeffs->Array1(),
-                           poles->ChangeArray1(),weights->ChangeArray1());
+    PLib::Trimming(U1,U2,coeffs->ChangeArray1(),&wcoeffs->ChangeArray1());
+    PLib::CoefficientsPoles(coeffs->Array1(),&wcoeffs->Array1(),
+                           poles->ChangeArray1(),&weights->ChangeArray1());
   }
   else {
-    PLib::Trimming(U1,U2,coeffs->ChangeArray1(),
-                  *((TColStd_Array1OfReal*) NULL));
-    PLib::CoefficientsPoles(coeffs->Array1(),
-                           *((TColStd_Array1OfReal*) NULL),
-                           poles->ChangeArray1(),
-                           *((TColStd_Array1OfReal*) NULL));
+    PLib::Trimming(U1,U2,coeffs->ChangeArray1(), PLib::NoWeights());
+    PLib::CoefficientsPoles(coeffs->Array1(), PLib::NoWeights(),
+                                             poles->ChangeArray1(), PLib::NoWeights());
   }
   UpdateCoefficients();
 }
@@ -557,12 +554,10 @@ void Geom2d_BezierCurve::D0 (const Standard_Real U, gp_Pnt2d& P ) const
 //    ((Geom2d_BezierCurve*)(void*)this)->UpdateCoefficients(U);
   if (IsRational())
     BSplCLib::CacheD0(U,Degree(),parametercache,spanlenghtcache,
-                     coeffs->Array1(),wcoeffs->Array1(),P);
+                     coeffs->Array1(),&wcoeffs->Array1(),P);
   else 
     BSplCLib::CacheD0(U,Degree(),parametercache,spanlenghtcache,
-                     coeffs->Array1(),
-                     *((TColStd_Array1OfReal*) NULL),
-                     P);
+                     coeffs->Array1(), BSplCLib::NoWeights(), P);
 }
 
 //=======================================================================
@@ -580,12 +575,10 @@ void Geom2d_BezierCurve::D1(const Standard_Real U,
 //    ((Geom2d_BezierCurve*)(void*)this)->UpdateCoefficients(U);
   if (IsRational())
     BSplCLib::CacheD1(U,Degree(),parametercache,spanlenghtcache,
-                     coeffs->Array1(),wcoeffs->Array1(),P,V1);
+                     coeffs->Array1(),&wcoeffs->Array1(),P,V1);
   else 
     BSplCLib::CacheD1(U,Degree(),parametercache,spanlenghtcache,
-                     coeffs->Array1(),
-                     *((TColStd_Array1OfReal*) NULL),
-                     P,V1);
+                     coeffs->Array1(), BSplCLib::NoWeights(), P,V1);
 }
 
 //=======================================================================
@@ -604,12 +597,10 @@ void Geom2d_BezierCurve::D2 (const Standard_Real U,
 //    ((Geom2d_BezierCurve*)(void*)this)->UpdateCoefficients(U);
   if (IsRational())
     BSplCLib::CacheD2(U,Degree(),parametercache,spanlenghtcache,
-                     coeffs->Array1(),wcoeffs->Array1(),P,V1,V2);
+                     coeffs->Array1(),&wcoeffs->Array1(),P,V1,V2);
   else 
     BSplCLib::CacheD2(U,Degree(),parametercache,spanlenghtcache,
-                     coeffs->Array1(),
-                     *((TColStd_Array1OfReal*) NULL),
-                     P,V1,V2);
+                     coeffs->Array1(), BSplCLib::NoWeights(), P,V1,V2);
 }
 
 //=======================================================================
@@ -629,12 +620,10 @@ void Geom2d_BezierCurve::D3 (const Standard_Real U,
 //    ((Geom2d_BezierCurve*)(void*)this)->UpdateCoefficients(U);
   if (IsRational())
     BSplCLib::CacheD3(U,Degree(),parametercache,spanlenghtcache,
-                     coeffs->Array1(),wcoeffs->Array1(),P,V1,V2,V3);
+                     coeffs->Array1(),&wcoeffs->Array1(),P,V1,V2,V3);
   else 
     BSplCLib::CacheD3(U,Degree(),parametercache,spanlenghtcache,
-                     coeffs->Array1(),
-                     *((TColStd_Array1OfReal*) NULL),
-                     P,V1,V2,V3);
+                     coeffs->Array1(), BSplCLib::NoWeights(), P,V1,V2,V3);
 }
 
 //=======================================================================
@@ -653,13 +642,13 @@ gp_Vec2d Geom2d_BezierCurve::DN (const Standard_Real U,
   
   if (IsRational())
     BSplCLib::DN(U,N,0,Degree(),Standard_False,
-                poles->Array1(),weights->Array1(),
-                bidknots,bidmults,V);
+                poles->Array1(),&weights->Array1(),
+                bidknots,&bidmults,V);
   else 
     BSplCLib::DN(U,N,0,Degree(),Standard_False,
                 poles->Array1(),
-                *((TColStd_Array1OfReal*) NULL),
-                bidknots,bidmults,V);
+                BSplCLib::NoWeights(),
+                bidknots,&bidmults,V);
   return V;
 }
 
@@ -817,7 +806,7 @@ void Geom2d_BezierCurve::Resolution(const Standard_Real ToleranceUV,
     
     if (IsRational()) {  
       BSplCLib::Resolution(poles->Array1(),
-                          weights->Array1(),
+                          &weights->Array1(),
                           poles->Length(),
                           bidflatknots,
                           Degree(),
@@ -826,7 +815,7 @@ void Geom2d_BezierCurve::Resolution(const Standard_Real ToleranceUV,
     }
     else {
       BSplCLib::Resolution(poles->Array1(),
-                          *((TColStd_Array1OfReal*) NULL),
+                          BSplCLib::NoWeights(),
                           poles->Length(),
                           bidflatknots,
                           Degree(),
@@ -919,14 +908,14 @@ void Geom2d_BezierCurve::UpdateCoefficients(const Standard_Real )
                                    1, 2*(Degree()+1));
   if (IsRational())
     BSplCLib::BuildCache(parametercache,spanlenghtcache,0,Degree(),
-                        bidflatknots,poles->Array1(),weights->Array1(),
-                        coeffs->ChangeArray1(),wcoeffs->ChangeArray1());
+                        bidflatknots,poles->Array1(),&weights->Array1(),
+                        coeffs->ChangeArray1(),&wcoeffs->ChangeArray1());
   else
     BSplCLib::BuildCache(parametercache,spanlenghtcache,0,Degree(),
                         bidflatknots,poles->Array1(),
-                        *((TColStd_Array1OfReal*) NULL),
+                        BSplCLib::NoWeights(),
                         coeffs->ChangeArray1(),
-                        *((TColStd_Array1OfReal*) NULL));
+                        BSplCLib::NoWeights());
   validcache = 1;
 }
 
index f5d6997..c1a394d 100644 (file)
@@ -267,7 +267,7 @@ void Geom2dAPI_PointsToBSpline::Init
   // insert the Knots
   BSplCLib::InsertKnots(Degree,Standard_False,1,
                        NewTempPoles,NewTempKnots,NewTempMults,
-                       TheCurve.Knots(),TheCurve.Multiplicities(),
+                       TheCurve.Knots(),&TheCurve.Multiplicities(),
                        XPoles,Knots,Mults,
                        Epsilon(1));
   
index 3bbadc1..a055490 100644 (file)
@@ -562,7 +562,7 @@ void GeomAPI_PointsToBSplineSurface::Init(const TColStd_Array2OfReal& ZPoints,
   // insert the Knots
   BSplCLib::InsertKnots(VDegree,Standard_False,1,
                        NewTempPoles,NewTempKnots,NewTempMults,
-                       TheCurve.Knots(),TheCurve.Multiplicities(),
+                       TheCurve.Knots(),&TheCurve.Multiplicities(),
                        YPoles,VKnots,VMults,
                        Epsilon(1));
   
@@ -628,7 +628,7 @@ void GeomAPI_PointsToBSplineSurface::Init(const TColStd_Array2OfReal& ZPoints,
   // insert the Knots
   BSplCLib::InsertKnots(UDegree,Standard_False,1,
                        NewTempPoles2,NewTempKnots,NewTempMults,
-                       TheCurve2.Knots(),TheCurve2.Multiplicities(),
+                       TheCurve2.Knots(),&TheCurve2.Multiplicities(),
                        XPoles,UKnots,UMults,
                        Epsilon(1));
   
index d719a3d..e58ae86 100644 (file)
@@ -154,15 +154,15 @@ Standard_Integer SetSameDistribution(Handle(Geom_BSplineCurve)& C1,
   
   Standard_Integer NP,NK;
   if ( BSplCLib::PrepareInsertKnots(C1->Degree(),Standard_False,
-                                   K1,M1,K2,M2,NP,NK,Precision::PConfusion(),
+                                   K1,M1,K2,&M2,NP,NK,Precision::PConfusion(),
                                    Standard_False)) {
     TColgp_Array1OfPnt      NewP(1, NP);
     TColStd_Array1OfReal    NewW(1, NP);
     TColStd_Array1OfReal    NewK(1, NK);
     TColStd_Array1OfInteger NewM(1, NK);
     BSplCLib::InsertKnots(C1->Degree(),Standard_False,
-                         P1,W1,K1,M1,K2,M2,
-                         NewP,NewW,NewK,NewM,Precision::PConfusion(),
+                         P1,&W1,K1,M1,K2,&M2,
+                         NewP,&NewW,NewK,NewM,Precision::PConfusion(),
                          Standard_False);
     if ( C1->IsRational()) {
       C1 = new Geom_BSplineCurve(NewP,NewW,NewK,NewM,C1->Degree());
@@ -171,8 +171,8 @@ Standard_Integer SetSameDistribution(Handle(Geom_BSplineCurve)& C1,
       C1 = new Geom_BSplineCurve(NewP,NewK,NewM,C1->Degree());
     }
     BSplCLib::InsertKnots(C2->Degree(),Standard_False,
-                         P2,W2,K2,M2,K1,M1,
-                         NewP,NewW,NewK,NewM,Precision::PConfusion(),
+                         P2,&W2,K2,M2,K1,&M1,
+                         NewP,&NewW,NewK,NewM,Precision::PConfusion(),
                          Standard_False);
     if ( C2->IsRational()) {
       C2 = new Geom_BSplineCurve(NewP,NewW,NewK,NewM,C2->Degree());
index fb84613..51bfbde 100644 (file)
@@ -693,43 +693,43 @@ void GeomFill_ConstrainedFilling::MatchKnots()
     if(BSplCLib::PrepareInsertKnots(degree[1],0,
                                    knots[1]->Array1(),
                                    mults[1]->Array1(),
-                                   addk,addm,nbnp,nbnk,tolk,0)){
+                                   addk,&addm,nbnp,nbnk,tolk,0)){
       nm[1] = new TColStd_HArray1OfInteger(1,nbnk);
       nk[1] = new TColStd_HArray1OfReal(1,nbnk);
       ncpol[1] = new TColgp_HArray1OfPnt(1,nbnp);
       ncpol[3] = new TColgp_HArray1OfPnt(1,nbnp);
       BSplCLib::InsertKnots(degree[1],0,
-                           curvpol[1]->Array1(),PLib::NoWeights(),
+                           curvpol[1]->Array1(),BSplCLib::NoWeights(),
                            knots[1]->Array1(),mults[1]->Array1(),
-                           addk,addm,
-                           ncpol[1]->ChangeArray1(),PLib::NoWeights(),
+                           addk,&addm,
+                           ncpol[1]->ChangeArray1(),BSplCLib::NoWeights(),
                            nk[1]->ChangeArray1(),nm[1]->ChangeArray1(),
                            tolk,0);
 
       BSplCLib::InsertKnots(degree[1],0,
-                           curvpol[3]->Array1(),PLib::NoWeights(),
+                           curvpol[3]->Array1(),BSplCLib::NoWeights(),
                            knots[1]->Array1(),mults[1]->Array1(),
-                           addk,addm,
-                           ncpol[3]->ChangeArray1(),PLib::NoWeights(),
+                           addk,&addm,
+                           ncpol[3]->ChangeArray1(),BSplCLib::NoWeights(),
                            nk[1]->ChangeArray1(),nm[1]->ChangeArray1(),
                            tolk,0);
       if(!tgtepol[1].IsNull()){
        ntpol[1] = new TColgp_HArray1OfPnt(1,nbnp);
        BSplCLib::InsertKnots(degree[1],0,
-                             tgtepol[1]->Array1(),PLib::NoWeights(),
+                             tgtepol[1]->Array1(),BSplCLib::NoWeights(),
                              knots[1]->Array1(),mults[1]->Array1(),
-                             addk,addm,
-                             ntpol[1]->ChangeArray1(),PLib::NoWeights(),
+                             addk,&addm,
+                             ntpol[1]->ChangeArray1(),BSplCLib::NoWeights(),
                              nk[1]->ChangeArray1(),nm[1]->ChangeArray1(),
                              tolk,0);
       }
       if(!tgtepol[3].IsNull()){
        ntpol[3] = new TColgp_HArray1OfPnt(1,nbnp);
        BSplCLib::InsertKnots(degree[1],0,
-                             tgtepol[3]->Array1(),PLib::NoWeights(),
+                             tgtepol[3]->Array1(),BSplCLib::NoWeights(),
                              knots[1]->Array1(),mults[1]->Array1(),
-                             addk,addm,
-                             ntpol[3]->ChangeArray1(),PLib::NoWeights(),
+                             addk,&addm,
+                             ntpol[3]->ChangeArray1(),BSplCLib::NoWeights(),
                              nk[1]->ChangeArray1(),nm[1]->ChangeArray1(),
                              tolk,0);
       }
@@ -760,43 +760,43 @@ void GeomFill_ConstrainedFilling::MatchKnots()
     if(BSplCLib::PrepareInsertKnots(degree[0],0,
                                    knots[0]->Array1(),
                                    mults[0]->Array1(),
-                                   addk,addm,nbnp,nbnk,tolk,0)){
+                                   addk,&addm,nbnp,nbnk,tolk,0)){
       nm[0] = new TColStd_HArray1OfInteger(1,nbnk);
       nk[0] = new TColStd_HArray1OfReal(1,nbnk);
       ncpol[0] = new TColgp_HArray1OfPnt(1,nbnp);
       ncpol[2] = new TColgp_HArray1OfPnt(1,nbnp);
       BSplCLib::InsertKnots(degree[0],0,
-                           curvpol[0]->Array1(),PLib::NoWeights(),
+                           curvpol[0]->Array1(),BSplCLib::NoWeights(),
                            knots[0]->Array1(),mults[0]->Array1(),
-                           addk,addm,
-                           ncpol[0]->ChangeArray1(),PLib::NoWeights(),
+                           addk,&addm,
+                           ncpol[0]->ChangeArray1(),BSplCLib::NoWeights(),
                            nk[0]->ChangeArray1(),nm[0]->ChangeArray1(),
                            tolk,0);
 
       BSplCLib::InsertKnots(degree[0],0,
-                           curvpol[2]->Array1(),PLib::NoWeights(),
+                           curvpol[2]->Array1(),BSplCLib::NoWeights(),
                            knots[0]->Array1(),mults[0]->Array1(),
-                           addk,addm,
-                           ncpol[2]->ChangeArray1(),PLib::NoWeights(),
+                           addk,&addm,
+                           ncpol[2]->ChangeArray1(),BSplCLib::NoWeights(),
                            nk[0]->ChangeArray1(),nm[0]->ChangeArray1(),
                            tolk,0);
       if(!tgtepol[0].IsNull()){
        ntpol[0] = new TColgp_HArray1OfPnt(1,nbnp);
        BSplCLib::InsertKnots(degree[0],0,
-                             tgtepol[0]->Array1(),PLib::NoWeights(),
+                             tgtepol[0]->Array1(),BSplCLib::NoWeights(),
                              knots[0]->Array1(),mults[0]->Array1(),
-                             addk,addm,
-                             ntpol[0]->ChangeArray1(),PLib::NoWeights(),
+                             addk,&addm,
+                             ntpol[0]->ChangeArray1(),BSplCLib::NoWeights(),
                              nk[0]->ChangeArray1(),nm[0]->ChangeArray1(),
                              tolk,0);
       }
       if(!tgtepol[2].IsNull()){
        ntpol[2] = new TColgp_HArray1OfPnt(1,nbnp);
        BSplCLib::InsertKnots(degree[0],0,
-                             tgtepol[2]->Array1(),PLib::NoWeights(),
+                             tgtepol[2]->Array1(),BSplCLib::NoWeights(),
                              knots[0]->Array1(),mults[0]->Array1(),
-                             addk,addm,
-                             ntpol[2]->ChangeArray1(),PLib::NoWeights(),
+                             addk,&addm,
+                             ntpol[2]->ChangeArray1(),BSplCLib::NoWeights(),
                              nk[0]->ChangeArray1(),nm[0]->ChangeArray1(),
                              tolk,0);
       }
@@ -1355,10 +1355,10 @@ void GeomFill_ConstrainedFilling::CheckApprox(const Standard_Integer I)
     uu /= nbp;
     pbound = bou->Value(uu);
     BSplCLib::D0(uu,0,degree[I%2],0,ncpol[I]->Array1(),BSplCLib::NoWeights(),
-                nk[I%2]->Array1(),nm[I%2]->Array1(),papp);
+                nk[I%2]->Array1(),&nm[I%2]->Array1(),papp);
     if(donor) {
       BSplCLib::D0(uu,0,degree[I%2],0,ntpol[I]->Array1(),BSplCLib::NoWeights(),
-                  nk[I%2]->Array1(),nm[I%2]->Array1(),pbid);
+                  nk[I%2]->Array1(),&nm[I%2]->Array1(),pbid);
       vapp.SetXYZ(pbid.XYZ());
       vbound = bou->Norm(uu);
       if(vapp.Magnitude() > 1.e-15 && vbound.Magnitude() > 1.e-15){
index 3810fba..58186db 100644 (file)
@@ -106,15 +106,15 @@ void  GeomFill_Coons::Init(const TColgp_Array1OfPnt& P1,
   PLib::CoefficientsPoles(Coef, PLib::NoWeights(),
                          Pole, PLib::NoWeights());
   if (NPolU > 4) {
-    BSplCLib::IncreaseDegree(NPolU-1, Pole, PLib::NoWeights(), 
-                            CoefU, PLib::NoWeights());
+    BSplCLib::IncreaseDegree(NPolU-1, Pole, BSplCLib::NoWeights(), 
+                            CoefU, BSplCLib::NoWeights());
   }
   else {
      CoefU = Pole;
   }
   if (NPolV > 4) {
-    BSplCLib::IncreaseDegree(NPolV-1, Pole, PLib::NoWeights(), 
-                            CoefV, PLib::NoWeights());
+    BSplCLib::IncreaseDegree(NPolV-1, Pole, BSplCLib::NoWeights(), 
+                            CoefV, BSplCLib::NoWeights());
   }
   else {
       CoefV = Pole;
index a4fb78c..2bd44e6 100644 (file)
@@ -2190,10 +2190,10 @@ static void FunctionMultiply(Handle(Geom_BSplineSurface)&          BSurf,
                            BSurf->VDegree(),
                            surface_u_knots,
                            surface_v_knots,
-                           surface_u_mults,
-                           surface_v_mults,
+                           &surface_u_mults,
+                           &surface_v_mults,
                            surface_poles,
-                           surface_weights,
+                           &surface_weights,
                            newuflatknots,
                            newvflatknots,
                            BSurf->UDegree()+3,
index 047475b..59f962e 100644 (file)
@@ -77,9 +77,9 @@ Standard_Real GeomLib_DenominatorMultiplier::Value(const Standard_Real  UParamet
  BSplSLib::HomogeneousD1(mySurface->UKnot(mySurface->LastUKnotIndex()),VParameter,
                         0,0,
                         surface_poles,
-                        surface_weights,
+                        &surface_weights,
                         surface_u_knots,surface_v_knots,
-                        surface_u_mults,surface_v_mults,
+                        &surface_u_mults,&surface_v_mults,
                         udegree,vdegree,
                         mySurface->IsURational(),mySurface->IsVRational(),
                         mySurface->IsUPeriodic(),mySurface->IsVPeriodic(),
@@ -90,9 +90,9 @@ Standard_Real GeomLib_DenominatorMultiplier::Value(const Standard_Real  UParamet
  BSplSLib::HomogeneousD1(mySurface->UKnot(1),VParameter,
                         0,0,
                         surface_poles,
-                        surface_weights,
+                        &surface_weights,
                         surface_u_knots,surface_v_knots,
-                        surface_u_mults,surface_v_mults,
+                        &surface_u_mults,&surface_v_mults,
                         udegree,vdegree,
                         mySurface->IsURational(),mySurface->IsVRational(),
                         mySurface->IsUPeriodic(),mySurface->IsVPeriodic(),
index 19ccc39..697d377 100644 (file)
@@ -58,8 +58,8 @@ static void HermiteCoeff(const Handle(Geom_BSplineCurve)& BS,
   Index0   = BS->FirstUKnotIndex();
   Index1   = BS->LastUKnotIndex()-1;
 
-  BSplCLib::D1(0.0,Index0,Degree,Periodic,Weights,BSplCLib::NoWeights(),Knots,Mults,Denom0,Deriv0);
-  BSplCLib::D1(1.0,Index1,Degree,Periodic,Weights,BSplCLib::NoWeights(),Knots,Mults,Denom1,Deriv1);
+  BSplCLib::D1(0.0,Index0,Degree,Periodic,Weights,BSplCLib::NoWeights(),Knots,&Mults,Denom0,Deriv0);
+  BSplCLib::D1(1.0,Index1,Degree,Periodic,Weights,BSplCLib::NoWeights(),Knots,&Mults,Denom1,Deriv1);
   TAB(0) = 1/Denom0;                                                //Hermit coefficients
   TAB(1) = -Deriv0/(Denom0*Denom0);
   TAB(2) = -Deriv1/(Denom1*Denom1);
@@ -94,8 +94,8 @@ static void HermiteCoeff(const Handle(Geom2d_BSplineCurve)& BS,
   Index0   = BS->FirstUKnotIndex();
   Index1   = BS->LastUKnotIndex()-1;
 
-  BSplCLib::D1(0.0,Index0,Degree,Periodic,Weights,BSplCLib::NoWeights(),Knots,Mults,Denom0,Deriv0);
-  BSplCLib::D1(1.0,Index1,Degree,Periodic,Weights,BSplCLib::NoWeights(),Knots,Mults,Denom1,Deriv1);
+  BSplCLib::D1(0.0,Index0,Degree,Periodic,Weights,BSplCLib::NoWeights(),Knots,&Mults,Denom0,Deriv0);
+  BSplCLib::D1(1.0,Index1,Degree,Periodic,Weights,BSplCLib::NoWeights(),Knots,&Mults,Denom1,Deriv1);
   TAB(0) = 1/Denom0;                                                //Hermit coefficients
   TAB(1) = -Deriv0/(Denom0*Denom0);
   TAB(2) = -Deriv1/(Denom1*Denom1);
index 4400a8c..a0a04f8 100644 (file)
@@ -457,7 +457,7 @@ void  Law_BSpline::InsertKnots(const TColStd_Array1OfReal& Knots,
   
   if (!BSplCLib::PrepareInsertKnots(deg,periodic,
                                    knots->Array1(),mults->Array1(),
-                                   Knots,Mults,nbpoles,nbknots,Epsilon,Add))
+                                   Knots,&Mults,nbpoles,nbknots,Epsilon,Add))
     Standard_ConstructionError::Raise("Law_BSpline::InsertKnots");
   
   if (nbpoles == poles->Length()) return;
@@ -479,7 +479,7 @@ void  Law_BSpline::InsertKnots(const TColStd_Array1OfReal& Knots,
     TColStd_Array1OfReal adimnpol(1,2*npoles->Upper());
     BSplCLib::InsertKnots(deg,periodic,2,adimpol,
                          knots->Array1(), mults->Array1(),
-                         Knots, Mults,adimnpol,
+                         Knots, &Mults,adimnpol,
                          nknots->ChangeArray1(), nmults->ChangeArray1(),
                          Epsilon, Add);
     GetPoles(adimnpol,npoles->ChangeArray1(),nweights->ChangeArray1());
@@ -488,7 +488,7 @@ void  Law_BSpline::InsertKnots(const TColStd_Array1OfReal& Knots,
   else {
     BSplCLib::InsertKnots(deg,periodic,1,poles->Array1(), 
                          knots->Array1(), mults->Array1(),
-                         Knots, Mults,
+                         Knots, &Mults,
                          npoles->ChangeArray1(), 
                          nknots->ChangeArray1(), nmults->ChangeArray1(),
                          Epsilon, Add);
@@ -1403,7 +1403,7 @@ void Law_BSpline::D0 (const Standard_Real U,
   Standard_Real  NewU = U ;
   PeriodicNormalization(NewU) ;
   if (rational) {
-    BSplCLib::D0(NewU,0,deg,periodic,POLES, weights->Array1(),FKNOTS,FMULTS,P);
+    BSplCLib::D0(NewU,0,deg,periodic,POLES, &weights->Array1(),FKNOTS,FMULTS,P);
   }
   else {
     BSplCLib::D0(NewU,0,deg,periodic,POLES,BSplCLib::NoWeights(),FKNOTS,FMULTS,P);
@@ -1425,7 +1425,7 @@ void Law_BSpline::D1 (const Standard_Real U,
   Standard_Real  NewU = U ;
   PeriodicNormalization(NewU) ;
   if (rational) {
-    BSplCLib::D1(NewU,0,deg,periodic,POLES, weights->Array1(),FKNOTS,FMULTS,
+    BSplCLib::D1(NewU,0,deg,periodic,POLES, &weights->Array1(),FKNOTS,FMULTS,
                 P,V1) ;
   }
   else {
@@ -1449,7 +1449,7 @@ void Law_BSpline::D2(const Standard_Real U ,
   Standard_Real  NewU = U ;
   PeriodicNormalization(NewU) ;
   if (rational) {
-    BSplCLib::D2(NewU,0,deg,periodic,POLES,weights->Array1(),FKNOTS,FMULTS,
+    BSplCLib::D2(NewU,0,deg,periodic,POLES,&weights->Array1(),FKNOTS,FMULTS,
                 P, V1, V2) ;
   }
   else {
@@ -1474,7 +1474,7 @@ void Law_BSpline::D3(const Standard_Real U ,
   Standard_Real  NewU = U ;
   PeriodicNormalization(NewU) ;
   if (rational) {
-    BSplCLib::D3(NewU,0,deg,periodic,POLES,weights->Array1(),FKNOTS,FMULTS,
+    BSplCLib::D3(NewU,0,deg,periodic,POLES,&weights->Array1(),FKNOTS,FMULTS,
                 P, V1, V2, V3) ;
   }
   else {
@@ -1495,7 +1495,7 @@ Standard_Real Law_BSpline::DN(const Standard_Real    U,
 {
   Standard_Real V;
   if (rational) {
-    BSplCLib::DN(U,N,0,deg,periodic,POLES,weights->Array1(),FKNOTS,FMULTS,V);
+    BSplCLib::DN(U,N,0,deg,periodic,POLES,&weights->Array1(),FKNOTS,FMULTS,V);
   }
   else {
     BSplCLib::DN(U,N,0,deg,periodic,POLES,BSplCLib::NoWeights(),FKNOTS,FMULTS,V);
@@ -1650,7 +1650,7 @@ void  Law_BSpline::LocalD0
   BSplCLib::LocateParameter(deg, FKNOTS, U, periodic,FromK1,ToK2, index,u);
   index = BSplCLib::FlatIndex(deg,index,mults->Array1(),periodic);
   if (rational) {
-    BSplCLib::D0(u,index,deg,periodic,POLES,weights->Array1(),FKNOTS,FMULTS,P);
+    BSplCLib::D0(u,index,deg,periodic,POLES,&weights->Array1(),FKNOTS,FMULTS,P);
   }
   else {
     BSplCLib::D0(u,index,deg,periodic,POLES,BSplCLib::NoWeights(),FKNOTS,FMULTS,P);
@@ -1675,7 +1675,7 @@ void Law_BSpline::LocalD1 (const Standard_Real    U,
   BSplCLib::LocateParameter(deg, FKNOTS, U, periodic, FromK1,ToK2, index, u);
   index = BSplCLib::FlatIndex(deg,index,mults->Array1(),periodic);
   if (rational) {
-    BSplCLib::D1(u,index,deg,periodic,POLES,weights->Array1(),FKNOTS,FMULTS,P,V1);
+    BSplCLib::D1(u,index,deg,periodic,POLES,&weights->Array1(),FKNOTS,FMULTS,P,V1);
   }
   else {
     BSplCLib::D1(u,index,deg,periodic,POLES,BSplCLib::NoWeights(),FKNOTS,FMULTS,P,V1);
@@ -1703,7 +1703,7 @@ void Law_BSpline::LocalD2
   BSplCLib::LocateParameter(deg, FKNOTS, U, periodic, FromK1,ToK2, index, u);
   index = BSplCLib::FlatIndex(deg,index,mults->Array1(),periodic);
   if (rational) {
-    BSplCLib::D2(u,index,deg,periodic,POLES, weights->Array1(),FKNOTS,FMULTS,P,V1,V2);
+    BSplCLib::D2(u,index,deg,periodic,POLES, &weights->Array1(),FKNOTS,FMULTS,P,V1,V2);
   }
   else {
     BSplCLib::D2(u,index,deg,periodic,POLES,BSplCLib::NoWeights(),FKNOTS,FMULTS,P,V1,V2);
@@ -1732,7 +1732,7 @@ void Law_BSpline::LocalD3
   BSplCLib::LocateParameter(deg, FKNOTS, U, periodic, FromK1,ToK2, index, u);
   index = BSplCLib::FlatIndex(deg,index,mults->Array1(),periodic);
   if (rational) {
-    BSplCLib::D3(u,index,deg,periodic,POLES,weights->Array1(),FKNOTS,FMULTS,P,V1,V2,V3);
+    BSplCLib::D3(u,index,deg,periodic,POLES,&weights->Array1(),FKNOTS,FMULTS,P,V1,V2,V3);
   }
   else {
     BSplCLib::D3(u,index,deg,periodic,POLES,BSplCLib::NoWeights(),FKNOTS,FMULTS,P,V1,V2,V3);
@@ -1761,7 +1761,7 @@ Standard_Real Law_BSpline::LocalDN
   
   Standard_Real V;
   if (rational) {
-    BSplCLib::DN(u,N,index,deg,periodic,POLES,weights->Array1(),FKNOTS,FMULTS,V);
+    BSplCLib::DN(u,N,index,deg,periodic,POLES,&weights->Array1(),FKNOTS,FMULTS,V);
   }
   else {
     BSplCLib::DN(u,N,index,deg,periodic,POLES,BSplCLib::NoWeights(),FKNOTS,FMULTS,V);
@@ -2012,7 +2012,7 @@ void Law_BSpline::Resolution(const Standard_Real Tolerance3D,
   Standard_Real* bidr = (Standard_Real*)bid;
   if (rational) {
     BSplCLib::Resolution(*bidr,1,poles->Length(),
-                        weights->Array1(),FKNOTS,deg,
+                        &weights->Array1(),FKNOTS,deg,
                         Tolerance3D,
                         UTolerance) ;
   }
index 64c4ca7..a825d61 100755 (executable)
@@ -1,6 +1,5 @@
 PLib.cxx
 PLib.hxx
-PLib.lxx
 PLib_Base.cxx
 PLib_Base.hxx
 PLib_DoubleJacobiPolynomial.cxx
index 73f5977..665c719 100644 (file)
@@ -1331,9 +1331,9 @@ Standard_Boolean PLib::HermiteCoefficients(const Standard_Real FirstParameter,
 //=======================================================================
 
 void PLib::CoefficientsPoles (const TColgp_Array1OfPnt&   Coefs,
-                             const TColStd_Array1OfReal& WCoefs,
+                             const TColStd_Array1OfReal* WCoefs,
                              TColgp_Array1OfPnt&         Poles, 
-                             TColStd_Array1OfReal&       Weights)
+                             TColStd_Array1OfReal*       Weights)
 {
   TColStd_Array1OfReal tempC(1,3*Coefs.Length());
   PLib::SetPoles(Coefs,tempC);
@@ -1349,9 +1349,9 @@ void PLib::CoefficientsPoles (const TColgp_Array1OfPnt&   Coefs,
 //=======================================================================
 
 void PLib::CoefficientsPoles (const TColgp_Array1OfPnt2d& Coefs,
-                             const TColStd_Array1OfReal& WCoefs,
+                             const TColStd_Array1OfReal* WCoefs,
                              TColgp_Array1OfPnt2d&       Poles, 
-                             TColStd_Array1OfReal&       Weights)
+                             TColStd_Array1OfReal*       Weights)
 {
   TColStd_Array1OfReal tempC(1,2*Coefs.Length());
   PLib::SetPoles(Coefs,tempC);
@@ -1367,9 +1367,9 @@ void PLib::CoefficientsPoles (const TColgp_Array1OfPnt2d& Coefs,
 //=======================================================================
 
 void PLib::CoefficientsPoles (const TColStd_Array1OfReal& Coefs,
-                             const TColStd_Array1OfReal& WCoefs,
+                             const TColStd_Array1OfReal* WCoefs,
                              TColStd_Array1OfReal&       Poles, 
-                             TColStd_Array1OfReal&       Weights)
+                             TColStd_Array1OfReal*       Weights)
 {
   PLib::CoefficientsPoles(1,Coefs,WCoefs,Poles,Weights);
 }
@@ -1381,11 +1381,11 @@ void PLib::CoefficientsPoles (const TColStd_Array1OfReal& Coefs,
 
 void PLib::CoefficientsPoles (const Standard_Integer      dim,
                              const TColStd_Array1OfReal& Coefs,
-                             const TColStd_Array1OfReal& WCoefs,
+                             const TColStd_Array1OfReal* WCoefs,
                              TColStd_Array1OfReal&       Poles, 
-                             TColStd_Array1OfReal&       Weights)
+                             TColStd_Array1OfReal*       Weights)
 {
-  Standard_Boolean rat = &WCoefs != NULL;
+  Standard_Boolean rat = WCoefs != NULL;
   Standard_Integer loc = Coefs.Lower();
   Standard_Integer lop = Poles.Lower();
   Standard_Integer lowc=0;
@@ -1398,8 +1398,8 @@ void PLib::CoefficientsPoles (const Standard_Integer      dim,
   Standard_Integer i,j,k; 
   //Les Extremites.
   if (rat) { 
-    lowc = WCoefs.Lower(); lowp = Weights.Lower();
-    upwc = WCoefs.Upper(); upwp = Weights.Upper();
+    lowc = WCoefs->Lower(); lowp = Weights->Lower();
+    upwc = WCoefs->Upper(); upwp = Weights->Upper();
   }
 
   for (i = 0; i < dim; i++){
@@ -1407,14 +1407,14 @@ void PLib::CoefficientsPoles (const Standard_Integer      dim,
     Poles (upp - i) = Coefs (upc - i);
   }
   if (rat) {
-    Weights (lowp) = WCoefs (lowc);
-    Weights (upwp) = WCoefs (upwc);
+    (*Weights) (lowp) = (*WCoefs) (lowc);
+    (*Weights) (upwp) = (*WCoefs) (upwc);
   }
   
   Standard_Real Cnp;
   for (i = 2; i < reflen; i++ ) {
     Cnp = PLib::Bin(reflen - 1, i - 1);
-    if (rat) Weights (lowp + i - 1) = WCoefs (lowc + i - 1) / Cnp;
+    if (rat) (*Weights)(lowp + i - 1) = (*WCoefs)(lowc + i - 1) / Cnp;
 
     for(j = 0; j < dim; j++){
       Poles(lop + dim * (i-1) + j)= Coefs(loc + dim * (i-1) + j) / Cnp;
@@ -1424,7 +1424,7 @@ void PLib::CoefficientsPoles (const Standard_Integer      dim,
   for (i = 1; i <= reflen - 1; i++) {
 
     for (j = reflen - 1; j >= i; j--) {
-      if (rat) Weights (lowp + j) += Weights (lowp + j -1);
+      if (rat) (*Weights)(lowp + j) += (*Weights)(lowp + j - 1);
 
       for(k = 0; k < dim; k++){
        Poles(lop + dim * j + k) += Poles(lop + dim * (j - 1) + k);
@@ -1436,7 +1436,7 @@ void PLib::CoefficientsPoles (const Standard_Integer      dim,
     for (i = 1; i <= reflen; i++) {
 
       for(j = 0; j < dim; j++){
-       Poles(lop + dim * (i-1) + j) /= Weights(lowp + i -1);
+       Poles(lop + dim * (i-1) + j) /= (*Weights)(lowp + i -1);
       }
     }
   }
@@ -1450,7 +1450,7 @@ void PLib::CoefficientsPoles (const Standard_Integer      dim,
 void PLib::Trimming(const Standard_Real   U1, 
                    const Standard_Real   U2, 
                    TColgp_Array1OfPnt&   Coefs,
-                   TColStd_Array1OfReal& WCoefs)
+                   TColStd_Array1OfReal* WCoefs)
 {
   TColStd_Array1OfReal temp(1,3*Coefs.Length());
   PLib::SetPoles(Coefs,temp);
@@ -1466,7 +1466,7 @@ void PLib::Trimming(const Standard_Real   U1,
 void PLib::Trimming(const Standard_Real   U1, 
                    const Standard_Real   U2, 
                    TColgp_Array1OfPnt2d& Coefs,
-                   TColStd_Array1OfReal& WCoefs)
+                   TColStd_Array1OfReal* WCoefs)
 {
   TColStd_Array1OfReal temp(1,2*Coefs.Length());
   PLib::SetPoles(Coefs,temp);
@@ -1482,7 +1482,7 @@ void PLib::Trimming(const Standard_Real   U1,
 void PLib::Trimming(const Standard_Real   U1, 
                    const Standard_Real   U2, 
                    TColStd_Array1OfReal& Coefs,
-                   TColStd_Array1OfReal& WCoefs)
+                   TColStd_Array1OfReal* WCoefs)
 {
   PLib::Trimming(U1,U2,1,Coefs,WCoefs);
 }
@@ -1496,7 +1496,7 @@ void PLib::Trimming(const Standard_Real U1,
                    const Standard_Real U2, 
                    const Standard_Integer dim, 
                    TColStd_Array1OfReal& Coefs,
-                   TColStd_Array1OfReal& WCoefs)
+                   TColStd_Array1OfReal* WCoefs)
 {
 
   // principe :
@@ -1508,12 +1508,12 @@ void PLib::Trimming(const Standard_Real U1,
   Standard_Integer indc, indw=0;
   Standard_Integer upc = Coefs.Upper() - dim + 1, upw=0;
   Standard_Integer len = Coefs.Length()/dim;
-  Standard_Boolean rat = &WCoefs != NULL;
+  Standard_Boolean rat = WCoefs != NULL;
 
   if (rat) {
-    if(len != WCoefs.Length())
+    if(len != WCoefs->Length())
       Standard_Failure::Raise("PLib::Trimming : nbcoefs/dim != nbweights !!!");
-    upw = WCoefs.Upper();
+    upw = WCoefs->Upper();
   }
   len --;
 
@@ -1526,7 +1526,7 @@ void PLib::Trimming(const Standard_Real U1,
     for( j = 0; j < dim; j++){
       Coefs(indc - dim + j) += U1 * Coefs(indc + j);
     }
-    if (rat) WCoefs(indw - 1) += U1 * WCoefs(indw);
+    if (rat) (*WCoefs)(indw - 1) += U1 * (*WCoefs)(indw);
     
     //calcul des coefficients intermediaires :
 
@@ -1539,7 +1539,7 @@ void PLib::Trimming(const Standard_Real U1,
       }
       if (rat) {
        indw ++;
-        WCoefs(indw - 1) = U1 * WCoefs(indw) + lsp * WCoefs(indw - 1);
+        (*WCoefs)(indw - 1) = U1 * (*WCoefs)(indw) + lsp * (*WCoefs)(indw - 1);
       }
     }
 
@@ -1548,7 +1548,7 @@ void PLib::Trimming(const Standard_Real U1,
     for(j = 0; j < dim; j++){
       Coefs(upc + j) *= lsp;
     }
-    if (rat) WCoefs(upw) *= lsp;
+    if (rat) (*WCoefs)(upw) *= lsp;
   }
 }
 
@@ -1561,11 +1561,11 @@ void PLib::Trimming(const Standard_Real U1,
 //=======================================================================
 
 void PLib::CoefficientsPoles (const TColgp_Array2OfPnt&   Coefs,
-                             const TColStd_Array2OfReal& WCoefs,
+                             const TColStd_Array2OfReal* WCoefs,
                              TColgp_Array2OfPnt&         Poles,
-                             TColStd_Array2OfReal&       Weights) 
+                             TColStd_Array2OfReal*       Weights) 
 {
-  Standard_Boolean rat = (&WCoefs != NULL);
+  Standard_Boolean rat = (WCoefs != NULL);
   Standard_Integer LowerRow  = Poles.LowerRow();
   Standard_Integer UpperRow  = Poles.UpperRow();
   Standard_Integer LowerCol  = Poles.LowerCol();
@@ -1587,7 +1587,7 @@ void PLib::CoefficientsPoles (const TColgp_Array2OfPnt&   Coefs,
   for (NPoleu = LowerRow; NPoleu <= UpperRow; NPoleu++){
     Poles (NPoleu, LowerCol) =  Coefs (NPoleu, LowerCol);
     if (rat) {
-      Weights (NPoleu, LowerCol) =  WCoefs (NPoleu, LowerCol);
+      (*Weights) (NPoleu, LowerCol) =  (*WCoefs) (NPoleu, LowerCol);
     }
 
     for (Col = LowerCol + 1; Col <= UpperCol - 1; Col++) {
@@ -1596,12 +1596,12 @@ void PLib::CoefficientsPoles (const TColgp_Array2OfPnt&   Coefs,
       Temp.Divide (Cnp);
       Poles (NPoleu, Col).SetXYZ (Temp);
       if (rat) {
-       Weights (NPoleu, Col) = WCoefs (NPoleu, Col) /  Cnp;
+       (*Weights) (NPoleu, Col) = (*WCoefs) (NPoleu, Col) /  Cnp;
       }
     }
     Poles (NPoleu, UpperCol) = Coefs (NPoleu, UpperCol);
     if (rat) {
-      Weights (NPoleu, UpperCol) = WCoefs (NPoleu, UpperCol);
+      (*Weights) (NPoleu, UpperCol) = (*WCoefs) (NPoleu, UpperCol);
     }
 
     for (I1 = 1; I1 <= RowLength - 1; I1++) {
@@ -1610,7 +1610,7 @@ void PLib::CoefficientsPoles (const TColgp_Array2OfPnt&   Coefs,
         Temp.SetLinearForm 
          (Poles (NPoleu, I2).XYZ(), Poles (NPoleu, I2-1).XYZ());
        Poles (NPoleu, I2).SetXYZ (Temp);
-       if (rat) Weights(NPoleu, I2) += Weights(NPoleu, I2-1);
+       if (rat) (*Weights)(NPoleu, I2) += (*Weights)(NPoleu, I2-1);
       }
     } 
   }
@@ -1622,7 +1622,7 @@ void PLib::CoefficientsPoles (const TColgp_Array2OfPnt&   Coefs,
       Temp = Poles (Row, NPolev).XYZ();
       Temp.Divide (Cnp);
       Poles (Row, NPolev).SetXYZ (Temp);
-      if (rat) Weights(Row, NPolev) /= Cnp;
+      if (rat) (*Weights)(Row, NPolev) /= Cnp;
     }
 
     for (I1 = 1; I1 <= ColLength - 1; I1++) {
@@ -1631,7 +1631,7 @@ void PLib::CoefficientsPoles (const TColgp_Array2OfPnt&   Coefs,
         Temp.SetLinearForm 
          (Poles (I2, NPolev).XYZ(), Poles (I2-1, NPolev).XYZ());
        Poles (I2, NPolev).SetXYZ (Temp);
-       if (rat) Weights(I2, NPolev) += Weights(I2-1, NPolev);
+       if (rat) (*Weights)(I2, NPolev) += (*Weights)(I2-1, NPolev);
       }
     }
   }
@@ -1640,7 +1640,7 @@ void PLib::CoefficientsPoles (const TColgp_Array2OfPnt&   Coefs,
     for (Row = LowerRow; Row <= UpperRow; Row++) {
 
       for (Col = LowerCol; Col <= UpperCol; Col++) {
-       W = Weights (Row, Col);
+       W = (*Weights) (Row, Col);
        Temp = Poles(Row, Col).XYZ();
        Temp.Divide (W);
        Poles(Row, Col).SetXYZ (Temp);
@@ -1657,9 +1657,9 @@ void PLib::CoefficientsPoles (const TColgp_Array2OfPnt&   Coefs,
 void PLib::UTrimming(const Standard_Real U1, 
                     const Standard_Real U2, 
                     TColgp_Array2OfPnt& Coeffs, 
-     &