Package openalea :: Package plantgl :: Package scenegraph :: Module _pglsg :: Class NurbsCurve
[frames] | no frames]

Class NurbsCurve

 object --+                        
          |                        
??.instance --+                    
              |                    
    SceneObject --+                
                  |                
           Geometry --+            
                      |            
              Primitive --+        
                          |        
            ParametricModel --+    
                              |    
 object --+                   |    
          |                   |    
??.instance --+               |    
              |               |    
    SceneObject --+           |    
                  |           |    
           Geometry --+       |    
                      |       |    
              Primitive --+   |    
                          |   |    
                LineicModel --+    
                              |    
                    BezierCurve --+
                                  |
                                 NurbsCurve

NURBS Curve describes rational and non rational B-Spline curves.
It is defined from a list of control points Pi, a knots vector and a degree p.It uses the parametric equation C(u) = Sum(i=0,n)(Ri,p(u)Pi with u in [a,b]where the Ri,p(u) are p-th degree rational basis functions defined on the knot vector.

Instance Methods
 
__init__(...)
__init__( (object)arg1, (Point4Array)ctrlPointList [, (RealArray)knotList [, (int)degree [, (int)strides]]]) -> None :
 
__repr__(...)
__repr__( (NurbsCurve)arg1) -> str :
 
getDerivativeAt(...)
getDerivativeAt( (NurbsCurve)arg1, (float)u, (int)d) -> Vector4 :
 
getDerivativesAt(...)
getDerivativesAt( (NurbsCurve)arg1, (float)u) -> Point4Array :
 
isDegreeToDefault(...)
isDegreeToDefault( (NurbsCurve)arg1) -> bool :
 
isKnotListToDefault(...)
isKnotListToDefault( (NurbsCurve)arg1) -> bool :
 
setKnotListToDefault(...)
setKnotListToDefault( (NurbsCurve)arg1) -> bool :

Inherited from BezierCurve: copy, isStrideToDefault

Inherited from LineicModel: findClosest, getArcLengthToUMapping, getLength, getNormalAt, getPointAt, getStride, getTangentAt, getUToArcLengthMapping

Inherited from Geometry: deepcopy, isACurve, isASurface, isAVolume, isExplicit

Inherited from SceneObject: __reduce__, apply, getId, getName, isNamed, isValid, setName

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __getattribute__, __hash__, __reduce_ex__, __setattr__, __str__

Static Methods
 
CSpline(pts, is_closed=False, is_linear=False)
Build a nurbs curve by interpolate (C1) the points pts.
 
basisFunctions(...)
basisFunctions( (int)span, (float)u, (int)degree, (RealArray)knotList) -> RealArray : [float] basisFunctions(int span, float u, int degree, [float] knotList).Compute the Basis Functions values at a given u for degree and on the knot vector knotList.See Algo 2.2 From The Nurbs Book p70.
 
defaultKnotList(...)
defaultKnotList( (int)nbCtrlPoints, (int)degree) -> RealArray : Compute a default knot list for a curve of n control points and a degree d
 
defaultKnotListTest(...)
defaultKnotListTest( (RealArray)knots, (int)nbCtrlPoints, (int)degree) -> bool : Test whether knots corresponds to a default knot list for a curve of n control points and a degree d
 
derivatesBasisFunctions(...)
derivatesBasisFunctions( (int)n, (float)u, (int)span, (int)degree, (RealArray)knotList) -> RealArray2 : [float] derivatesBasisFunctions(int span, float u, int _degree, [float] _knotList).Compute the n-th Derivative Basis Functions values at a given u for degree and on the knot vector knotList.See Algo 2.2 From The Nurbs Book p70.
 
findSpan(...)
findSpan( (float)u, (int)degree, (RealArray)knotList) -> int : int findSpan(float u, int degree, [float] knotList).Determine the knot Span index at a given u for degree and on the knot vector knotList.See the Nurbs Book : A2.1 p68
 
fit(...)
fit( (Point3Array)points, (int)degree, (int)nbctrlpoints) -> object : fit(points [, int degree, int nbctrlpoints])

Inherited from BezierCurve: bernstein, bernstein_factors

Class Variables

Inherited from BezierCurve: __instance_size__

Inherited from SceneObject: __safe_for_unpickling__

Properties
  DEFAULT_NURBS_DEGREE
  degree
  knotList

Inherited from BezierCurve: DEFAULT_STRIDE, ctrlPointList, stride

Inherited from LineicModel: firstKnot, lastKnot

Inherited from SceneObject: name

Inherited from object: __class__

Method Details

CSpline(pts, is_closed=False, is_linear=False)
Static Method

 

Build a nurbs curve by interpolate (C1) the points pts.
The resulting curve can be closed.

__init__(...)
(Constructor)

 

__init__( (object)arg1, (Point4Array)ctrlPointList [, (RealArray)knotList [, (int)degree [, (int)strides]]]) -> None :

    C++ signature :
        void __init__(struct _object *,class TOOLS::RefCountPtr<class PGL::Point4Array> [,class TOOLS::RefCountPtr<class TOOLS::RealArray> [,unsigned int [,unsigned int]]])

Overrides: object.__init__

__repr__(...)
(Representation operator)

 

__repr__( (NurbsCurve)arg1) -> str :

    C++ signature :
        class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __repr__(class PGL::NurbsCurve *)

Overrides: object.__repr__

basisFunctions(...)
Static Method

 

basisFunctions( (int)span, (float)u, (int)degree, (RealArray)knotList) -> RealArray :
    [float] basisFunctions(int span, float u, int  degree, [float] knotList).Compute the Basis Functions values at a given u for degree and on the knot vector knotList.See Algo 2.2 From The Nurbs Book p70.

    C++ signature :
        class TOOLS::RefCountPtr<class TOOLS::RealArray> basisFunctions(unsigned int,double,unsigned int,class TOOLS::RefCountPtr<class TOOLS::RealArray>)

defaultKnotList(...)
Static Method

 

defaultKnotList( (int)nbCtrlPoints, (int)degree) -> RealArray :
    Compute a default knot list for a curve of n control points and a degree d

    C++ signature :
        class TOOLS::RefCountPtr<class TOOLS::RealArray> defaultKnotList(unsigned int,unsigned int)

defaultKnotListTest(...)
Static Method

 

defaultKnotListTest( (RealArray)knots, (int)nbCtrlPoints, (int)degree) -> bool :
    Test whether knots corresponds to a default knot list for a curve of n control points and a degree d

    C++ signature :
        bool defaultKnotListTest(class TOOLS::RefCountPtr<class TOOLS::RealArray>,unsigned int,unsigned int)

derivatesBasisFunctions(...)
Static Method

 

derivatesBasisFunctions( (int)n, (float)u, (int)span, (int)degree, (RealArray)knotList) -> RealArray2 :
    [float] derivatesBasisFunctions(int span, float u, int  _degree, [float] _knotList).Compute the n-th Derivative Basis Functions values at a given u for degree and on the knot vector knotList.See Algo 2.2 From The Nurbs Book p70.

    C++ signature :
        class TOOLS::RefCountPtr<class TOOLS::RealArray2> derivatesBasisFunctions(int,double,int,unsigned int,class TOOLS::RefCountPtr<class TOOLS::RealArray>)

findSpan(...)
Static Method

 

findSpan( (float)u, (int)degree, (RealArray)knotList) -> int :
    int findSpan(float u,  int degree,  [float] knotList).Determine the knot Span index at a given u for degree and on the knot vector knotList.See the Nurbs Book : A2.1 p68

    C++ signature :
        unsigned int findSpan(double,unsigned int,class TOOLS::RefCountPtr<class TOOLS::RealArray>)

fit(...)
Static Method

 

fit( (Point3Array)points, (int)degree, (int)nbctrlpoints) -> object :
    fit(points [, int degree, int nbctrlpoints])

    C++ signature :
        class boost::python::api::object fit(class TOOLS::RefCountPtr<class PGL::Point3Array>,int,int)

fit( (Point3Array)points) -> object :

    C++ signature :
        class boost::python::api::object fit(class TOOLS::RefCountPtr<class PGL::Point3Array>)

fit( (Polyline)points, (int)degree, (int)nbctrlpoints) -> object :

    C++ signature :
        class boost::python::api::object fit(class PGL::Polyline *,int,int)

fit( (Polyline)points) -> object :

    C++ signature :
        class boost::python::api::object fit(class PGL::Polyline *)

getDerivativeAt(...)

 

getDerivativeAt( (NurbsCurve)arg1, (float)u, (int)d) -> Vector4 :

    C++ signature :
        class TOOLS::Vector4 getDerivativeAt(class PGL::NurbsCurve {lvalue},double,int)

getDerivativesAt(...)

 

getDerivativesAt( (NurbsCurve)arg1, (float)u) -> Point4Array :

    C++ signature :
        class TOOLS::RefCountPtr<class PGL::Point4Array> getDerivativesAt(class PGL::NurbsCurve {lvalue},double)

isDegreeToDefault(...)

 

isDegreeToDefault( (NurbsCurve)arg1) -> bool :

    C++ signature :
        bool isDegreeToDefault(class PGL::NurbsCurve {lvalue})

isKnotListToDefault(...)

 

isKnotListToDefault( (NurbsCurve)arg1) -> bool :

    C++ signature :
        bool isKnotListToDefault(class PGL::NurbsCurve {lvalue})

setKnotListToDefault(...)

 

setKnotListToDefault( (NurbsCurve)arg1) -> bool :

    C++ signature :
        bool setKnotListToDefault(class PGL::NurbsCurve {lvalue})


Property Details

DEFAULT_NURBS_DEGREE

Get Method:
unreachable(...)

degree

Get Method:
unreachable(...)
Set Method:
unreachable(...)

knotList

Get Method:
unreachable(...)
Set Method:
unreachable(...)