0024682: Move out B-spline cache from curves and surfaces to dedicated classes BSplCL...
[occt.git] / src / GeomAdaptor / GeomAdaptor_Curve.cdl
index c286374..626669d 100644 (file)
@@ -33,7 +33,8 @@ uses Vec                  from gp,
      BSplineCurve         from Geom,
      CurveType            from GeomAbs,
      Shape                from GeomAbs,
-     HCurve               from Adaptor3d
+     HCurve               from Adaptor3d,
+     Cache                from BSplCLib
      
 raises NoSuchObject from Standard,
        ConstructionError from Standard,
@@ -129,10 +130,26 @@ is
         --- Purpose : Computes the point of parameter U on the curve 
    is redefined static;
 
+   ValueBSpline(me; U: Real) returns Pnt from gp
+        --- Purpose : Computes the point of parameter U on the B-spline curve
+   is private;
+
+   ValueOffset(me; U: Real) returns Pnt from gp
+        --- Purpose : Computes the point of parameter U on the offset curve
+   is private;
+
    D0 (me; U : Real; P : out Pnt from gp)
         --- Purpose : Computes the point of parameter U.
    is redefined static;
 
+   D0BSpline(me; theU : Real; theP : out Pnt from gp)
+        --- Purpose : Computes the point of parameter U on the B-spline curve
+   is private;
+
+   D0Offset(me; theU : Real; theP : out Pnt from gp)
+        --- Purpose : Computes the point of parameter U on the offset curve
+   is private;
+
    D1 (me; U : Real; P : out Pnt from gp ; V : out Vec from gp)
         --- Purpose : Computes the point of parameter U on the curve 
         --  with its first derivative.
@@ -142,6 +159,16 @@ is
        --  derivatives are computed on the current interval.
        --  else the derivatives are computed on the basis curve.
    is redefined static;
+
+   D1BSpline(me; theU : Real; theP : out Pnt from gp ; theV : out Vec from gp)
+        --- Purpose : Computes the point of parameter U on the B-spline curve
+        --  and its derivative
+   is private;
+
+   D1Offset(me; theU : Real; theP : out Pnt from gp ; theV : out Vec from gp)
+        --- Purpose : Computes the point of parameter U on the offset curve
+        --  and its derivative
+   is private;
     
    D2 (me; U : Real; P : out Pnt from gp; V1, V2 : out Vec from gp)
         --- Purpose :
@@ -154,6 +181,16 @@ is
        --  else the derivatives are computed on the basis curve.
    is redefined static;
 
+   D2BSpline(me; theU : Real; theP : out Pnt from gp; theV1, theV2 : out Vec from gp)
+        --- Purpose : Computes the point of parameter U on the B-spline curve
+        --  and its first and second derivatives
+   is private;
+
+   D2Offset(me; theU : Real; theP : out Pnt from gp; theV1, theV2 : out Vec from gp)
+        --- Purpose : Computes the point of parameter U on the offset curve
+        --  and its first and second derivatives
+   is private;
+
    D3 (me; U : Real; P : out Pnt from gp; V1, V2, V3 : out Vec from gp)
         --- Purpose :
         --  Returns the point P of parameter U, the first, the second 
@@ -164,6 +201,16 @@ is
        --  derivatives are computed on the current interval.
        --  else the derivatives are computed on the basis curve.
    is redefined static;
+
+   D3BSpline(me; theU : Real; theP : out Pnt from gp; theV1, theV2, theV3 : out Vec from gp)
+        --- Purpose : Computes the point of parameter U on the B-spline curve
+        --  and its first, second and third derivatives
+   is private;
+
+   D3Offset(me; theU : Real; theP : out Pnt from gp; theV1, theV2, theV3 : out Vec from gp)
+        --- Purpose : Computes the point of parameter U on the offset curve
+        --  and its first, second and third derivatives
+   is private;
         
    DN (me; U : Real; N : Integer)   returns Vec from gp
         --- Purpose :
@@ -179,6 +226,19 @@ is
    is redefined static;
 
 
+   DNBSpline(me; theU : Real; N : Integer)   returns Vec from gp
+        --- Purpose :
+        --  The returned vector gives the value of the derivative for the 
+        --  order of derivation N.
+   is private;
+
+   DNOffset(me; theU : Real; N : Integer)   returns Vec from gp
+        --- Purpose :
+        --  The returned vector gives the value of the derivative for the 
+        --  order of derivation N.
+   is private;
+
+
    Resolution(me; R3d :Real) returns Real
         ---Purpose : returns the parametric resolution
    is redefined static;   
@@ -279,6 +339,11 @@ is
 
    load(me : in out; C : Curve from Geom; UFirst,ULast : Real)
    is private;
+    
+    RebuildCache(me; theParameter : Real)
+    ---Purpose: Rebuilds B-spline cache
+    -- \param theParameter the value on the knot axis which identifies the caching span
+    is static private;
    
 fields 
 
@@ -286,6 +351,8 @@ fields
   myTypeCurve         : CurveType        from GeomAbs ;
   myFirst             : Real             from Standard ;
   myLast              : Real             from Standard;
+  myCurveCache        : Cache            from BSplCLib;
+  myOffsetBaseCurveAdaptor : HCurve      from Adaptor3d;
   
 friends
     class Surface from GeomAdaptor