NURBS Curve

Types

A3DCrvNurbsData

A3DEKnotType

A3DEBSplineCurveForm

Fields

kA3DKnotTypeUniformKnots

kA3DKnotTypeUnspecified

kA3DKnotTypeQuasiUniformKnots

kA3DKnotTypePieceWiseBezierKnots

kA3DBSplineCurveFormUnspecified

kA3DBSplineCurveFormPolyline

kA3DBSplineCurveFormCircularArc

kA3DBSplineCurveFormEllipticArc

kA3DBSplineCurveFormParabolicArc

kA3DBSplineCurveFormHyperbolicArc

Functions

A3DStatus

A3DCrvNurbsGet

A3DStatus

A3DCrvNurbsCreate

A3DStatus

A3DCrvBaseGetAsNurbs

Detailed Description

group a3d_crvnurbs

Entity type is kA3DTypeCrvNurbs.

Note

This curve type contains neither A3DParameterizationData nor A3DMiscCartesianTransformationData.

Type Documentation

enum A3DEKnotType

enumerate to characterize knot vector

Version

2.0

Values:

enumerator kA3DKnotTypeUniformKnots

Uniform.

enumerator kA3DKnotTypeUnspecified

No particularity.

enumerator kA3DKnotTypeQuasiUniformKnots

Quasi-uniform.

enumerator kA3DKnotTypePieceWiseBezierKnots

Extrema with multiplicities of degree + 1, internal is degree.

enum A3DEBSplineCurveForm

Enumerate to characterize curve form.

Version

2.0

Values:

enumerator kA3DBSplineCurveFormUnspecified

No particularity.

enumerator kA3DBSplineCurveFormPolyline

Polyline.

enumerator kA3DBSplineCurveFormCircularArc

Circle arc.

enumerator kA3DBSplineCurveFormEllipticArc

Elliptic arc.

enumerator kA3DBSplineCurveFormParabolicArc

Parabolic arc.

enumerator kA3DBSplineCurveFormHyperbolicArc

Hyperbolic arc.

Function Documentation

A3DStatus A3DCrvNurbsGet(const A3DCrvNurbs *pCrv, A3DCrvNurbsData *pData)

Populates the A3DCrvNurbsData structure.

Version

2.0

Return values
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_CRV_CANNOT_ACCESS_CANONICAL

  • A3D_CRV_NURBS_CANNOT_ACCESS_CONTROL_POINTS

  • A3D_CRV_NURBS_INCONSISTENT_DATA

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DCrvNurbsCreate(const A3DCrvNurbsData *pData, A3DCrvNurbs **ppCrv)

Creates an A3DCrvNurbs from A3DCrvNurbsData structure.

Version

2.0

Return values
  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INTERVAL_INCONSISTENT_DATA

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DCrvBaseGetAsNurbs(const A3DCrvBase *pCrv, A3DDouble dTolerance, A3DBool bUseSameParameterization, A3DCrvNurbsData *pData)

Populates the A3DCrvNurbsData structure from any type of A3DCrvBase.

This structure must be freed with A3DCrvNurbsGet call.

Version

2.1

Note

dTolerance must be computed to obtain the final targeted precision. The inputs are:

  • the tolerance that you want to achieve (that is: the maximum deviation between the original geometry and its approximation), which you should express in mm. This is the starting point with a physical significance.

  • you have to take into account the body scale

  • you have to take into account the part unit

  • you have to take into account eventual additional scales in the product hierarchy to come up to the actual value that you should input for he function. Let’s assume that the part is in inches, that there is no scale (all set to 1.) in the product hierarchy, and that the body scale is 1000. As a reminder, here is how to interpret the meaning of the values stored in the curve’s data: let’s assume that you have a value of “0.1” stored for the curve definition (say a coordinate for a control point or an origin of cylinder axis). This value is to be interpreted as multiplied by the body scale (here: 1000.) and then expressed in the unit of the part. Thus this “0.1” corresponds physically to 0.1*1000=100 inches or 2500.4 mm. Hence, imagine that you want to convert this curve into a NURBS with a tolerance of 0.001 mm (which is a classical value), the calculation is following: tolerance to put = Wanted tolerance in mm / (body scale * unit in times mm); In example above, this leads to a final tolerance to put being 1/25.4 e-6 = 0.001 / (1000 * 25.4 mm); With this value, all the numbers which are manipulated at the “TopoContext” level, including for instance coordinates of control points, will be treated consistently with their physical significance.

Warning

This function can modify the parameterization for curve. You must treat related entities accordingly.

Warning

This function can be called with any type of curve.

Return values
  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INTERVAL_INCONSISTENT_DATA

  • A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code