All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

GeometricOperators Class CATNurbsCurveTools

Mathematics.CATCGMVirtual
  |
  +---GeometricObjects.CATCGMOperator
    |
    +---GeometricOperators.CATGeoOperator
      |
      +---CATNurbsCurveTools
 

Usage: you must use this class as is. You should never derive it.


public class CATNurbsCurveTools

Class used to manipulate a Nurbs curve.


Constructor and Destructor Index


o ~CATNurbsCurveTools()
Destructor.

Method Index


o ActiveSplit(double,double)
Splits the curve.
o ChangeKnotVector(CATKnotVector*,int,int)
Modifies the knot vector of a curve.
o Check()
Checks the current curve.
o GetDeformation(double&,double&)
Computes an estimation of the deformation value.
o GetDegree(int&)
Retrieves the curve degree.
o GetInfo()
Retrieves the CATNurbsToolsInfo.
o GetNumberOfControlPoints(int&)
Retrieves the number of control points of the Nurbs curve.
o GetNumberOfKnots(int&)
Retrieves the number of knot values of the Nurbs curve.
o GetResult()
Returns the new curve computed by this operator.
o ImposeParametrization(CATCurve*,int,int)
Imposes the parameterization of another curve.
o Invert()
Inverts the curve.
o KnotInsertion(double,int)
Inserts a knot.
o KnotRankToKnotValue(int,double&)
Retrieves a knot value from its rank.
o KnotRemoval(int)
Removes a knot.
o KnotReplace(int,double,int,int)
Replaces a knot.
o KnotValueToKnotRank(double,int&)
Retrieves the rank of a knot from its value.
o MultipleKnotInsertion(int,double*,int*)
Inserts several knots.
o Run()
Runs this operator.
o SetDegree(int,int,int)
Modifies the curve degree.
o SetMultiplicity(int,int)
Modifies the multiplicity of a knot.

Constructor and Destructor


o ~CATNurbsCurveTools
public virtual ~CATNurbsCurveTools()
Destructor.

Methods


o ActiveSplit
public virtual CATNurbsToolsInfo ActiveSplit( const double iStartKnotValues,
const double iEndKnotValues) = 0
Splits the curve.
Parameters:
iStartKnotValues
The new start value of the curve.
iEndKnotValues
The new end value of the curve.
Returns:
The information value.
Info_KnotValueOnAKnot
The input knot value is corresponding to an existing knot.
Error_KnotValueOutLimits
The value is lower than the first knot value or greater than the last knot value.
Use CATNurbsToolsInfo include to see all the information values.
o ChangeKnotVector
public virtual CATNurbsToolsInfo ChangeKnotVector( const CATKnotVector* iNewKnotVector,
const int iLeftContinuity= 0,
const int iRightContinuity= 0) = 0
Modifies the knot vector of a curve. This method deforms the curve. Use CATNurbsCurveTools.GetDeformation to compute this deformation
Parameters:
iNewKnotVector
The new knot vector.
iLeftContinuity
The left continuity.
iRightContinuity
The right continuity.
Legal values:
0
C0 continuity (Default value).
1
C1 continuity.
2
C2 continuity.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Error_InputPtrNull
Input pointer of new knot vector is null
Error_InvalidContinuity
The input continuity is lower than 0 or greatest than 2
Error_UncompContinuities
2 + startcontinuity + endcontinuity must be lower or equal nb of control points.
Use CATNurbsToolsInfo include to see all values of informations
o Check
public virtual CATNurbsToolsInfo Check()= 0
Checks the current curve.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Info_InternalContinuity
The internal continuity must be greater or equal to C2.
Info_ConfusedKnots
Two knots are coincident.
Use CATNurbsToolsInfo include to see all information values.
o GetDeformation
public virtual CATNurbsToolsInfo GetDeformation(double& oDeformation,
double& oParamValue) = 0
Computes an estimation of the deformation value.
Parameters:
oDeformation
The deformation is the max distance between the input curve and the current curve. It can be called several times and before
CATNurbsCurveTools.Run.
oParamValue
The parameter value where the maximum deformation is computed.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Use CATNurbsToolsInfo include to see all the information values.
o GetDegree
public virtual CATNurbsToolsInfo GetDegree(int& oDegree) = 0
Retrieves the curve degree.
Parameters:
oDegree
The degree.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Use CATNurbsToolsInfo include for the list of information values.
o GetInfo
public virtual CATNurbsToolsInfo GetInfo()= 0
Retrieves the CATNurbsToolsInfo.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Use CATNurbsToolsInfo include to see all the information values.
o GetNumberOfControlPoints
public virtual CATNurbsToolsInfo GetNumberOfControlPoints(int& oNumberOfControlPoints) = 0
Retrieves the number of control points of the Nurbs curve.
Parameters:
oNumberOfControlPoints
The number of control points.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Use CATNurbsToolsInfo include to see all the information values.
o GetNumberOfKnots
public virtual CATNurbsToolsInfo GetNumberOfKnots(int& oNumberOfKnots) = 0
Retrieves the number of knot values of the Nurbs curve.
Parameters:
oNumberOfKnots
The number of distinct knot values.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Use CATNurbsToolsInfo include to see all the information values.
o GetResult
public virtual CATCurve * GetResult()= 0
Returns the new curve computed by this operator.
Returns:
The pointer of the new curve (0 if an error has occurred, use CATNurbsCurveTools.GetInfo for more information).
o ImposeParametrization
public virtual CATNurbsToolsInfo ImposeParametrization(CATCurve* iCurve,
const int iLeftContinuity= 0,
const int iRightContinuity= 0) = 0
Imposes the parameterization of another curve. This method deforms the curve. Use CATNurbsCurveTools.GetDeformation to compute this deformation.
Parameters:
iCurve
The curve whose parameterization is to be kept.
iLeftContinuity
The left continuity.
iRightContinuity
The right continuity.
Legal values:
0
C0 continuity (Default value).
1
C1 continuity.
2
C2 continuity.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Error_InputPtrNull
Input pointer of curve is null.
Error_InputCurveNotNurbs
Input curve is not a Nurbs.
Error_InvalidContinuity
Input continuity is lower than 0 or greater than 2.
Error_UncompContinuities
2 + startcontinuity + endcontinuity must be lower or equal to the number of control points.
Use CATNurbsToolsInfo include to see all information values.
o Invert
public virtual CATNurbsToolsInfo Invert()= 0
Inverts the curve.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Use CATNurbsToolsInfo include to see all the information values.
o KnotInsertion
public virtual CATNurbsToolsInfo KnotInsertion( const double iKnotValue,
const int iMultiplicity= 0) = 0
Inserts a knot.
Parameters:
iKnotValue
The parameter value of the new knot.
iMultiplicity
The multiplicity value of the new knot (by default, the multiplicity is the one corresponding to a C2 continuity).
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Error_KnotValueOnAKnot
The input knot value is corresponding to an existing knot.
Error_KnotValueOutLimits
Input value is lower than first knot value or greater than last knot value.
Error_InvalidMultiplicity
The input multiplicity is lower than 1 or greater than Degree-2.
Use CATNurbsToolsInfo include to see all the information values.
o KnotRankToKnotValue
public virtual CATNurbsToolsInfo KnotRankToKnotValue( const int iKnotRank,
double& oKnotValue) = 0
Retrieves a knot value from its rank.
Parameters:
iKnotRank
The rank of the knots. The rank starts from 1.
oKnotValue
The parameter value of the knot.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Error_KnotRankOutLimits
The input rank is lower than 1 or greater than number of knots.
Use CATNurbsToolsInfo include to see all the information values.
o KnotRemoval
public virtual CATNurbsToolsInfo KnotRemoval( const int iKnotRank) = 0
Removes a knot. This method deforms the curve. Use CATNurbsCurveTools.GetDeformation to compute this deformation
Parameters:
iKnotRank
The rank of the knot to be removed. The rank starts from 1.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Error_KnotRankOutLimits
The input rank is lower than 1 or greater than the number of knots.
Error_ExtremityKnot
An extremity knot cannot be removed.
Use CATNurbsToolsInfo include to see all the information values.
o KnotReplace
public virtual CATNurbsToolsInfo KnotReplace( const int iKnotRank,
const double iKnotNewValue,
const int iLeftContinuity= 0,
const int iRightContinuity= 0) = 0
Replaces a knot. This method deforms the curve. Use CATNurbsCurveTools.GetDeformation to compute this deformation
Parameters:
iKnotRank
The rank of the knot to be replaced. The rank starts from 1.
iKnotNewValue
The new parameter value of the knot.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Error_KnotRankOutLimits
The input rank is lower than 1 or greater than the number of knots.
Error_ExtremityKnot
An extremity knot cannot be modified.
Error_KnotValueOnAKnot
The new knot value is corresponding to an existing knot.
Error_KnotValueOutLimits
The new value is lower than the first knot value or greater than the last knot value.
Error_InvalidContinuity
The input continuity is lower than 0 or greater than 2.
Error_UncompContinuities
2 + startcontinuity + endcontinuity must be lower or equal to the number of control points.
Use CATNurbsToolsInfo include to see all information values.
o KnotValueToKnotRank
public virtual CATNurbsToolsInfo KnotValueToKnotRank( const double iKnotValue,
int& oKnotRank) = 0
Retrieves the rank of a knot from its value. The parameter corresponds to a knot if the length between the input parameter and the knot value is lower than TolKnotConfusion.
Parameters:
iKnotValue
The parameter value of the knot.
oKnotRank
The rank of the knot. The rank starts from 1. if the parameter value not corresponding to a knot, iKnotRank = 0;
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Info_NotAKnot
The value is not corresponding to a knot
Info_KnotValueOnTwoKnots
The value is corresponding to two knots
Error_KnotValueOutLimits
Input value is lower than first knot value or greater than the last knot value.
Use CATNurbsToolsInfo include to see all the information values.
o MultipleKnotInsertion
public virtual CATNurbsToolsInfo MultipleKnotInsertion( const int iNumberOfKnotsToInsert,
const double* iKnotValues,
const int* iMultiplicities= 0) = 0
Inserts several knots.
Parameters:
iNumberOfKnotsToInsert
The number of knots to be inserted.
iKnotValues
The array of parameters value of the new knots.
iMultiplicities
The array of multiplicities value of the new knots.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Error_KnotValueOnAKnot
The input knot value is corresponding to an existing knot.
Error_KnotValueOutLimits
Input value is lower than first knot value or greater than the last knot value.
Error_InvalidMultiplicity
The input multiplicity is lower than 1 or greater than Degree-2
Use CATNurbsToolsInfo include to see all information values.
o Run
public virtual int Run()= 0
Runs this operator.
Returns:
The information value.
Legal values:
0
It is OK.
1
Error
100
Fatal Error
If an error has occurred, use CATNurbsCurveTools.GetInfo for more information.
o SetDegree
public virtual CATNurbsToolsInfo SetDegree( const int iDegree,
const int iLeftContinuity= 0,
const int iRightContinuity= 0) = 0
Modifies the curve degree.
Parameters:
iDegree
The new curve degree.
iLeftContinuity
The left continuity.
iRightContinuity
The right continuity.
Legal values:
0
C0 continuity (default value).
1
C1 continuity.
2
C2 continuity.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Error_InvalidDegree
The input degree is lower than 3 (1 in single-arc case) or greater than the MaxDegree (11).
Error_InvalidContinuity
The input continuity is lower than 0 or greater than 2.
Error_UncompContinuities
2 + startcontinuity + endcontinuity must be lower or equal to the number of control points.
Use CATNurbsToolsInfo include to see all the information values.
o SetMultiplicity
public virtual CATNurbsToolsInfo SetMultiplicity( const int iKnotRank,
const int iMultiplicity) = 0
Modifies the multiplicity of a knot. This method deforms the curve if the new multiplicity is lower than the old multiplicity. Use CATNurbsCurveTools.GetDeformation to compute this deformation.
Parameters:
iKnotRank
The rank of the knot to be removed. The rank starts from 1.
iMultiplicity
The new multiplicity of the knot.
Returns:
The information value.
Legal values:
Info_OK
No info. It is OK.
Info_NoModification
No modification: new multiplicity is equal to former ultiplicity.
Error_InvalidMultiplicity
The input multiplicity is lower than 1 or greater than Degree-2.
Error_KnotRankOutLimits
The input rank is lower than 1 or greater than the number of knots.
Error_ExtremityKnot
An extremity knot cannot be modified.
Use CATNurbsToolsInfo include to see all the information values.

This object is included in the file: CATNurbsCurveTools.h
If needed, your Imakefile.mk should include the module: GeoNurbsTools

Copyright © 2003, Dassault Systèmes. All rights reserved.