All Frameworks Class Hierarchy This Framework Previous Next Indexes
FreeFormOperators Class CATCrvFittingToNurbsCrv
Mathematics.CATCGMVirtual
|
+---CATCrvFittingToNurbsCrv
Usage: you must use this class as is. You should never derive it.
public class CATCrvFittingToNurbsCrv
Class defining a geometric operator that computes a (possibly approximated) NURBS representation of a CATCurve.
If a curve has no corresponding NURBS representation, the operator uses a fitting operation to
compute the best approximating NURBS representation. Hence, a maximum deviation must be given as input of
the operator.
- An input CATNurbsCurve or CATPNurbs is directly output:
the GetResult method outputs the same pointer.
- By default, a CATPCurve is retrieved as a CATPNurbs. To force the creation of the corresponding CATNurbsCurve,
use the CATCrvFittingToNurbsCrv.Set3DCurveCreation method.
- Some canonic curves/pcurves will be transformed into rational
CATNurbsCurve/CATPNurbs. However, setting iRationalAllowed = 0 at the operator creation
or using the
CATCrvFittingToNurbsCrv.SetRationalAllowed method, will force the fitting into a non rational curve (default is iRationalAllowed = 1).
- The CATEdgeCurve is converted according to the types of its inside curves.
The CATCrvFittingToNurbsCrv operator follows the global frame of the geometric operators:
- A CATCrvFittingToNurbsCrv operator is created with the CATCreateCrvFittingToNurbsCrv global function
and must be directly deleted with the usual C++ delete operator after use.
It is is not streamable.
- In case of BASIC
mode, the operation is automatically performed at the operator creation.
In case of ADVANCED
mode, options can be precised with the SetXxx methods, before
asking for the computation with the Run method.
- In both cases, the result is accessed with the Getxxx methods.
If a curve does not need to be converted because it already is of the required type, the same pointer
is returned. In this case, using the
CATICGMContainer.Remove method on the result curve will remove the input curve, because they are the same.
Constructor and Destructor Index
- o
~CATCrvFittingToNurbsCrv()
-
Method Index
- o
ComputeNewParameter(CATCrvParam&)
- Maps a parameter on the initial curve to the corresponding parameter on the computed NURBS representation.
- o
ForbidPeriodicity()
- Declares that the result NURBS must not be periodic.
- o
GetMaxDeviation()
- Returns the maximum deviation computed for the result curve.
- o
GetNurbsCurve()
- Returns the result CATNurbsCurve.
- o
GetPNurbs()
- Returns the result CATPNurbs.
- o
ImposeKnotVector(CATKnotVector*)
- Defines the knot vector to be used for the conversion.
- o
ImposeSameParametrization()
- Declares that the result curve must have the same parameterization than the input curve to fit.
- o
IsExactTransformation()
- Returns whether the transformation between the input and output curves is exact.
- o
Run()
- Runs this operator.
- o
Set3DCurveCreation()
- Imposes the conversion of a CATPCurve in a (3D) CATNurbsCurve.
- o
SetInternalMinLength(double)
- Defines the minimal length of an internal arc of the result curve.
- o
SetMaxArcs(CATLONG32)
- Defines the maximum number of arcs of the result curve.
- o
SetMaxDegree(CATLONG32)
- Defines the maximum degree of the result NURBS representation.
- o
SetRationalAllowed(CATLONG32)
- Defines whether the result NURBS representation can be rational.
Constructor and Destructor
o ~CATCrvFittingToNurbsCrv
public virtual ~CATCrvFittingToNurbsCrv( | ) |
-
Methods
o ComputeNewParameter
-
Maps a parameter on the initial curve to the corresponding parameter on the computed NURBS representation.
To call after the operator ran.
- Parameters:
-
- iParamOnCurve
- The parameter on the initial curve.
- Returns:
- The parameter on the computed NURBS representation.
o ForbidPeriodicity
public virtual void ForbidPeriodicity( | )= 0 |
-
Declares that the result NURBS must not be periodic.
To call in ADVANCED mode before the Run method.
o GetMaxDeviation
public virtual double GetMaxDeviation( | )=0 |
-
Returns the maximum deviation computed for the result curve.
To call after the operator ran.
- Returns:
- The maximum deviation value.
o GetNurbsCurve
-
Returns the result CATNurbsCurve.
- Returns:
- The pointer to the created CATNurbsCurve. Use the
CATICGMContainer.Remove if you do not want to keep it in the geometric factory.
o GetPNurbs
-
Returns the result CATPNurbs.
- Returns:
- The pointer to the created CATPNurbs. Use the
CATICGMContainer.Remove if you do not want to keep it in the geometric factory.
o ImposeKnotVector
public virtual void ImposeKnotVector( | const CATKnotVector* | iKnotVector)=0 |
-
Defines the knot vector to be used for the conversion.
- Parameters:
-
- iKnotVector
- The knot vector.
o ImposeSameParametrization
public virtual void ImposeSameParametrization( | )=0 |
-
Declares that the result curve must have the same parameterization than the input curve to fit.
To call in ADVANCED mode before the Run method.
o IsExactTransformation
public virtual CATLONG32 IsExactTransformation( | )=0 |
-
Returns whether the transformation between the input and output curves is exact.
To call after the operator ran.
- Returns:
- 1 if the transformation is exact, 0 otherwise.
o Run
public virtual void Run( | )=0 |
-
Runs this operator.
To call in ADVANCED mode.
o Set3DCurveCreation
public virtual void Set3DCurveCreation( | )=0 |
-
Imposes the conversion of a CATPCurve in a (3D) CATNurbsCurve.
To call in ADVANCED mode before the Run method.
By default (if this method is not called), a CATPCurve is transformed into a CATPNurbs.
o SetInternalMinLength
public virtual void SetInternalMinLength( | double | iInternalMinLength)=0 |
-
Defines the minimal length of an internal arc of the result curve.
To call in ADVANCED mode before the Run method.
- Parameters:
-
- iInternalMinLength
- The minimum length value.
o SetMaxArcs
public virtual void SetMaxArcs( | CATLONG32 | iMaxArcs)=0 |
-
Defines the maximum number of arcs of the result curve.
To call in ADVANCED mode before the Run method.
- Parameters:
-
- iMaxArcs
- The maximum number of arcs. If SetMaxDegree and SetMaxArcs are both used,
the operator tries to get as few arcs as possible, even with a larger number of arcs with
MaxDegree.
o SetMaxDegree
public virtual void SetMaxDegree( | CATLONG32 | iMaxDegree)=0 |
-
Defines the maximum degree of the result NURBS representation.
To call in ADVANCED mode before the Run method.
- Parameters:
-
- iMaxDegree
- The degree maximum value.
o SetRationalAllowed
public virtual void SetRationalAllowed( | CATLONG32 | iAllowRational)=0 |
-
Defines whether the result NURBS representation can be rational.
To call in ADVANCED mode before the Run method.
- Parameters:
-
- iAllowRational
- 1 if the result curve can be rational (default value when the method is not called),
0 if the result curve must not be rational.
This object is included in the file: CATCrvFittingToNurbsCrv.h
If needed, your Imakefile.mk should include the module: CATFreeFormOperators