GeometricObjects CATForeignSurfaceData

Usage: you can derive this class.


public class CATForeignSurfaceData

Class for the definition of data for foreign surfaces.
A foreign surface is introduced into CGM by filling the CATIForeignSurface object data with a CATForeignSurfaceData. Then, it is automatically integrated into CGM, and can be used as any CATSurface by the operators and the topology.
To create your own surface class, you have to derive this CATForeignSurfaceData class, and overload at least the mandatory methods that are associated with. As a surface is a bi-parameterized geometric element, it may be represented by three CATMathFunctionXY ((FX(x,y), FY(x,y), FZ(x,y))), that are retrieved through the GetGlobalEquation method. (x,y) are the parameters of a point on the surface. These parameters can also be denoted throughout (U,V), and they are handled with the CATSurParam class.
Surfaces can have several patches in each direction, that are located with a patch number in the first direction iPatchU and a patch number in the second direction iPatchV. Hence, you can use a local parameter on a given patch, or a global parameter, that takes in account the whole surface. Notice that the patch numbers are not necessarily positive, but their values are consecutive. If your surfaces have several patches, you must use the nodal vector representation, and these nodal vectors must not be periodic.
CATSurLimits is a class allowing the surface to be restricted to a part of it. These limitations define the area where the surface may currently be evaluated.
Each type of surface is responsible for the mapping (called Evaluation) between the (U,V) parameters and their corresponding coordinates in the 3D space . No assumption can be made about this mapping by a developper who uses these objects, except that it is C2 continuous (at least twice differentiable).
For this reason, the developper who wants to create new types of surfaces has to write the evaluation methods for his new class. Now, the evaluators are based on the evaluation of the corresponding CATMathFunctionXY. If your new surface requests a new type of CATMathFunctionXY, you must write the evaluators for these new CATMathFunctionsXY.

See also:
,


Constructor and Destructor Index


o CATForeignSurfaceData()
Default constructor
o ~CATForeignSurfaceData()

Method Index


o CreateLocalEquation(CATLONG32,CATLONG32,CATMathFunctionXY*&,CATMathFunctionXY*&,CATMathFunctionXY*&)
Retrieves the mathematical equation associated with a patch of a foreign surface.
o CreateOffset(CATGeoFactory*,double&,CATSurLimits&,CATMathTransformation2D*&)
Creates a new surface, offsetted with regards to a foreign surface.
o EvalFirstDeriv(CATSurParam&,CATMathVector&,CATMathVector&)
Retrieves the first derivatives on a point of a foreign surface.
o EvalLocal(CATSurParam&,CATSurEvalCommand&,CATSurEvalLocal&)
Retrieves multiple evalutions at a given point of this CATSurface.
o EvalMultiple(CATSurLimits&,CATLONG32,CATLONG32,CATSurEvalCommand&,CATSurEvalResult&)
Retrieves multiple evaluations on a grid of points of a foreign surface.
o EvalPoint(CATSurParam&,CATMathPoint&)
Returns the mathematical point associated with a CATSurParam.
o EvalSecondDeriv(CATSurParam&,CATMathVector&,CATMathVector&,CATMathVector&)
Retrieves the second derivatives on a point of a foreign surface.
o EvalThirdDeriv(CATSurParam&,CATMathVector&,CATMathVector&,CATMathVector&,CATMathVector&)
Retrieves the third derivatives on a point of a foreign surface.
o ExtractIsoParametricCurve(CATIsoParameter,CATSurParam&,CATGeoFactory*)
Creates a new curve along an isoparametric curve of a foreign surface.
o Extrapolate(CATMathVector2D&,CATMathVector2D*)
Changes the maximum limitations of this surface.
o GetBox(CATSurLimits&,CATMathBox&)
Returns the smallest box surrounding a portion of a foreign surface, with regards to the provided CATSurlimits.
o GetInternalMaxLimits(CATLONG32,CATLONG32,CATSurLimits&)
Returns the maximum limitations of an internal patch of a foreign surface.
o GetKnotVectorU()
Returns a pointer to the first nodal vector of a foreign surface.
o GetKnotVectorV()
Returns a pointer to the second nodal vector of a foreign surface.
o GetLimits(CATSurLimits&)
Returns the current limitations of a foreign surface.
o GetMathCurve(CATIsoParameter,CATSurParam&)
Returns a pointer to the mathematical representation of an isoparametric curve of a foreign surface.
o GetMaxLimits(CATSurLimits&)
Returns the maximum limitations of a foreign surface.
o GetParam(CATMathPoint&,CATSurParam&)
Retrieves the CATSurParam on a foreign surface corresponding to a given CATMathPoint.
o GetParam(CATMathPoint&,CATSurParam&,CATSurLimits&)
Retrieves the CATSurParam on a foreign surface corresponding to CATMathPoint.
o GetParamOnIsopar(CATMathPoint&,CATIsoParameter&,CATSurParam&,CATSurParam&,double&)
Retrieves the parameter on an iso-parametric curve of a foreign surface corresponding to CATMathPoint
To write for surfaces for which GetImplicitEquation returns a non-null pointer.
o HasMathCurve(CATIsoParameter,CATSurParam&)
Tests whether an isoparametric curve of a foreign surface has a mathematical representation.
o IsCircular()
Checks if a foreign surface is circular in a or two directions of the parameter.
o IsConfused(CATMathTransformation&,CATSurface*,CATMathTransformation2D*)
Tests whether the transformation of a foreign surface is coiencident with another curve.
o IsInvariant(CATMathTransformation&,CATMathTransformation2D*)
Tests whether a foreign surface is geometrically invariant.
o IsLinear()
Checks if a foreign surface is linear in a or two directions of the parameter.
o IsPeriodicU()
Tests whether a foreign surface is periodic along the first direction.
o IsPeriodicV()
Tests whether a foreign surface is periodic along the second direction.
o SetLimits(CATSurLimits&)
Modifies the current limitations of a foreign surface.

Constructor and Destructor


o CATForeignSurfaceData
public CATForeignSurfaceData()
Default constructor
o ~CATForeignSurfaceData
public virtual ~CATForeignSurfaceData()

Methods


o CreateLocalEquation
public virtual CreateLocalEquation( const iPatchU,
const iPatchV,
const oFx,
const oFy,
const oFz)
Retrieves the mathematical equation associated with a patch of a foreign surface.
(oFx(U,V), oFy(U,V), oFz(U,V)) is then a point of the surface patch. The method creates the equations, that must not be deleted as part of the object.
Parameters:
iPatchU
The patch number in the first direction.
iPatchVm
The patch number in the second direction.
oFx
A pointer to the parametric equation of the first coordinate.
oFy
A pointer to the parametric equation of the second coordinate.
oFz
A pointer to the parametric equation of the third coordinate.
o CreateOffset
public virtual CreateOffset( iWhere,
const iOffset,
const iLimits,
ioTransfo2D)
Creates a new surface, offsetted with regards to a foreign surface.
By default, creates a CATOffsetSurface.
Parameters:
iWhere
A pointer to the factory for creation.
iOffset
The offset value.
iLimits
The limitations to take into account.
ioTransfo2D
The 2D-transformation defining the change of parametrization between the surface and its offset.
Returns:
The created surface.
o EvalFirstDeriv
public virtual EvalFirstDeriv( const iPosition,
ioDU,
ioDV)
Retrieves the first derivatives on a point of a foreign surface.
Parameters:
iParam
The point of the surface.
ioDU
The first derivative w.r.t. to the U parameter.
ioDV
The first derivative w.r.t. to the V parameter.
o EvalLocal
public virtual EvalLocal( const iParameter,
const iCommand,
oResult)
Retrieves multiple evalutions at a given point of this CATSurface.
Parameters:
iParam
The point of the surface.
iCommand
The command precising the requested evaluation types.
ioResult
The resulting evaluations.
o EvalMultiple
public virtual EvalMultiple( const iBox,
iCountPointsInU,
iCountPointsInV,
const iCommand,
oResult)
Retrieves multiple evaluations on a grid of points of a foreign surface.
The method reallocates memory if necessary.If the number of points in U or V is 1, then the evaluation is done on the low part of the CATSurLimits for this(these) coordinate(s).
Parameters:
iBox
The limits of the surface to take into account.
iNbOfPointsInU
The number of points to distribute among the limits on the surface first direction.
iNbOfPointsInV
The number of points to distribute among the limits on the surface second direction.
iCommand
The command precising the requested evaluation types.
oResult
The evaluation at the given points such that the (IndexU, IndexV) point evaluation is located at the 3*(IndexU + iNbOfPointsInU*IndexV) place.
o EvalPoint
public virtual EvalPoint( const iPosition,
ioPoint)
Returns the mathematical point associated with a CATSurParam.
Parameters:
iPosition
The point of the surface.
ioPoint
The corresponding mathematical point.
o EvalSecondDeriv
public virtual EvalSecondDeriv( const iPosition,
ioDU2,
ioDUDV,
ioDV2)
Retrieves the second derivatives on a point of a foreign surface.
Parameters:
iParam
The point of the surface.
ioDU2
The second derivative w.r.t. to the U parameter.
ioDUDV
The second derivative w.r.t. to the UV parameters.
ioDV2
The second derivative w.r.t. to the V parameter.
o EvalThirdDeriv
public virtual EvalThirdDeriv( const iPosition,
ioDU3,
ioDU2DV,
ioDUDV2,
ioDV3)
Retrieves the third derivatives on a point of a foreign surface.
Parameters:
iParam
The point of the surface.
ioDU3
The third derivative w.r.t. to the U parameter.
ioDU2DV
The third derivative w.r.t. to the UUV parameters.
ioDUDV2
The third derivative w.r.t. to the UVV parameters.
ioDV3
The third derivative w.r.t. to the V parameter.
o ExtractIsoParametricCurve
public ExtractIsoParametricCurve( iIsoParameter,
const iParam,
iWhere)
Creates a new curve along an isoparametric curve of a foreign surface.
By default, creates a PLine.
Parameters:
iIsoParameter
The type of iso parametric curve.
iParam
The point of the surface belonging to the curve to create.
iWhere
A pointer to the factory for creation.
Returns:
A pointer to the created curve.
o Extrapolate
public virtual Extrapolate( const iRequiredParamExtension,
ioActualExtension= NULL )
Changes the maximum limitations of this surface.
Parameters:
iRequiredParamExtension
The value of extension.
  • if iRequiredParamExtension.GetX()>0, Umax is expected to increase by this value.
  • if iRequiredParamExtension.GetY()<0, Vmin is expected to decrease,
  • if null, no change is required in the related direction.
ioActualExtension
If NULL, no information on actual extrapolation is required.
o GetBox
public virtual GetBox( const iLimits,
ioBox)
Returns the smallest box surrounding a portion of a foreign surface, with regards to the provided CATSurlimits.
Parameters:
iLimits
The limits on the surface
ioBox
The box surrounding the surface limited by iLimits.
o GetInternalMaxLimits
public virtual GetInternalMaxLimits( const iPatchU,
const iPatchV,
ioLimits)
Returns the maximum limitations of an internal patch of a foreign surface.
This does not take into account the current limitations . These maximum limits can be the creation limits or the limits that are obtained by extrapolation, depending on the types of geometric objects.
Parameters:
iPatchU
The patch number in the first direction.
iPatchV
The patch number in the second direction.
ioLimits
The limitations of a patch.
o GetKnotVectorU
public virtual GetKnotVectorU()
Returns a pointer to the first nodal vector of a foreign surface.
This is used when the surface has several patches. If it always has only one patch, you must return a null pointer.
Returns:
The pointer to the knot vector.
o GetKnotVectorV
public virtual GetKnotVectorV()
Returns a pointer to the second nodal vector of a foreign surface.
This is used when the surface has several patches. If it always has only one patch, you must return a null pointer.
Returns:
The pointer to the knot vector.
o GetLimits
public virtual GetLimits( ioLimits)
Returns the current limitations of a foreign surface.
Parameters:
ioLimits
The limitations of this CATSurface.
o GetMathCurve
public virtual GetMathCurve( const iIsoParameter,
const iLocation)
Returns a pointer to the mathematical representation of an isoparametric curve of a foreign surface.
Parameters:
iIsoParameter
The type of iso-parametric curve.
iLocation
A point belonging to the curve.
Returns:
The pointer to the CATMathCurve, that has to be deleted by the caller. No mathematical representation by default.
o GetMaxLimits
public virtual GetMaxLimits( ioLimits)
Returns the maximum limitations of a foreign surface.
This does not take into account the current limitations .
Parameters:
ioLimits
The maximum limitations of this CATSurface.
o GetParam
public virtual GetParam( const iLocation,
ioParam)
Retrieves the CATSurParam on a foreign surface corresponding to a given CATMathPoint.
To write for surfaces for which GetImplicitEquation returns a non-null pointer.
Parameters:
iLocation
The CATMathPoint whose coordinates are to be transformed as CATSurParam.
ioParam
The first corresponding CATSurParam on the surface.
Returns:
The diagnosis of the number of parameters that can be evaluated on this point.
NoSolution
No parameter corresponds to this point.
SingleSolution
Only one parameter corresponds to this point.
MultipleSolution
Several parameters correspond to this point.
InfiniteSolution
Infinitely many parameters correspond to this point.
o GetParam
public virtual GetParam( const iLocation,
ioParam,
const iInside)
Retrieves the CATSurParam on a foreign surface corresponding to CATMathPoint.
Only parameters inside iInside are retrieved,
To write for surfaces for which GetImplicitEquation returns a non-null pointer.
Parameters:
iLocation
The CATMathPoint whose coordinates are to be transformed as a CATSurParam.
ioParam
The first corresponding CATSurParam on the surface.
iInside
The CATSurLimits to take into account for trimming the CATSurface.
Returns:
The diagnosis of the number of parameters that can be evaluated on this point.
NoSolution
No parameter corresponds to this point.
SingleSolution
Only one parameter corresponds to this point.
MultipleSolution
Several parameters correspond to this point.
InfiniteSolution
Infinitely many parameters correspond to this point.
o GetParamOnIsopar
public virtual GetParamOnIsopar( const iPoint,
const iIsoparam,
const iStart,
const iEnd,
ioLambdaOnIsopar)
Retrieves the parameter on an iso-parametric curve of a foreign surface corresponding to CATMathPoint
To write for surfaces for which GetImplicitEquation returns a non-null pointer.
Parameters:
iPoint
The CATMathPoint whose coordinates are to be transformed as a CATSurParam.
iIsoparam
The isoparametric curve on which the parameter is computed.
iStart
The low limitation to take into account for trimming the surface.
iEnd
The high limitation to take into account for trimming the surface.
ioLambdaOnIsopar
The corresponding parameter value on the isoparametric curve.
Returns:
The diagnosis of the number of parameters that can be evaluated on this point.
NoSolution
No parameter corresponds to this point.
SingleSolution
Only one parameter corresponds to this point.
MultipleSolution
Several parameters correspond to this point.
InfiniteSolution
Infinitely many parameters correspond to this point.
o HasMathCurve
public virtual HasMathCurve( const iIsoParameter,
const iLocation)
Tests whether an isoparametric curve of a foreign surface has a mathematical representation.
Optional method. No mathematical representation by default.
Parameters:
iIsoParameter
The type of iso-parametric curve.
iLocation
A point belonging to the curve.
Returns:
The result of the test.
Legal values:
1
If an isoparametric curve of this has a mathematical representation.
0
Otherwise.
o IsCircular
public virtual IsCircular()
Checks if a foreign surface is circular in a or two directions of the parameter.
By default, returns CATIsoParNoDir
Returns:
The result of the test.
Legal values:
CATIsoParNoDir
if they is no circle on the surface
CATIsoParamU
if the isoparameters with U constant are circles.
CATIsoParamV
if the isoparameters with V constant are circles.
CATIsoPaRBothDir
if the isoparameters with U constant or V constant are circles.
o IsConfused
public virtual IsConfused( const iTransfo,
const iTSurface,
ioTransfo2D= NULL)
Tests whether the transformation of a foreign surface is coiencident with another curve.
This method does not take into account the current limitations of the curves.
Parameters:
iTransfo
The tested transformation.
iTSurface
The other surface.
ioTransfo2D
The 2D-transformation defining the change of parametrization between the transformation of this and iTSurface.
Returns:
The result of the test.
Legal values:
1
If the transformation of this is geometrically the same as iTSurface.
0
Otherwise.
o IsInvariant
public virtual IsInvariant( const iTransfo,
ioTransfo2D= NULL)
Tests whether a foreign surface is geometrically invariant.
This method does not take into account the current limitations of the curve.
Parameters:
iTransfo
The tested transformation.
ioTransfo2D
The 2D-transformation defining the change of parametrization between this and the transformation of this.
Returns:
The result of the test.
Legal values:
1
If the transformation of this is geometrically the same as this.
0
Otherwise.
o IsLinear
public virtual IsLinear()
Checks if a foreign surface is linear in a or two directions of the parameter. By default, returns CATIsoParNoDir
Returns:
The result of the test.
Legal values:
CATIsoParNoDir
if they is no linearity
CATIsoParamU
if the isoparameters with U constant are lines
CATIsoParamV
if the isoparameters with V constant are lines
CATIsoParBothDir
if the isoparameters with U constant or V constant are lines
o IsPeriodicU
public virtual IsPeriodicU()
Tests whether a foreign surface is periodic along the first direction.
Returns:
The result of the test.
Legal values:
0
if it is not periodic along the U direction
1
if it is periodic along the U direction
o IsPeriodicV
public virtual IsPeriodicV()
Tests whether a foreign surface is periodic along the second direction.
Returns:
The result of the test.
Legal values:
0
if it is not periodic along the V direction
1
if it is periodic along the V direction
o SetLimits
public virtual SetLimits( const iNewLimits)
Modifies the current limitations of a foreign surface.
Parameters:
iNewLimits
The new current limitations.

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

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.