Public Member Functions
NurbsCurveList Class Reference

Detailed Description

A NurbsCurveList is a kind of Geometry and is a collection of NurbsCurve objects.

We can navigate the NurbsCurveList using the generic terms such as Points or we can choose to use navigate using terms that are specific to the NurbsCurveList such as NurbsCurves, ControlPoints. There are some functions that do not fit with a generic terms such as Knots, which are specific to NURBS, this is why there are specific terms as well as generic terms.

A nurbs curve is defined as follows (surface can be defined similarly in 2 dimensions degree): k, order: k+1, Number of Control Points: n, Knot sequence = t(0), t(1)... t(k)... t(n)... t(n+k+1) Where the knot sequence is non-decreasing which means t(0) <= t(1) <= ..... <= t(n)... <= t(n+k+1)

The above is a general definition for a nurbs curve and IGES standard supports this definition. However in most industrial design systems, people put some constraints on the knot sequence: for a degree k curve, the first k+1 knots and the last k+1 knots are equal, e.g. t(0) = t(1) = ... = t(k) and t(n+1) = t(n+2) =... = t(n+k+1). This ensures the curve passes the start ControlPoint and end ControlPoint which is a nice property to control the final shape of nurbs curve. For now we only support this constrained version of IGES format as we expect most design systems are using this format.

See also:
Primitive::GetGeometry, X3DObject::AddGeometry
Example:
        using namespace XSI;

        Application app;
        Model root = app.GetActiveSceneRoot();

        X3DObject myArc;
        root.AddGeometry( L"Arc", L"NurbsCurve", L"", myArc );

        NurbsCurveList curvelist( myArc.GetActivePrimitive().GetGeometry() );

#include <xsi_nurbscurvelist.h>

Inheritance diagram for NurbsCurveList:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 NurbsCurveList ()
 ~NurbsCurveList ()
 NurbsCurveList (const CRef &in_ref)
 NurbsCurveList (const NurbsCurveList &in_obj)
 NurbsCurveList (const Geometry &in_obj)
bool IsA (siClassID in_ClassID) const
siClassID GetClassID () const
NurbsCurveListoperator= (const NurbsCurveList &in_obj)
NurbsCurveListoperator= (const Geometry &in_geom)
NurbsCurveListoperator= (const CRef &in_ref)
CStatus GetClosed (bool &out_bClosed) const
CNurbsCurveRefArray GetCurves () const
CControlPointRefArray GetControlPoints () const
CStatus GetLength (double &out_dLength) const
CStatus GetClosestCurvePosition (MATH::CVector3 &in_vPosition, LONG &out_lCurveIndex, double &out_dSquaredDistance, double &out_dUValue, MATH::CVector3 &out_vPosition) const
CStatus Get (siNurbsFormat in_siNurbsFormat, CNurbsCurveDataArray &out_curves) const
CStatus Set (const CNurbsCurveDataArray &in_curves, siNurbsFormat in_siNurbsFormat=siSINurbs)
CStatus AddCurve (const CNurbsCurveData &in_curve, siNurbsFormat in_siNurbsFormat, NurbsCurve &out_NurbsCurve)

Constructor & Destructor Documentation

Default constructor.

Default destructor.

NurbsCurveList ( const CRef in_ref)

Constructor.

Parameters:
in_refconstant reference object.
NurbsCurveList ( const NurbsCurveList in_obj)

Copy constructor.

Parameters:
in_objconstant class object.
NurbsCurveList ( const Geometry in_obj)

Copy constructor.

Parameters:
in_objGeometry object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID) const [virtual]

Returns true if a given class type is compatible with this API class.

Parameters:
in_ClassIDclass type.
Returns:
true if the class is compatible, false otherwise.

Reimplemented from Geometry.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from Geometry.

NurbsCurveList& operator= ( const NurbsCurveList in_obj)

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

Parameters:
in_objconstant class object.
Returns:
The new NurbsCurveList object.
NurbsCurveList& operator= ( const Geometry in_geom)

Creates a Polygon object from a Geometry object. The newly created object is set to empty if the input Geometry object is not compatible.

Parameters:
in_geomSource geometry
Returns:
The new NurbsCurveList object.

Reimplemented from Geometry.

NurbsCurveList& operator= ( const CRef in_ref)

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

Parameters:
in_refconstant class object.
Returns:
The new NurbsCurveList object.

Reimplemented from Geometry.

CStatus GetClosed ( bool &  out_bClosed) const

Returns true if the curve list is closed or false otherwise.

Return values:
out_bClosedreturn true if the curve list is closed or false otherwise.
Returns:
CStatus::OK success
CStatus::Fail other failure
CNurbsCurveRefArray GetCurves ( ) const

Returns an array of all NurbsCurve objects on this NurbsCurveList object.

Returns:
Array of NurbsCurve objects.
CControlPointRefArray GetControlPoints ( ) const

Returns an array of all ControlPoint objects on this NurbsCurveList object.

Returns:
A ControlPoint array.
CStatus GetLength ( double &  out_dLength) const

Returns an array of all ControlPoint objects on this NurbsCurveList object. This corresponds to the sum of the length of the NurbsCurve composing this NurbsCurveList.

Return values:
out_dLengthreturns the length of the NurbsCurveList
Returns:
CStatus::OK success
CStatus::Fail other failure
CStatus GetClosestCurvePosition ( MATH::CVector3 in_vPosition,
LONG &  out_lCurveIndex,
double &  out_dSquaredDistance,
double &  out_dUValue,
MATH::CVector3 out_vPosition 
) const

Returns the curve index, position of the point on it, U value and distance from the given position.

Parameters:
in_vPositionA position expressed in the NurbsCurveList object frame of reference.
Return values:
out_lCurveIndexThe curve index to which the position is the closest.
out_dSquaredDistanceThe squared distance of the specified position to the curve point.
out_dUValueThe corresponding UValue on the NurbsCurve.
out_vPositionThe actual curve point position at U value.
Returns:
CStatus::OK success
CStatus::Fail other failure
CStatus Get ( siNurbsFormat  in_siNurbsFormat,
CNurbsCurveDataArray out_curves 
) const

Returns a complete data description of this nurbs curve list.

Parameters:
in_siNurbsFormatSpecifies how the data is formatted.
Return values:
out_curvesThe entire curve data description.
Returns:
CStatus::OK success
CStatus::Fail other failure
CStatus Set ( const CNurbsCurveDataArray in_curves,
siNurbsFormat  in_siNurbsFormat = siSINurbs 
)

Sets the current NurbsCurveList geometry, from a complete data description of a nurbs curve list. This is only available from compiled operators. If you use it on a object with clusters and you change the topology the burden of updating the clusters is on the user.

Parameters:
in_curvesThe data for the new representation of this NurbsCurveList.
in_siNurbsFormatSpecifies how the data is formatted.
Returns:
CStatus::OK success
CStatus::AccessDenied function used outside of a plug-in operator context.
CStatus AddCurve ( const CNurbsCurveData in_curve,
siNurbsFormat  in_siNurbsFormat,
NurbsCurve out_NurbsCurve 
)

Adds a curve to this NurbsCurveList object.

Parameters:
in_curveThe data description for the new NurbsCurve.
in_siNurbsFormatSpecifies how the data is formatted.
Return values:
out_NurbsCurveThe new NurbsCurve.
Returns:
CStatus::OK success
CStatus::AccessDenied function used outside of a plug-in operator context.

The documentation for this class was generated from the following file: